Flashable UK smart plugs

I know this was requests for plugs and not sockets. Have flashed these sockets with esphome, and they look nicer than plugs. Do cost a bit more though, but the USB charger comes in handy.

Smart WiFi Double Socket + USB (White Body)

Same here, I got mine from ebay:

https://www.ebay.co.uk/itm/USB-WiFi-Smart-Plug-Socket-Wall-Power-Switch-APP-Remote-Control-Outlet-Switch-ou/124213187225?_trkparms=aid%3D1110006%26algo%3DHOMESPLICE.SIM%26ao%3D1%26asc%3D225114%26meid%3Dc7b547fa76904cefbb4a4a937d883236%26pid%3D100005%26rk%3D2%26rkt%3D12%26mehot%3Dco%26sd%3D312730779895%26itm%3D124213187225%26pmt%3D1%26noa%3D0%26pg%3D2047675%26algv%3DSimplAMLv5PairwiseWebWithBBEV1Filter%26brand%3DUnbranded&_trksid=p2047675.c100005.m1851

I can vouch for these. Flashed via serial, haven’t tried tuya-convert. Without practice they’re hard to open without damaging them. If I was going to fault anything with them it would just be the width - You can’t get them side by side on the average trailer socket. I haven’t tried on a two gang wall socket but reckon that would be tight also. Great for the price.

New to energy monitoring plugs though and just used the calibration settings here but on a 2kW heater they report 2150W where my TP-Link plug gives 2250W. Something I plan on investigating further at some point. Does anyone know, would the calibration settings be different for all Maxcio units, or are they just one size fits all/specific to certain chips?

Gosund UP111 (same as 2Nice) are great also. Got mine on Amazon, 4 for £25 a couple weeks ago. Used tuya-convert as they looked tricky to get into without damaging them, worked great. 13A rated but as I’ve not opened them I haven’t seen the internals.

Much better form factor though than the Maxcios; they’ll go in trailer sockets side by side and don’t obscure switches.

I’ve got four of these UP111 smart plugs and they work very well with home assistant. I’ve taken the code from @mikebell above and added a couple of lambda expressions to show apparent power and power factor. I’m wondering if its possible to make the red led flash quickly if the plug loses wifi signal? So far it seems ok. Anyway, this is my current code:

esphome:
  name: plug1
  comment: 2Nice UP111 01
  platform: ESP8266
  board: esp01_1m

wifi:
  ssid: ""
  password: ""

# Enable logging
logger:

# Enable Home Assistant API
api:
 
ota:

time:
  - platform: homeassistant

substitutions:
# Unique ID for Sensors.
  switch_id: "plug_04"

binary_sensor:
  # Push Button
  - platform: gpio
    id: ${switch_id}_in_switch1
    internal: true
    pin: GPIO3
    name: " Switch 1"
    filters:
      - invert:
    on_click:
      min_length: 50ms
      max_length: 350ms
      then:
        - switch.toggle: ${switch_id}_out_relay1
  # Template Sensor - Tracks Relay, Switches LED to Match (Internal Only)
  - platform: template
    name: "${switch_id} Template 1"
    id: ${switch_id}_template1
    internal: true
    lambda: |-
      if (id(${switch_id}_out_relay1).state) {
        return true;
      } else {
        return false;
      }
    on_state:
      - if:
          condition:
            - binary_sensor.is_on: ${switch_id}_template1
          then:
            - switch.turn_on: ${switch_id}_out_led
            - switch.turn_off: ${switch_id}_out_led_red
      - if:
          condition:
            - binary_sensor.is_off: ${switch_id}_template1
          then:
            - switch.turn_off: ${switch_id}_out_led  
            - switch.turn_on: ${switch_id}_out_led_red

switch:
  # Restart Switch in HA
  - platform: restart
    name: "${switch_id} Restart"
  # Relay Output
  - platform: gpio
    pin: GPIO14
    id: ${switch_id}_out_relay1
    name: "${switch_id} Relay"
  # Blue LED Output
  - platform: gpio
    pin: GPIO1
    internal: true
    id: ${switch_id}_out_led
    inverted: yes
    name: "${switch_id} Touch Status Led"  
  - platform: gpio
    id: ${switch_id}_out_led_red
    name: "${switch_id} Touch Status Led Red"
    pin: GPIO13
    inverted: True
    internal: true
    restore_mode: ALWAYS_OFF

