Hi All, I’m having some issues with the usability of the PIR Sensor Switch user mod. I admit I am green to WLED and user mods. I did the web install first, then did the compile from scratch and have no issues there. Now I’m adding in the PIR. I went through the Github instructions and then noticed at the bottom it said it was built into WLED now so all I needed to do was add the -D USERMOD_PIRxxx into my build enviornment (d1_mini) behind the build flags. Complied and all is good (using the default pin13)
So my issue. I can get the PIR to turn on WLED easily with no issues. However its not reliably switching off after the set time. My main purpose is to have the PIR turn on a preset to a solid color and then switch off. It has never once switch off when its on a solid color. If I switch to an effect in WLED it will usually shut itself off. But not always. I have set up the same PIR in a simple ESPHome sketch and according to the logs it switches on and off as it should. So I don’t believe the sensor is an issue staying on when it shouldn’t be. Its an AM312 sensor. Tested with two different sensors as well.
So I’m wondering if others have seen similar issues or maybe it is something inside the user mod that is conflicting. I’m a little to green to dive into to see, I’m still more of a basic programming level. If anyone has anything else I should be trying I’m all ears.
The only thing I have changed in my platformio.ini is uncommenting my board and adding the -D usermod in the builds below. Is that the correct procedure?