Always On Automation for Critical Devices and Unavailable Alerts

I was just realizing that I have introduced an failure in my home because I put energy monitoring on things like my fridge, freezer and furnace. This introduced the following:

  • After Power Failure Plug does not default to the On state
  • An automation with bad logic or targeting turns the virtual switch off
  • Someone or something hits the power button on the plug
  • The energy monitoring hardware dies

These are all real things that can happen just because I want to know how much energy my freezer is using. This also excludes other things that could make my freezer die like

  • Compressor Goes
  • Door left open
  • Temps rise for some random reason

So I wanted to create an automation for each device so that if anything does happen it’s self monitoring and can alert with any problems it cannot fix.

So some solutions to some of these problems are as follows:

The entire top list can be prevented if you just don’t put an energy sensor INLINE with your freezer power. But of course we want to monitor energy usage so how do we do that if not inline. A CT clamp is the answer but now you have to decide where to put it. If you have multi items on the same circuit then putting it at the electrical panel won’t give you a true reading of just the freezer but it is an option. You can make or buy an AC line Splitter so that you can measure the energy at the device. The problem with these solutions is that to calculate energy consumption you must know the voltage. Sure you could just say 120 but it will really throw off your monthly calculations but to each their own I guess if that bothers you or not. you will need a power supply or a battery for the CT clamp. IT is just a real huge PITA but some people say its 100% worth it for peace of mind. They are not wrong but everyone’s comfort level is different. I am perfectly okay with this others will think I am crazy for introducing a failure point. To me because I am protecting for this failure also allows me to protect for things that I didn’t introduce like compressor failures or other issues. Also MAKE sure in the settings for your device that you set your plugs to auto turn on after a power loss. Most Zwave devices have this. I have Kasa TP-Link plugs that also have this feature but you have to use their app to set it!

On to the solution

My first trigger is if the device becomes unavailable for more than 15 minutes. I don’t care what the previous state was, all i care is that its current state is unavailable. I gave it a Trigger ID of “Freezer is Unavailable”

Then I create another trigger so that it is triggered when the plugs state changes to “off”. Again give it a nice Trigger ID

Now to actions:

Because I used “Trigger IDs” above this allows me to use the choose option to do something based on what trigger ID was triggered. This allows you to create a single automation that can do multipool things based on what triggered it keeping your automations grouped if you like.

Also by using descriptive names above it makes the choose statement almost read like english and it is very easy to see what it is doing

The one for if triggered by Freezer is Off is simple… just turn it back on!

Now the one for if the Freezer is Unavailable is a little more complex. We could just send a single message and hope for the best but there is $500 of food in the freezer if we miss that message so it’s a little more important to make sure the user get this message. We setup a loop so that every 5 minutes it will send us a message until it has resolved (aka freezer is on again) or till we disable the automation

I do have Google Home speakers in the house I might add some audible alerts and as well I have Inovelli switches that have bar leds on them that I also might pulse red…

To also address the other issues that might arise with the freezer I have a ESPHome Temp probe for the freezer that will alert me in the same ways in the same automation. If temp goes above -5c for more than 15 minutes do the same alerts to my phone. I personally create one automation for each critical device in my house! I don’t want to lump all critical devices so that a failure in one does not prevent a failure in another!

Would love to hear feedback what else I should be monitoring for on the freezer or if there is better logic to use for detected off or unavailabel!

PS I just found out you can get ESP Energy Monitor plugs with NO relays in them!! With these there is no possibility to have them accidently turned off but there is still a possibility that they can fail so the automation is still worth having. Also not sure if they use the same housing for both because the photos do show a power button but my guess it does nothing? I am still waiting for confirmation form them!

You creating a problem that wasn’t present before. Ether use a smart plug that you can configure to be always on :point_down:

Which can be any ESPHome compatible device but probably not (m)any matter ones :person_facepalming:

Or use something without relay (could even be a matter certified device in that regard :see_no_evil:)

Yes everything you just stated was in my post above not sure why you’re saying the same things? Am I missing somthing?

Yes I stated that above…

Again stated above

Actually to add to this. AtHom makes a Non Relay energy monitor, in this case there is no way to accidently turn it off. But question is if their hardware fails would power continue to flow? Unless they are using some kid of ct clamp to measure the Amps they have to break the circuit with their circuit to measure the amps… So if their hardware died would it still work because if so that would be awesome and would prevent this issue!! Also even with the energy monitor plugs with a relay they should make ones that fail ON not OFF for critical devices. These kinds of devices are always on anyways so there is no need to turn them off and if that circuit ever fails it would just keep the relay failed to ON… this would solve the issue of a failing energy monitor for critical devices…

I ran into an unexpected failure. The power supply on my server died and this is where the zwave stick was - so the stick was offline. I was away. After 5 days every Aoetec Smart Switch 7 turned off on its own. Which turned off the router and modem. So yeah, you really can’t trust these things to work.

For critical loads like sump pumps, well pumps, furnace I use CT clamps.

I’m switching the the modem over to a zen17 and using the normally closed relay to power it - such that if the zen17 fails the modem will still be on.

Weird why would your plugs turn off all by themselves I get controller was not there but that should not cause them to do anything different.

Also yeah that sucks I’m going to be going with non relay devices.

How did you add CT clamps to your devices and power them?

The device must have made that decision on its own. I have a case open with Aeotec. I suppose it could be considered reasonable behavior to have the switch go to a safe mode (off), if the controller is unavailable for a long time. But it should be documented and ideally configurable via a config parameter.

There are many choices for CT clamps. For the utility mains, furnace and well pumps I put the CT clamps in the electrical boxes since there was room. For the sump pump there was not, so I mounted an electrical box, put a receptacle on it, ran a power cord into it and put the CT clamp inside. In all these cases the power is directly wired with no smart stuff in between. I the run 20 gauge signal cable from the CT clamps back to a modbus analog I/O module where the CT signal (0-10v) is received. The HA modbus integration reads it and scales it into a current reading. I can scan these at 5-15 seconds since it’s on Ethernet. Since all these devices are in the basement utility rooms it’s a reasonable solution as the signal cable runs are not long (or going through walls). There are wireless CT devices like this. Since it’s zwave it’ll need to be configured for a slower update rate. I haven’t tried it but it certainly looks attractive.

You can also just use a device you can fully own and control, that’s how we do it for maximum resilence. :muscle: Over 5 year journey with esphome devices and despite many power outages over the years everything does behave exactly like expected/configured :raised_hands:

For espHome the equivalent would be the WiFi/AP timeout setting which is completely the choice of the user (by default it just restarts the device after x minutes when not connected to WiFi/HA) :gear:

We get it you love local and configurable. Not everyone chooses this path or wants to throw out everything they have for something new. There are pros and cons to each. I love ESPHome for the exact reasons as you but just telling everyone the solution to their problem is using a different device that is “in your opinion” a better device is not a solution. Not trying to be rude here but every response to everything anyone has posted has been this. EG My Windows machine has a virus I need to get help fixing it" , “Well if you had a Mac that wouldn’t happen…” not really a solution…

Yeha 100% agree, there needs to be more documentation as to how the logic of these devices are programed so a user can be aware of them and adapt to them

I talked to AtHom about their non relay ESPHome Plugs that do energy monitoring and they told me that if their hardware fails it will NOT effect the plug functioning. I’m like “put this on your page… this is really good information!” I think there is a blindness by these people in knowledge that they just assume this knowledge is table stakes and you should know it if using this stuff.