Hello everyone. I do have a question. Is it possible to run PIR only on specific hours? Like “Nighttime only” function on fixed hours. Thank you for Your help.
Yes, but I use the Home Assistant program to control the PIR.
Yes.
You can schedule presets with on and off for PIR sensor.
{"PIRsensorSwitch":{"PIRenabled":true}}
for on and {"PIRsensorSwitch":{"PIRenabled":false}}
for off.
It works. Thank you.
I know. I wrote the code.
Hi guys,
this was exactly what I was looking for. But even though I (think I) followed the instruction, it doesnt work for me.
My setup:
- I am running WLED, version 0.14.0-b6, on a ESP8266.
- I configured a PIR under LED & Hardware setup: Button 0 GPIO=5, PIR sensor
- for PIR activation I did: Button action: Button 0, long off->on: “preset to switch on”
So far so good and it works. But the de-activation as shown by @blazoncek does not work.
- i added a preset to enable and a similar one (with a “false”) to disable:
But even though i activate the Preset to disable (directly via WLED Browser UI - or via HomeAssistant, calling the preset) → the PIR is always enabled.
Any ideas are welcomed!
Thanks,
Wolfgang
Post your preset for “PIR Off”, showing the API content.
there you go:
The API above only works for PIR sensor usermod, not if you use “buttons”.
Thanks for clarification.
Is there a solution to control these buttons state without using pir switch usermode?
Maybe with some direct settings links?
I have already programmed sensors logic with Arduino Nano and I am looking for preset, controlling PIR states in HA as switch.
This doesn’t make sense to me. Is this done utilizing a Playlist? Currently I have two PIR sensors for my stairs and they work excellent to turn on the Playlist I have set, but I’m looking for a way I can turn the PIR sensors off during the day. Or is there a way I can schedule different Playlist to trigger from the PIR sensors at specified times? (I. E. Effect #1 during day and effect #2 at night). I’m new at this so I haven’t ventured into usermods or home assistant. Seems like usermods require a little bit of coding which is why I haven’t gone that route and home assistant I haven’t used bc wled so far has been so easy with the app. Looking for advice for turning the pir sensors on and off. Otherwise I can set a preset to come on at 6pm and it will, but as soon as someone walks by the sensor to go upstairs or downstairs it runs the effect and turns everything off since the pir overrides everything else.
The use of “PIR sensor” as a button type enables a few different JSON API controls.
These are part of the PIR-Usermod, so you have to compile that in yourself or check one of the repositories that include various mods (try: Serg Builds )
This will allow you to use a PIR sensor like a switch to fire presets. With the API enable/disable you can turn the PIR sensor on and off via a Sunrise/Sunset preset or via some other system. This “turns off the stair lights in daytime” or similar features.
Going further to use a different PIR-fired preset for different times of day is beyond the scope of the current WLED environment.
You can either do some coding of your own to modfy the current usermod, or try and integrate in something like Home Assistant to handle the controls outside of WLED.
PS: If you want to explore this further on the forum, it would be a good idea to repost this in your own topic so we don’t extend a (mostly) completed thread unnecessarily.
My apologies. In looking for answers I thought it would be better to repost in the same thread so we didn’t have multiple threads around the same issue, but I understand where you are coming from. It sounds like I may need to look Into using home assistant or possibly a user mod with some coding. I appreciate your support in responding to my question.