Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request. - auto on / off #801

Closed
almulder opened this issue Mar 26, 2020 · 11 comments
Closed

Request. - auto on / off #801

almulder opened this issue Mar 26, 2020 · 11 comments
Labels
question stale This issue will be closed soon because of prolonged inactivity

Comments

@almulder
Copy link

Can we get a feature to auto turn on and auto turn off based on time. Like add a start time and end time.

Even better to be able to select sunset to sunrise with a +/- in mins option. Say 30 min before sunset and 30 min after sunrise?

I am sure there are ways to do it with third party stuff. But it would be nice to have it built in.

@srg74
Copy link
Contributor

srg74 commented Mar 26, 2020

Please read Wiki https://github.com/Aircoookie/WLED/wiki/Macros

@almulder
Copy link
Author

I looked but it does not explain stuff clearly.

Can someone post a macro to turn on lights at 6:00pm and leave on for 6 hours or turn off at 12am.

@raoulteeuwen
Copy link

Not sure since i don't use them, but afaik it should work like so: go to Settings/Time&Macros. I assume you need to turn on NTP at the top (else WLED has no idea about the time). At the bottom, you can specify macro's to start at a specific time. If all you want is turn WLED on at time X and turn it off at time Y, program macro 1 with code "T=1" and macro 2 with code "T=0" (both without the quotes). Than put macro 1 in time slot 1 (with time X) and macro 2 in time slot 2 (with time Y) .

This is basically what is also described at #101 (comment) .

But when i tried with my own WLED before posting this, i could not get it to work. But please try ;-).

@franzuu
Copy link

franzuu commented Apr 16, 2020

I stumbled upon this library:
https://github.com/dmkishi/Dusk2Dawn
It would be nice if this could be implemented.

@DJL-F3D
Copy link

DJL-F3D commented May 28, 2020

I completely agree I don't know how to add to the wiki but this is what I use (Gleaned from Dr Zzzzz and other sources)

First you have to define the macro's, these are mine so drop them each numbered spot (5 total).
Macros:

T=0
T=1
PL=~
T=2
ND

This is what they do - Can't find any good info in the docs about this stuff.

(M1) T=0 (power off)
(M2) T=1 (power on)
(M3) T=2 (power toggle) assign to long press

(M4) PL=~ (next preset) assign to short press macro

(M5) ND = Shutdown timer activate assign to double press

I have them assigned to these button pushes:

Short press macro = 4 next preset
Long press = 3 power on/off
Double press = 5 shutdown timer activate

Then at the bottom of the 'Time & Macros' screen you can setup your time things come on and off. So in the morning my turn on macro Macro 2 - you just need 2 in the macro spot. triggers on weekdays at 05:30

image

image

@raoulteeuwen
Copy link

Hi @DJL-F3D did you find https://github.com/Aircoookie/WLED/wiki/Macros (and the link on that page to https://github.com/Aircoookie/WLED/wiki/HTTP-request-API )? Or that isn't clear enough? Feel free to improve it!

@DJL-F3D
Copy link

DJL-F3D commented May 29, 2020

Thanks for the reply. For a non programmer like me, I find it hard to apply that sort of list without some working examples. Aircoookie has all the functionality in there. It’s just hard for someone like me to apply it.

@Legsmaniac
Copy link

Perhaps an easier (and cheating?) way would be to use a timer switch? Plug the power supply into the timer switch and ensure WLED is set to always start ON in the settings. You could even consider one of the many available plug-in WiFi switches which can also be programmed with schedules.
Just a thought. No macros needed. 😉

@DJL-F3D
Copy link

DJL-F3D commented May 30, 2020

It really is worth persevering with the functionality already in WLED though.
In the morning my phone alarm goes off and exactly the same time my WLED lights com on too because of the internet time syncing. Good thing is, you’ll never have to set the time yourself. Just trigger the macro to switch on at the same time.

It’s really easy once you give it a crack. From what i’ve read, WLED is really designed to be triggered externally by other home automation setups, So this being built in is really a bonus for those not wanting to go down that route.

@garyd9
Copy link
Contributor

garyd9 commented Aug 9, 2020

for the sunrise/sunset functionality, there is now a usermod: https://github.com/Aircoookie/WLED/tree/master/usermods/UserModv2_SunRiseAndSet

@stale
Copy link

stale bot commented Dec 8, 2020

Hey! This issue has been open for quite some time without any new comments now. It will be closed automatically in a week if no further activity occurs.
Thank you for using WLED!

@stale stale bot added the stale This issue will be closed soon because of prolonged inactivity label Dec 8, 2020
@stale stale bot closed this as completed Dec 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question stale This issue will be closed soon because of prolonged inactivity
Projects
None yet
Development

No branches or pull requests

8 participants