How to implement a "timed circuit breaker" for a toaster oven?

hi! Im a noob here and happy to be back on the Home Assistant bandwagon thanks to CasaOS and Docker!

We (I should say I) left our toaster oven on accidentally for 5 hours. Thankfully, no fire :pray:t3:

I installed Home Assistant because the default Meross app only lets you set a timer that makes the oven turn “off” after say 90 minutes. So even if you use the toaster for 10 min, 80 min later, it will turn off and the next time you use it, you have to toggle the switch. Not very convenient.

So looking through all the nifty automation options, I’m sure this can be accomplished in Home Assistant.

I tried to set up one of the cookie cutter automations for the oven to turn off after it’s been on for 90 min and realized we’re not timing a light switch where the timer starts when you turn it on.

What I really want to implement is a “timed circuit breaker” - so the plug is always on (and the oven is often just “off”) and I want to trigger an event to turn off the plug if the plug senses that the oven has been consuming electricity for 90 minutes straight.

What is the easiest way to implement this?

Something I find curious is the smart plug (MSS110QUA) is capable of “knowing” when someone turns on the oven even when the plug is “on” - I know this because the plug is on for hours, you push the button on the oven to turn it on and the plug starts a timer (you can see the countdown start in the Meross app) and turns off the plug in 90 minutes (regardless of how long the oven has been on as I mentioned above) - again, to be clear, the plug when ON, is capable of detecting when the device starts using electricity and communicating this to the Meross cloud/app to trigger the countdown timer.

In Home Assistant, I see “Main Channel” on/off and “Do Not Disturb” on/off for this particular plug.

I’ve tried creating triggers for both channels to see if I could access this smarter behavior built into the plug with no luck.

If anyone can help demystify how to implement a “timed circuit breaker” of sorts, we would be very appreciative and the value of Home Assistant will be bar none!

Any smart plug with power meter built in is all you need. You can then automate stuff with power consumption values as trigger.

Oven draws 1W in stand-by, but maybe 1600 W, when heating.

So just a basic automation would do the trick. If power draw is more than 1000W for 80 minutes, shut the plug off.

And of course, send a message to a phone of it happening. :wink:

Just be careful, when selecting your plug. Not every model is suited for such high powers. Read disclosures before buy.

I just added the plug model to my post: MSS110QUA - I contacted Meross and they said it’s kosher - 1800W is 15A and the plug is rated for 15A.

I don’t see a way to access other attributes in the plug - I only see on/off for the two channels (Main, DND) (which I have no clue why there are 2 channels) as mentioned above.

My question right now is: how can I trigger based on someone turning the oven on (not the plug, it’s always on)?

I manually turn on an outlet for my Coffee Maker to brew, which triggers an automation that turns off the outlet shortly after brewing is done. I resorted to a Timer Helper so if I restart HA while waiting for coffee the maker still shuts off on time.

You’d replace the automation start trigger (& timer duration) with the one you would prefer. . . see if it suits you.

alias: timer.cafe.coffee
description: Coffee maker timer to turn off after brewing is complete.
trigger:
  - platform: event
    event_type: timer.finished
    event_data:
      entity_id: timer.timer_mrcoffee
    id: coffee timer finished
  - platform: state
    entity_id:
      - switch.outlet_po8_mrcoffee
    from: "off"
    to: "on"
    id: coffee turned on
  - platform: state
    entity_id:
      - switch.outlet_po8_mrcoffee
    from: "on"
    to: "off"
    id: coffee cancelled
condition: []
action:
  - choose:
      - conditions:
          - condition: trigger
            id:
              - coffee turned on
        sequence:
          - target:
              entity_id: timer.timer_mrcoffee
            data:
              duration: "00:22:00"
            action: timer.start
      - conditions:
          - condition: trigger
            id:
              - coffee cancelled
        sequence:
          - target:
              entity_id: timer.timer_mrcoffee
            data: {}
            action: timer.cancel
      - conditions:
          - condition: trigger
            id:
              - coffee timer finished
        sequence:
          - metadata: {}
            data: {}
            target:
              entity_id:
                - switch.outlet_po8_mrcoffee
            action: switch.turn_off
mode: single

thanks @bob.t for sharing your automation. I’m reading your code and assume your Coffee Maker is always physically on and you use your smart plug to turn it on and off?

If so, this is the distinction I’m making - I really would love the plug to stay on because the oven itself has its own timer and on/off buttons. I’m looking for Home Assistant to intervene if the oven was left on for more than 90 minutes continuously. Otherwise, business as usual.

and I just did a few more tests - I think I’m wrong about the Meross plug sensing when the oven gets turned on. I think it’s just a simple “turn off the switch after 90 minutes has elapsed” since the switch is turned on (regardless of oven state).

I have a feeling I may need to buy a different plug that allows me to read its electrical consumption as @BebeMischa eludes to - do you have a plug to recommend for this use case by chance? I’ve decided tasmota flashed plugs are probably the way to go and notice some of them are speced 16A (which gives some headroom) - just want to make sure I can read watt usage as you suggested.

Correct. I thought you might find the gist of it useful to consider. :slight_smile:

I can’t see, if your plug has power metering, there is not much technical info to find…

The way I do such things is with plugs, which specifically DO measure the power draw.
Then it is easy as:

alias: Oven watchdog
description: ""
trigger:
  - platform: numeric_state
    entity_id:
      - sensor.smart_plug_electric_consumption_w
    for:
      hours: 1
      minutes: 30
      seconds: 0
    above: "1000"
condition: []
action:
  - data: {}
    action: switch.turn_off
    target:
      entity_id: switch.smart_plug
mode: single

That’s all you need

1 Like

You will definitely need something to tell HA that the oven is on.

A power metering plug is the most reliable way but from the discussion it doesn’t sound like it’s an option.

the only other way is sort of a “semi-auto” method.

You would create an input_boolean that you have to manually turn on when you turn on the over. then if you don’t turn the inpout_boolean back off after 90 minutes have HA turn off the plug.

Again it’s not fully automated but it gives at least a bit of “oops I forgot to turn off the oven” protection until you can get the real feedback sensor worked out.

thank you for all the input and helping work towards a solution everyone!

I just read all the reviews for this Kauf smart plug and what sounds promising is the plug has a “virtual switch entity that turns on when wattage is above a customizable setpoint.” which sounds useful. and thank you @BebeMischa for sharing the automation snippet, that looks totally straight forward and likely what I’ll use. I’ll keep everyone posted.

1 Like

Just after installing the plug, by first use you have to study the power usage behavior. If the power draw is not continuously above 1000 W, we will have to look at the graphs and do some adjustments.
I will then be here too :wink:

I’ve successfully managed to get some stuff going here with this, like turning the HiFi on, when a PC wakes from sleep and turn it off again, when the PC is not running, or finding out, if the wash-dry combo machine is running, centrifuging, drying or finished. All based on power consumption.
So this is manageable too…

1 Like

hey we’ve been running w the Kauf plug for over 2 weeks now and it’s been working really well.

We were able to use the built-in automation creator using the “in use” trigger the plug publishes:

thanks again everyone for all your help!

1 Like