Duty Cycle Alert Option

We recently had a hair straightener get inadvertently left on for almost 24 hours. As can be seen in the attachment, it only spends about 12% of the time actually on and cycles on and off approximately 45 times per hour to maintain temperature. As far as I can tell, there’s no way to configure an alert to tell me that the hair straightener has been left on. One way that this might be done would be add a “duty cycle” option to the alert system. That is, if a given device is on greater than some percentage of time over a defined time interval, then trigger the alert. For instance, in this case, I’d like to get an alert if the hair straightener is on more than 8% of the time over the past hour.

Another way I’d like to do this is to have a duty cycle alert on my water pump, which is connected to a shallow well and can run dry when a faucet or toilet runs out of control. The pump refills a pressure tank, so is also on intermittently. A duty cycle alert would hopefully reduce the chance of the well running dry and the pump losing its prime, which is highly inconvenient and an unwelcome expense to have it reprimed. (That would certainly help with the ROI on the Sense device.)

Of note, this wouldn’t necessarily require a different class of alert. As far as I can tell, the existing alerts essentially correspond to a 100% duty cycle. The UI could just default to that level.




Seems like a good suggestion, but here are a couple questions. This alert seems to require realtime “watching” and calculation. The most complex custom alert today only requires a trigger and then a recheck some length of time later, or a detrigger when the device goes off again. A duty cycle check sounds like it would require continuous recalculation of the duty cycle over the time window you want to use for the cycle measurement ? How often does the duty cycle calculation have to be redone ?

I would draw analogy to the existing alert system. One way the existing system might be implemented is that every time a device comes on, a timer is set for the defined amount of time in the future when the “on” alert should be triggered. If the device turns off before the timer finishes off, the timer is canceled.

In the case of the duty cycle alert, one could take a similar approach. Every time the device comes on, the Sense goes back through the history of the device (up to the length of the the alert time interval), and calculates the time in the future when the duty cycle trigger would be met if the device were to stay on continuously from that point onward. From there, the same logic as described in the paragraph above could be applied.

There would need to be a bit more logic to keep the alert from constantly getting triggered, but that shouldn’t be that much more complicated.

So you are essentially suggesting that the duty cycle metric would be computed at every on transition/detection and then have some hysteresis if the criteria is exceeded, so the alert hangs out for a few minutes to prevent the potential continuous on/off toggling ?

Yes, but a hysteresis metric need not be too complicated and doesn’t need to query historical data.

  • Every on and off event has a timestamp.
  • When a device turns on, notate the time between now and the last time it turned off.
  • Round to the nearest 10 seconds, no need to be too precise
  • If you store roughly 10 of these types of durations as a comma-separated list in a data field, you need only take the statistical mode to find which durations happen most frequently in the group of values.

This duration is your duty cycle frequency.

If the device comes back on within that amount of time, set property to “ON”, If it doesn’t set property to “OFF”.

This property would feed the proposed “duty cycle notification” to let you know the device is still on.

We don`t have a hair straightener but my family always forgets to turn off a toaster or my Breville espresso machine which uses a lot of energy to keep mugs warm. I use a GE smart outlets and programmed it in Hubitat to turn off after being on for 4 min for the toaster and 30 min for the espresso :slight_smile:

Coming at this from a different perspective, do you even need to determine duty cycle? If my hair straightener is 1200W and is on more than 8% of the time in an hour, then it will have used more than 96Wh in the past hour.

I realize there are ramp-up times and all, but it would greatly simplify the trigger if you just said “notify me if this device uses more than 100 Wh in any given sliding-hour-window”.

While I would also like to see a feature like this implemented, this is how I handled the issue with things being left on…

1 Like

If possible, I’d like to have Sense continue to alert me with some user-defined interval (for instance 15 minutes) if the duty cycle continues to be exceeded, because for the use cases I outlined, I want to do everything I can to avoid danger and/or running out of water. Ideally, smartphone vendors would provide a mechanism where for special use cases apps could override any silent/do not disturb signals and make sure an audible alert is given, but that’s a whole other topic…

I’d be fine having the alert be based off a total amount of electricity usage. However, I believe that would be more CPU intensive as it would require continuously maintaining a trailing integral of the watt-hours consumed by a given device. I’m sure that could be done with the existing hardware in a rigorous manner, but it seems slightly more complicated to implement. An alert based on the fraction of time a device is on only requires maintaining a set of previous on and off times within the defined time interval, with calculations performed on that set only needing to be done every time the device comes on.

Correctly configuring either a time-based or Wh-based alert would probably involve some basic calculations, which I’m fine to do either way. I’d just like the feature and would very much appreciate others liking my original post!

I think the watt-hour triggers would be easier to sell to Sense since it seems like they are already set up to calculate and produce this data. The CSV exports have a column for kWh used per device in the time frame you specify for export (hours or days). The GUI also has the “Total usage” and “Est. cost” per device for a variety of time periods, too.

I would also love this feature, regardless. I have an idea of what a normal level of runtime is for many of my devices and being notified when things are potentially wrong is valuable. It feels like this is something Sense would be interested in; one of the videos had the idea of Sense being a “check engine light for your house”. This feature feels like a large step in that direction.

1 Like