Deltaco SmartHome

If someone is interested in reflashing these cheap devices, I’ve put together a little guide.
Product site: https://www.deltaco.se/Sidor/deltacosmarthome.aspx

Guide: https://www.magnus.tech/reflashing-deltaco-smarthome-sh-p01-with-tasmota/

6 Likes

Or you can just use tuya-convert to flash these devices. No soldering and no breaking of cases. I have successfully flashed SH-OP1 and SH-LE27RGB. I have ESPHome configurations for these devices if anyone is interested.

2 Likes

Where can you find this tool? Tuya-convert?

Im interested!

https://github.com/ct-Open-Source/tuya-convert

1 Like

Sure, here you go:

esphome:
  name: smartplug_deltaco_1
  platform: ESP8266
  board: esp01_1m

wifi:
  ssid: “…”
  password: “…”

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Smartplug Deltaco 1"
    password: “…”

captive_portal:

# Enable logging
logger:

# Enable Home Assistant API
api:
  password: “…”

ota:
  password: “…”

binary_sensor:
  - platform: gpio
    pin:
      number: GPIO13
      mode: INPUT_PULLUP
      inverted: True
    name: "Deltaco SH-P01 Button"
    on_press:
      - switch.toggle: deltaco_relay_1
  - platform: status
    name: "Deltaco SH-P01 Status"

output:
  - platform: esp8266_pwm
    id: deltaco_smartplug_blue_led
    pin:
      number: GPIO5
      inverted: True
      
switch:
  - platform: gpio
    name: "Deltaco SH-P01 Relay"
    id: deltaco_relay_1
    pin: GPIO12

light:
  - platform: monochromatic
    name: "Deltaco SH-P01 blue LED"
    output: deltaco_smartplug_blue_led

and the RGB+CCT bulb:

esphome:
  name: light_deltaco_9w_rgbww_1
  platform: ESP8266
  board: esp01_1m

wifi:
  ssid: “…”
  password: “…”

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: “…”
    password: “…”

captive_portal:

# Enable logging
logger:

# Enable Home Assistant API
api:
  password: “…”

ota:
  password: “…”
  
output:
  - platform: esp8266_pwm
    id: output_green
    pin: GPIO4
  - platform: esp8266_pwm
    id: output_red
    pin: GPIO5
  - platform: esp8266_pwm
    id: output_ww
    pin: GPIO12
  - platform: esp8266_pwm
    id: output_blue
    pin: GPIO13
  - platform: esp8266_pwm
    id: output_cw
    pin: GPIO14

light:
  - platform: rgbww
    name: livingroom_lamp
    red: output_red
    green: output_green
    blue: output_blue
    warm_white: output_ww
    cold_white: output_cw
    cold_white_color_temperature: 6500 K
    warm_white_color_temperature: 2700 K
    restore_mode: ALWAYS_ON
    effects:
      - random:
      - strobe:
      - flicker:

2 Likes

Thank you!
I’ve ordered a couple of these and am looking forward to trying this out.

Is the procedure as easy as it seems on the Tuya Convert-page, and did you use the included Tasmota-firmware and flashed ESPHome from there?

I also ordered the version of the plug with energy monitoring (SH-P01E). Do you know if this is using the same GPIOs as the SH-P01 or how I can access the energy reading?

I would say the process is quite easy. Just don’t install the Deltaco app (I think it can stop tuya convert from working). Yes, I flashed the included Tasmota firmware first. Tinkered with tasmota to figure out the gpio configuration and then created the ESPHome config and flashed that.

I have no SH-P01E, but I’m guessing it will be pretty similar to Teckin SP22, Blitzwolf SHP2 / Gosund SP1. Just look qround for Tasmota/Espurna configs for those to figure out the energy/current/voltage reading. Here is an article I found about calibrating the plugs that could be useful to you:


Good luck! :slight_smile:
1 Like

I just flashed a Deltaco SH-P01E using Tuya-Convert. As @m0by suggested, I used the Gosund SP1 configuration, and it is working fine with that. However, remember to do the power monitor calibration.

2 Likes

Very cool!

I have now flashed both a relay and a bulb with @m0by’s settings, and they are working excellent.
Looking forward to trying with the energy monitor. Thanks for the pointers!

1 Like

Saw that there were some smart home stuff from Deltaco on sale for Cyber Monday here in Sweden, so was wondering if it could be used with Home Assistant, and found this thread. Thank you, I have now ordered 2 of each, SH-P02 and SH-P03USB.
Going to be used for “Dumb” christmas decorations.

I would love if you would share you configuration if you get it working :pray:
I haven’t managed to get full functionality of the SH-P03USB with neither ESPhome or Tasmota.

Still waiting for it to arrive, I hope it will work. :wink:

Hi Marcel

Regarding the calibration, could you post your results for calibration - I guess all SH-P01E’s should use the same if I am not mistaken, it would save other users including myself a small amount of time.

Thanks in advance.

I wasn’t extremely precise when I did the calibration because I only want to measure whether the pump I have connected to the plug is on or off. But with the following settings, it’s accurate to within a couple of percent (at least compared to another energy meter I have):

VoltageCal 4816
PowerCal 69406
CurrentCal 4245

It would be interesting to hear whether these parameters actually work for others.

I have tried to use tuya-convert on two Deltaco SH-P01. However, they show up on other IP-addresses, and not the required 10.42.42.42, so I am stuck there. Does this mean I need to get my soldering iron…?

Have you tried putting the phone, the linux device and the plug really close to each other (as requested in the Tuya app when pairing the plug with original FW) ? I solved issues for me.

I paired two plugs with original app first (before I found Tuya convert), and successfully used Tuya convert to put in ESPhome binaries directly. So it is possible, with the preprogrammed FW, but it is possible that a FW update from Tuya will remove the possibility.

I couldn’t get tuya convert to work with my SH-P01E plugs so I resorted to soldering and flashing.
For those wondering, there’s two philips head screws beneath that oval/rectangular plastic piece on the plug. When removed the casing comes apart. Then there’s two screws holding the circuit board to the “prongs”.

The IO0 pin only needs to be grounded when connecting the device to +3.3V for flashing, don’t solder it and break the solder pad as I did, simply hold a cable while connecting vcc to +3.3V.

I have Deltaco latest fw as of 2020-01-10 backed up om disk if anyone needs.
Couldn’t get higher baud than 57600 on my rpi zero w I used as programmer, most probably because of my shitty soldering.

Edit: also, I used esptool and had to use: --before no_reset

Any news on flashing an SH-P03USB? :slight_smile: