Hello is it possible to program a D1 mini to run without a home assistant instance, to turn a output pin on at sunset then back off at sunrise.
I am wanting to add a light at my parents to turn on and off when dark, but a light sensor is not not an option due to other issues.
It would have a wifi connection so getting the time and other info is ok.
Any pointers to get me started would be appreciated (if what I want is possible)
Thanks
Ideas:
- Make a call to a free API (eg: https://sunrise-sunset.org/api) to determine the times for your location.
- Scrape that service to get an array of values for each day and bake that into your code.
- Roll your own function to determine times based upon your location on the globe based on C# Sunrise/Sunset with latitude/longitude - Stack Overflow
The hardest bit will probably be parsing the date strings and comparing them to times
Just use a hardware RTC (or a local or remote NTP source you have available) together with the esphome sun component
@Andy_Allsopp don’t need to invent the wheel again
2 Likes
Jeebs. Don’t mind me over here. I’m making this roundy roundy thing with a, yes, an axle. Hmmm. What to call it???