Automation Response Time?

Home Assistant…

It is software you can run on a Raspberry Pi, Intel Nuc or some similar device and use it to control all kinds of devices/processes in and around your home.

Thanks!

There is another way to tackle this issue and that is to ensure that the control system has safety built into it. Having been in industrial automation I have often had to ask myself ‘what if’ questions…
e.g.If the transport you are driving doesn’t stop when the limit switch is made…
This becomes less of an issue if the consequences of the failure aren’t catastrophic. (So if an end stop can be fitted to prevent the machine from self destructing then that’s great!)
Regarding this particular topic I liked Geyserwise’s use of a PTC element they use in their system. This is forgiving because if the temperature of the element gets too high it’s resistance increases and it stops heating,.

The current system has failsafes on top of failsafess…

  1. Use geyserwise thermostat with 90°C safety cut off.
  2. Geyser controller MCU has brownout detection and hardware watchdog timer. First instruction in boot sequence turns off geyser relay. If for any reason the poll loop does not complete in 8 seconds, the hardware watchdog reboots the CPU, which immediately turns off the geyser. Similarly, if no comms with the ModBus host in 8 seconds, CPU reboots.
  3. Same sort of set up on the host controller. Any comms bus failure or an parameter out of spec, and the CPU executes an infinite loop, which in turn triggers hardware watchdog.

So aside from some insanely specific hardware failures inside the CPU itself, the geyser will always turn off within 8s of the last ‘on’ command.

I suppose I could do something very similar with a HA setup, but timings would be a lot more critical with the slower poll loops.

Anyway, I have already started the rewrite to use the D1. That is quite a remarkable piece of hardware. R60 for a MCU board with built in WiFi and 2MB flash file system. Built in OTA update infrastructure and all. It was not long ago when putting something like this together in embedded hardware would be R1000+…

Where do you source your board? Good price!

Banggood has 5-packs for R300.

1 Like

So I’ve updated my HA’s scan interval to 5 seconds and works great. Honestly, I’ve never had any issues with reliability with my HA, but it is also a very barebones setup. Only automations related to limiting the inverter running on it as well as a few switches. I’m also going to still automate my pool pump, not not critical at the moment.

I’d still say write the core geyser logic, with all the fail-safes, into the D1. But look at adding MQTT support and then implement the automation parts into Home Assistant.

In my case, this is the stuff I’d like to change on a more regular basis (to fine-tune for example), or completely skip the routine stuff if something interesting happens (loadshedding), or extend and enhance (all the time).

Also much easier to access remotely.

@jykenmynie did you have to configure HA to update each MODBUS register individually or is the setting applied golbally to all registers?

Would you mind sharing your yaml you used?

I’ve been trying to do the same but havent gotten it working yet.

I just did it in my config file before I add the bunch of registers:

sensor:
  - platform: modbus
    scan_interval: 5
    registers:
    - name: AC Consumption
      ...

Sorted it, thanks.

I was overthinking it completely and missed the forest for the trees.

Cheers.

Great! Glad it worked!