blazoncek / WLED

Control WS2812B and many more types of digital RGB LEDs with an ESP8266 or ESP32 over WiFi!
MIT License
31 stars 0 forks source link

Interupt PIR usermod countdown #44

Closed Shaps-77 closed 1 year ago

Shaps-77 commented 1 year ago

Hi Blaž, Thanks again for all your continuing work on Wled , its truly remarkable 😎

Is there a way to temporaily interupt the countdown timer function of the PIR usermod?

My situation is this.. I'm currently using the PIR and Rotary encoder usermods to control my ensuite lights. I have the PIR setup to turn on some ambient lights and the rotary encoder takes care of brightness and using its built in momentary button where 'short press' triggers preset macros and 'long press' powers off..

Here's my situation... as I enter the room the PIR triggers the lights on and the timer starts the countdown to turn off..(This is great for most situations) buttttt.. Is there a way that any input from the rotary encoder or button can suspend/cancel the PIR countdown function until WLED is powered down? Thus keeping the LEDs on in their current state.. Otherwise it seams I need to wait until the PIR counts all the way down before I can turn on the lights manually using the button or Rot Encoder... at the moment even if I use the button or encoder whilst the PIR usermod is counting down, the inputs are registered and the lights change etc.. but the countdown continues until WLED powers off.

Thanks in advance Andrew

blazoncek commented 1 year ago

A while ago I thought about that but never got around to implement it. Since I no longer maintain my fork (I moved development upstream) please open an issue there.

I will implement cancelation of PIR timeout if anything changes during countdown.

Shaps-77 commented 1 year ago

OK, Will do. Thanks