Simple nightlight build, esp8266, AM312 PIR, 2812 LEDs

Hi all,

Can’t seem to get scheduling working. All assembled and seems to work in general terms, motion sensed LEDs are on. I’d like this nightlight to only function from 2000 hr to 0600 hr everynight. I created an “off” preset and a “NL” preset. I set a time of 2000 hr for “NL” and 0600 hr for “off”. After I save that, it will still light up when motion is sensed. This is during the “off” preset schedule. Have I configured things wrong??

You may be misunderstanding the way timed presets work.
Once WLED notices the time for a preset has arrived, it fires that preset.
It doesn’t check to see that you may change things manually or via a button input or sensor after that.

It also doesn’t check to see after a reboot if it should have fired a preset because you’re now later than the time it should have been fired at originally.

Unless you can use a preset to force a disable of your motion sensing functions, the Off function isn’t going to work. You’ll have to describe in more detail how your motion sensing is connected and what you expect to achieve.

Yes, you did.

If you are using PIR usermod, then you have, in its settings, a possibility to fire motion events only during night. If, on the other hand, you want to fire during specific hours, you’ll need to create two custom API presets, that will disable and enable usermod during those hours.

If you are not using PIR usermod, then your options are limited as PIR is functioning as a switch and will always trigger the event.

AAhhhhhh okay, it seems i have misunderstood the preset. Thank you.

This is just a nightlight, so i’d like it to remain off from 6am to 8pm. At 8pm it should go into nightlight mode and only turn on when motion is sense until 6am.

I have a nodemcu 8266, AM312 and 30 2812 LEDs. Standard wiring LED data is on GPIO2. The PIR signal is on GPIO4.

It works, just need to sort out this scheduling.

Thank you. I’ll look into PIR usermod. I know they are on github, is it as easy as uploading the usermod in the edit window?

No, it needs to be compiled-in. There are bins you can download, though, here.

Thanks, will look into using usermods.

Started to try to compile a custom version, had issues with VS code. Ended up finding a precompiled bin and i think it is working the way i want.

Thank you all for the help.