Brightness depending on the time of day

we switch a WS2801 strip using a PIR motion sensor HC-SR501. That works fine.
Now we would like to achieve that the brightness is reduced by 25% between 8:00 p.m. and 6:00 a.m.

Is that possible with macros?

Yes.
First off, save all your presets without brightness included.
Next create two presets that will change brightness only to 75% and 100%.
Next create two presets that will turn WLED on and off.
Then create a playlist (preset for on + preset for desired effect when WLED is triggered)
Assign playlist to On action and off preset to Off action.
Schedule preset for 75% brightness at 8:00 p.m.
Schedule preset for 100% brightness at 6:00 a.m.

Thank you very much for this detailed guide. I didn’t expect that.
Try to build it up like that, I might have to ask.
I will report :slight_smile:

thanks to your help i was able to solve the problem. Once again many thanks !

I have created 3 presets:

Schedule preset for 75% brightness at 8:00 p.m.
{"on": false, "bri": 64}

Schedule preset for 100% brightness at 6:00 a.m.
{"on": false, "bri": 191}

on event:
on / off preset without brightness

If you want it to match sunrise (dawn) and sunset (dusk) for your area, you can use the sunrise / sunset triggering in the time/macros scheduling section. Just include an approximate lat/lon for your location and the sunrise / sunset will work and automatically adjust.

If you want the brightness to progress, there are a couple techniques people have used, including sending the brightness and on/off commands using a RPi or PC that’s always on. Schedule with cron or Task Scheduler to run a curl command at the proper time that sends that JSON data to that WLED’s IP address.

Thanks for the tip. I have the time 6:00 a.m. replaced by sunrise.

This small application should work locally :slight_smile: CURL / cron is being used sensibly on my next larger project.

1 Like