Monitor a device in real time automatically

I have two IotaWatts monitoring several circuits in my home. One of those circuits feeds the double wall ovens in the kitchen. Yesterday, we inadvertently left the house with the oven on. I would like to used the information coming from the IotaWatt, in conjunction with my alarm panel and home automation system to let me know if the oven is on when I arm the alarm system. I have done a similar thing with my gas cooktop, where I have a detector that “knows” when the gas is on, so when we set the alarm to leave the house, or go to bed, my home automation system speaks over the load speakers telling me the gas is on. I would like to do the same with the electric ovens.

So my question is this: How do I pull the data from the IotaWatt in real time and send it to a RaspberryPi so I can process it in near real time?

There is a query API described in the docs. Ovens usually cycle the heater between cut-in and cut-out temps, so real-time won’t necessarily tell you if it is on. You would need to add some intelligence. If you were to determine, for instance, that the oven will cycle at least once every 5 minutes, you could query for the average over the past minutes.

Thanks for the tip on the API. I will definitely

look into it.

Yes, I was planning on averaging the data over about five minutes. Since the oven draws close to nothing when off, if this average is above 100W, then I will be pretty sure that the oven is on.

As you can see from the graph, it draws over 4kW when ramping up and you can see the overshoot (and hysteresis, as expected) before it settles down. When it turns off (shortly after 17:00, you can still see some power usage, which is the fan that runs a while after shout down.