Smart plug without actor

There are many smart plugs out there with child lock on them, so they cannot be operated via physical button but only software.

Child lock would be enabled via software again, so it can’t be disabled physically (other than removing the plug :slight_smile: )

Why not use a energy meter instead of a smart plug?

3 Likes

The physical button is not the only problem. Often these plugs can turn off after power was restored or something … and sometimes things in Home Assistant go wrong and signals are sent (or I do something stupid and forget about it).

I don’t want to cut wires so a plug is a good option for monitoring without interference. Or could you give an example what you mean?

https://www.shelly.cloud/en/products/energy-metering-energy-efficiency#unfiltered

2 Likes

I am always interested about these products but not quite sure about how precise they are. do you have any experience on this?

I think there are settings in Tasmota plugs (in the plugs, not in HA) to prevent them being turned off, and to ensure that they come back “on” after a power outage.

As an alternative, you might be able to create a virtual sensor using the HACS integration PowerCalc.

1 Like

Hi Martin, welcome to the forum!

A reminder: you are using a system (HA) that can control these things with automations and notify you when needed and also as Stiltjack is saying, it might be possible to tweak that behavior as well.

1 Like

What @nickrout suggests is the ‘right’ way to go. Clamp style meters get your information when you have no intent to switch the load. Cost reduction on the electronics, You likely won’t find a cheap pocket socket that can’t be turned off without serious modification ( which would mean the tasmota option - which involves reflashing the device) or building your own DIY device - likely an esp32 driven clamp style meter.

With a meter in most cases you don’t cut any wire. The sensor clamps around the conductor and measures power through induction.

Depends on which products you ask about.

Power mettering like. The clamp meters Nick shows are quite good. End device metering can be good or bad. My experience is it really depends on the vendor and thier priority making the product.

With dedicated energy metering like what built in a SPAN panel or a clamp meter id be comfortable with accuracy good enough to use as a billing source

With plugs and individual bulbs and miniaturized consumer level devices I wouldn’t be comfortable billing someone based on the reading but it’s definitely accurate enough to tell you where most of your power goes in your home

1 Like

The problem is that many plugs are acting randomly after a power cut if they are not properly controlled by firmware. Which means that part cannot be simply removed from Tasmota or ESPHome. And I witnessed these firmware failures quite often. And the non existence of a switch should also prevent a user error. I cannot accidentally turn off a switch if there is no switch.

For using PowerCalc I would have to know when the devices are doing something. E.g. a refrigerators power consumption depends on the mode, the environment temperature and the stored content.

PowerCalc is nice for lamps, for fans and some other stuff but the requirement is always that you somehow already meter if something is turned on or off.

That looks really interesting and I will have a look at it. How are there devices powered. Do the draw power from the cable they are clamped to?

They are generally powered from thier own source. The ones that install in breaker boxes usually do get wired in. But some have external ac or DC power supplies.

The whole point of a clamp is it doesn’t interact with the power it’s metering and therefore is even appropriate for large loads without transferring shock hazard.

Having said that never open circuit a clamp. It is dangerous.

1 Like

Can’t ESPHome just be programmed without the switch functionality?

What about setting output_high on the relay pin?

You have to put the clamp around only 1 conductor so, on an appliance, you’d have to peel back the outer insulation and clamp to either line or neutral only.

The firmware takes over some time after the plug is powered on. So there is always a short period where the plug is not controlled by the firmware. That’s the problem. During this time anything can happen. And sometimes the defined status isn’t applied afterwards properly.

You’re right about user errors. Removing switch functionality would prevent them.

Depends on your device.

1 Like

Did you detect this behavior with or without the early_pin_init setting?

  • early_pin_init (Optional, boolean): Specifies whether pins should be initialized as early as possible to known values. Recommended value is false where switches are involved, as these will toggle when updating the firmware or when restarting the device. Defaults to true.

ESP8266 Platform - configuration-variables — ESPHome

Did you dig in deeper here already? Logs, bug report etc.?

I had this config in the past for a “always on” switch with “reset” function. It’s not possible to turn the switch off (not exposed) but only to “reset” it (turns off the relay, waits 20 seconds, turns the relay on again).

Never had problems that the device had the load off at some point (early_pin_init is default on)

esphome:
  platform: ESP8266
  board: esp01_1m
  name: ...
  on_boot:
    priority: -100
    then:
      - delay: 10s
      - switch.turn_on: relay

switch:
  - platform: gpio
    pin: ...
    id: relay
    on_turn_on:
      then:
        - binary_sensor.template.publish:
            id: relay_state
            state: ON
    on_turn_off:
      then:
        - binary_sensor.template.publish:
            id: relay_state
            state: OFF

binary_sensor:
  - platform: template
    name: "Relay State"
    id: relay_state

button:
  - platform: template
    name: "Relay Load Reset (20s)"
    on_press:
      then:
        - switch.turn_off: relay
        - delay: 20s
        - switch.turn_on: relay