sensor:
  - platform: hlw8012
    sel_pin:
      number: GPIO12
      inverted: True
    cf_pin: GPIO04
    cf1_pin: GPIO05
    # Calibration
    current_resistor: 0.0025 # Value of shunt resistor in ohms (higher value gives lower watt readout)
    voltage_divider: 880 # Resistance ratio of internal voltage divider resistors (lower value gives lower voltage readout)
    # Other person has:
    #current_resistor: 0.00221
    #voltage_divider: 871    
    current:
      name: "${switch_id} Current"
      unit_of_measurement: A
      id: "energy_temp_Amperage"
    voltage:
      name: "${switch_id} Voltage"
      unit_of_measurement: V
      id: "energy_temp_Voltage"
    power:
      name: "${switch_id} Power"
      unit_of_measurement: W
      id: "energy_temp_Wattage"
    change_mode_every: 8
    update_interval: 10s
  - platform: total_daily_energy
    name: "${switch_id} Total Daily Energy"
    power_id: "energy_temp_Wattage"
    filters:
        # Multiplication factor from W to kW is 0.001
        - multiply: 0.001
    unit_of_measurement: kWh
  - platform: template
    name: "${switch_id} Apparent Power"
    unit_of_measurement: VA
    lambda: return id(energy_temp_Voltage).state * id(energy_temp_Amperage).state;
  - platform: template
    name: "${switch_id} Power Factor"
    lambda: return id(energy_temp_Wattage).state / (id(energy_temp_Voltage).state * id(energy_temp_Amperage).state);

Hi,

I have tried the following and would comment as follows:

Sonoff Basic flashed with Tasmota - not strictly a plug but probably the cheapest option for more permanent installations.

Sonoff S20/S26 flashed with Tasmota - although these are on the large size they are good value and work great. The S26 is a little bit harder to flash as it requires some soldering.

Sonoff S26 with with Sonoff LAN HACS Integration - works but I have experienced some problems in local mode when external access is blocked in my firewall (external DNS queries and regular reconnections to my WiFi but it still seems to work fine).

Meross MSS210 - works well with the Merross Cloud IOT HACS Integration (but obviously not local).

Teckin SP27 via the Tuya Integration - initially tried to flash these with Tuya Convert but it failed as they do not use an ESP8266 chip. I think I found them to be a bit tempromental when I originally tried them so they are not currently used (also not local).

Gosund UP111 flashed with Tasmota using Tuya Convert - these are my favourites as they are small, include power monitoring, and I picked up a pack of 4 for only £29.99 including delivery on the Amazon UK website.

To keep this up to date - I’ve just Tuya Converted another batch of 4 of the round 2Nice plugs from Amzon, QS-WIFI-D01-TRIAC dimmers, QS-WIFI-S03 and QS-WIFI-S04-2C switch modules , from Ali Express.

2Nice plugs with power monitoring


QS-WIFI-D01-TRIAC Dimmers

QS-WIFI-S03 Switch modules and QS-WIFI-S04-2C Dual Switch module

Just to keep the story going, as there’s a worry that these devices are moving away from flashable ESP8266-type devices, I’ve just received and flashed two of the UP111-4 plugs from this Amazon listing.

One went straight through the tuya-convert process with no issues to a basic Tasmota firmware which I then upgraded to ESPHome (with Setoption 78 1 needed on the interim Tasmota firmware to allow the upgrade: see here).

The second device was a bit more troublesome but converted in the end: not sure what the difference was. Just one of those things.

Both are now live in my Home Assistant and ESPHome dashboard and working well.

2 Likes

+1 for the Gosund plugs. A four pack is currently £36 but the price varies a lot. I picked up some just before Xmas for £25.50 (though you can see they have been as low as £24)

No issues Tasmota’ing them, though occasionally a sticky one needs a couple of tries

As a long term Tasmota/mqtt user I have never really looked at ESPHome. What are the advantages?

