Hi, I want to use an ESP32-C6 to control some lights, pumps, etc in a reef aquarium. I added some basic GPIO that I can put on high or low from HA as switches, that control the relays. Works fine. But I need to add some schedules from HA that controls this switches. The doubt is because I need the schedules must be running on ESP32 not in HA, to be sure it will work even in case of wifi signal be lost. So HA is only the interface to add, program or delete the schedulers running in the ESP32 device. I have not idea what is the right way to do it, I read ESPHOME docs, and I am confusing between sprinkler controllers. PWM , lights, timers… none seem to meet the requeriments… What path should be followed? Is there a specific component to this? Thanks
I haven’t tried it, but have you looked at the datetime component? The docs state it supports on_time automations.
Afaik on_time trigger is not templatable, but it’s relatively easy to use just number component and compare it to now() at some interval.
There’s also external component (I haven’t used it) which looks well documented and recently updated.
Start with what your requirements are. That is always a good place.
Think about what problem you are trying to solve and what should happen under which failure conditions.
I started on the home automation adventure with some freeze protection systems. Basically they are temperature sensors and relays to control things that can provide heat.
Originally I used self-contained systems that did their own thing and reported results. The control was with RF switches which generally worked, but provided no direct feedback.
Later I switched to esp based systems and moved the automation to NodeRED, since typically sensors and control were on different nodes. Since there is some possibility that some communication will fail, my relays are set to automatically turn off after some period of no communication. This has worked well for me.
I also have had special code to make sure my sensors are functioning correctly and look at the data regularly. I also log the data for connections and signal strength so I can see which locations are having difficulty and choose to do something about it or not.
With that, I am comfortable having control where it is much easier to change when and how I want. But for freeze protection I have only touched it once (moved the setpoint to 42 degrees F from 38) to get an earlier indication when something goes wrong.