Thank you, much appreciated and interesting reading.
Ideally I guess I should set up a NUT server on my unused pi 3. However, it seems to me that the primary issue I'm facing (HE hubs in limbo until manually restarted) is somewhat of an edge case in that power needs to be restored during the relatively short window between the time the hubs are told to shut down and the time the UPS actually runs out of power.
Setting up NUT on a pi is probably not all that big of a deal, but I could also solve the issue by putting the whole network rack on a z-wave switch paired to my alarm system. My alarm system is rock solid and only depends on the cell network, so if this happens again I could just shut down the whole network for 20 minutes or so until the UPS runs dry.
Maybe I'll do both; being able to remotely toggle power to the entire network might come in handy someday for other reasons.
I ended up putting it in the crontab to do this operation every 10 minutes, because I can't get it to work. Sometimes it goes on for an hour without a problem, but I spend most of the day in this situation, and thus without proper monitoring.
I've tripled the parameter times in all the NUT configurations, and in the case of HOSTSYNC it's 30s.
A bit outside the bounds of the Hubitat driver, however you can find example instructions here. For followup on the diagnostics, you probably should head to the NUT user list.
I want to make a request. I couldn't find this in the thread. If it's there, please point me to it. Is there any way to expose the upsd connect state as an attribute that rule machine could access? I would like to make a rule that notifies me that the upsd connection is not “true” because sometimes I find it not connected and therefore the power rules are not trustworthy. It would also help me troubleshoot why sometimes I see this in a non-connected state. If you wanted to take this request to the next level you could write a routine that automatically sends a message to either pushover or some other notification message methodology when upsd connection is not true after so many attempts or after a period of time.
Yes, thanks for the reply. I have looked at at the code and I can use those. I just thought it might be more straightforward to get the direct message from the Upsd.connect string than those but if that is reliable then that is good. Will the power source always be unknown if upsd state is other than true? If so then I can rely on that.
You will see 'unknown' if the hub driver has no connection to upsd or if upsd does not know the state of the UPS. Otherwise, you will see 'mains' or 'battery'.