Everyone will have their own views. I started with Tasmota/MQTT and moved to ESPHome because I like the flexibility you can build in with the EPSHome YAML. E.g. a specific plug for our Iron that has always turns off after an hour to avoid it being left on. I had some devices with sperate MCU dimmers that ESPHome enabled me to talk to (tasmota has since had these added natively). I have some devices with built in automations (Sonoff mini that controls an extractor fan and has some logic detecting a connected water flow meter… I have used ESPHome to create a very custom multiway switch panel with addressable LED indicator lights that read status back from HA. Similarly an esp32 running ESPHome that reads my old alarm PIRs and emulates an Alarm.

The more basic customisations could almost certainly be done with Tasmota scripts but I didnt find them very user friendly.The more complex ones really use quite a lot of ESPHome’s automation with and ability to include snippets of actual C code to complete some functions.

If possible I try and keep specific automations local to the relevant device - rather back everything off to HA. So if there is a server issue as much as possible continues to “just work” until HA is back.

I invariably use Tasmota though when looking at new devices to very quickly cycle through different pin combinations - and to load as a generic firmware that then allows me to connect, add wifi etc and then OTA change to ESPHome in some cases.

On the downside of ESPHome - I do get duplicated devices sometimes and changing IP address can be a nightmare if you dont get the process right.

Sometimes the native HA API connection feels quicker than MQTT but I have never measured or attempted to quantify if that is actually the case. If the “out of the box” functionality is there in Tasmota and works the way you want it, there may be little reason to change.

1 Like

Also thanks for updates on the Gosund plugs. Always great to know there are current options avaialble.

1 Like

I can also add that the Gosund plugs (UP111-4-UK) from Amazon are still flashable. Done last weekend using the Tuya-convert method with RPI zero w. fWhile we were on the subject, did anyone succesully flashed any smart LEDs with the Tuya-convert tool?

What sort of Smart LED ? I have just done a couple of BTF SP501E addressable LED controllers - but they’re a (very quick and easy - with good solder pads) solder and serial job as they run a non-tuya firmware.

Im actually looking for light bulb b22 but it’s not the place to talk about it :wink: :joy::joy:

The Gosund 4 pack is down to £28, which isn’t bad.

In case it helps, this is the page for the Tasmota configuration (for correct reporting of power etc, and getting the led to work). Go to Configure, Configure Other then paste in the string, make sure Activate is ticked and Save. Note that this page reports successful flashing on a pack purchased on 14 Jan this year.

I am half way through replacing all my old Sonoff Basics with these, as they seem more reliable (and safer!)

I bought a 2 pack of the gosund up111 plugs and got them yesterday. Tried to flash them via tuya convert but they keep coming up with an error:

Failed to connect to 10.42.42.42 port 80: Connection refused Could not fetch a complete backup

Anyone else had this and know a workaround?

I’ve occasionally come across issues like this. I never managed to get to the bottom of why it happened, but always managed to solve by trying different devices to do the flash

I have also read that you can try connecting to the plug with a different device and deleting backups, but haven’t done this myself

(See eg https://github.com/ct-Open-Source/tuya-convert/issues/613)

Yeah I am using a different laptop from what I’ve used before so maybe that’s it, I’ll give it a go with a different device. I had found the thread you linked but all it says is ‘turn it off and back on again and it worked’ unfortunately it didn’t for me! Thanks for the reply though

1 Like

A pair of Gosund-111, received today from Amazon https://www.amazon.co.uk/gp/product/B0856T6TJC/ have been successfully flashed.
Not without issues though, for the 1st plug the 1st attempt ended in “Device did not appear with the intermediate firmware” . But after “Do you want to try flashing another device” I answered Y and the flashing went on. This seems to me a known case.
The second plug flashed without issues.

2 Likes

Yes, I had the same experience - I’ve bought 8 of them in the past week and flashed the majority - I had the same experience with half of the plugs I flashed.

Successfully flashed 4 gosund plugs from amazon uk today.
Also found that you can buy similar devices preflashed with tasmota on ali express:

https://www.aliexpress.com/item/1005001880012237.html

May be a good option when tuya-convert nolonger works!