Event detection and notification

I want to measure the temperature inside a deep-freezer and have HE send a notification (web server, SMS, email, etc) when:

  1. The sensor did not provided values for a specified time duration. [off-line event]
  2. The temperature value was above a specified upper limit. [freezer malfunction]
  3. Repeat the notification periodically during the duration of an off-line event. [nag]

Can all this be done?

What type of sensor is it? I e. Brand / model?

Yup. @bertabcd1234's device activity checker can take care of #1 as long as the device provides some sort of regular reporting and can be triggered by a virtual switch. If you were to set up a rule to turn on the switch every X minutes it should repeatedly notify you of any device that meets the inactivity conditions you have set up. So that takes care of #3. #2 is simple with the notifier app.

1 Like

If the temp remains relatively constant it may present as no activity though. . That's why I was wanting to understand what driver may be used and whether other attributes may need to be monitored ...

My suggestion, based on what you said:

Trigger: Temperature *changes*

Actions to run:

IF (Temperature > UpperLimit) THEN
  Notify: "Temperature is %value%"
Wait for event: elapsed time --> 4:00:00
Notify: "Temperature has not reported in four hours."

You can customize this according to exactly what you want, but that's the general idea (you can hard-code UpperLimit or use a variable if you want it to be easily changeable). This also assumes your sensor regularly reports temperature; many won't if the value doesn't actually change, which for a freezer that normally stays around the same temperature could easily be the case. There are other events, like battery reports, that may still generate "activity," though this rule does not account for those as-is.

What I'd really probably do is split this up; the built-in Notifications app can handle the notification portion, and you can do some customizations more easily there, like "only notify x times in y minutes" and whatnot. Then, you can use an app like Device Activity Check (which someone mentioned above--thanks!) or Device Watchdog as part of a way to guess if your device may have fallen offline.

But...if you just want something basic, the above will do, too.

1 Like

Yeah good point though I do precisely this in both fridges and freezers and there's enough temperature variation in the natural course of events to get alerts regularly.

1 Like

Also both available, I should mention. I use a combination of Twilio for text messages and Echo Speaks for notifications. I occasionally use a small siren, depending on the nature of the alert. Ice cream's about to melt? Sound the klaxon.

1 Like

I'm looking at the Owon THS317-ET. According to their datasheet:
Reporting Cycle Temperature/Humidity: 1~5min

The thing to be aware of, but like @brad5 mentioned, probably not an issue, is that if there is no change in temperature, no event will be recorded, even if the device has reported back to HE

I've used two types of devices. The first is the ST multisensor, now made by Aeotec. It is both a contact sensor and temperature sensor. I've also used the ST water leak sensor, now also made by Aeotec. Surprisingly both work even though the sensor is inside the fridge or freezer! Battery life is obviously reduced by the cold, but good enough.

You definitely don't need something that reports all that often. I usually have mine report on a change in temperature rather than a specific time. I think mine are all set to .5 degrees C but I should really bump them up a bit. Even at .5C I get a report every 15 min or so.

1 Like

Download the Hubitat app