Deltaco SmartHome

I bought mine from Mediamarkt (99:- a piece). Kinda expect it’s the same hardware revision though. Bought a P02 a few weeks back from Styrahem, only to realize they switched to a Realtek SOC instead of ESP. I started to suspect they switched to Realtek in these as well, but I just looked up the vendor from it’s MAC address and it was Espressif, so it should be ok.

So far I have only opened and tried one. At some point I figured that I try one just to see and perhaps return the other ones if I had no luck. I did activate this one and added it to the DELTACO app, so I’m gonna try flashing it again.

I’m using a raspberry pi 4t and my samsung mobile as donator device. Do you have the same setup ar something else?

Rpi 3 (running from docker) with iPhone X in my case.

New firmware from Tuya, just bought 2 Deltacos after following this thead and noticed they cant be flashed any more :frowning: read more at https://github.com/ct-Open-Source/tuya-convert/issues/483

2 Likes

Does this mean that we have to wait for a new version of Tasmota or are they now most likely to never be flashed ?

Got a 3pk SH-P01-3P but also no go with tuya convert.

new client on port 443 from 10.42.42.15:19033
ID: 0242416f68626d64366147393149465231a29185a61862a0e3a08b63639651d30cb778467fb5138551f3a9693fce36a9c0
PSK: a2348bad936e6bfe01e64f3893920f43e2b7883a5565dc98bdb7b857b89e94fa
could not establish sslpsk socket: [SSL: DECRYPTION_FAILED_OR_BAD_RECORD_MAC] decryption failed or bad record mac (_ssl.c:1056)

Is there a breaking and entering guide to these? at a glance there are just two pieces to the shell and no accessible screws under non-existing stickers etc.

Edit:
Damn, its glued or welded pretty much 360° around and after getting through that the prongs are soldered to the board with only a cutout to unscrew one of the two prongs. I.e. you have to de-solder the other prong to extract the board. At a glance I couldn’t see any test pads for programming without pulling the board out.

Edit2: adding pictures as this seems different to SH-P01


Anyone had any success with SH-LFE14C35?

How did you manage to open the sh-p01e? The blog post doesn’t exist anymore. Looking to flash two of these via serial since tuya-convert doesn’t work anymore.

1 Like

Hi guys,

Not sure if this helps any of you, but I have a bunch of Deltaco smart plugs that I wanted to get into Home Assistant. I got a tip to try to add them to Tuya directly in the phone app without doing anything – and it worked.

3 Likes

Deltaco SH-P01E Teardown:
There is a “plug” that can be removed (pried off) to reveal screws.
then simply unscrew, and pull the top, off of the bottom.
This one uses a TYWE2S packge, it contains an ESP8285 according to some documentation i found.

1 Like

Damm, I couldn’t just add the SH-P01E to Tuya Smart Home like I could with the SH-P01s.

What is the blog post referred to above for the P01E? Anyway to get them into Home Assistant?

If you have some soldering experience and a programmet, an rpi Will work, you can manually flash tasmota in SH-P01E.

1 Like

Thanks, sorry for not updating, I just tried a few times more the day after and it worked.

Don’t think there is any need to flash the Deltaco plugs to get them into HA, I’ve at least been able to just add them to Tuya and through that integration to HA.

But that of course includes creating an account etc that some don’t, but I don’t care that mcuh about that.

How did you get SH-OP1 open?

I did not open it. I used tuya convert to replace the stock firmware with ESPHome.

1 Like

If you have the round one linke i posted here https://community.home-assistant.io/t/deltaco-smarthome/146101/51 then you quite possible can’t open it non-destructively. I just revisited this to extract the TYWES2 module to use in another Nedis plug from Kjell&Co that had an incompatible module, at least i can salvage something as the shell was destroyed from opening.

If you have the square one others have shown then looks ike just the two screws under the cover.

I’m curious when was the ones that worked with tuya convert purchased; everything I’ve got the last year or so have either been patched or downright incompatible.

I poped out the plastic pice at the bottom to reveal 2 screws.
i posted the picture above.
Hopefully its similar enough to the one you have to help.

I also got a power strip, with this SWB2-1 (LM1) chip inside. For pinout, see this. Flashing went easily, but it behaves very strange, it can be flashed after every power-cycle, regardless of the GPIO0 state. Basically every code works on it until a restart.

Somebody experienced similar behavior with ESPs?

how do I load new firmware into this module SWB2-1? do you have any instructions?
Help FTL232RL and windows esphome flasher
My log lists:

Using 'COM5' as serial port.
Connecting........_____....._____....._____....._____....._____....._____....._____
Unexpected error: ESP Chip Auto-Detection failed: Failed to connect to Espressif device: Timed out waiting for packet header

Yaml in esphome

substitutions:
  friendly_name: ESP-Strip
  device_description: "convert strip Tuya Lingan SWB2-1"

esphome:
  name: esp-strip1

esp8266:
  board: esp01_1m

# Enable logging
logger:

# Enable Home Assistant API
api:

ota:
  password: "6d46e4943a7c28f4a232784e352152aa"

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Esp-Strip1 Fallback Hotspot"
    password: "yE2hgZxfsoks"

captive_portal:

sensor:
# Wifi signal 
  - platform: wifi_signal
    name: "${friendly_name} Signal"
    update_interval: 300s

switch:
  - platform: gpio
    id: led
    pin:
      number: GPIO12
      inverted: true
  - platform: gpio
    name: "${friendly_name} USB"
    pin: GPIO15
    id: plugusb
  - platform: gpio
    name: "${friendly_name} Socket3"
    pin: GPIO12
    id: plug1
  - platform: gpio
    name: "${friendly_name} Socket1"
    pin: GPIO14
    id: plug2
  - platform: gpio
    name: "${friendly_name} Socket2"
    pin: GPIO05
    id: plug3

Wiring
Google Photos

Thanks

EDIT: Ha ha fix reverse pin RX a TX :slight_smile:
And another problem:

Using 'COM5' as serial port.
Connecting....
Detecting chip type... ESP8266
Connecting...

Chip Info:
 - Chip Family: ESP8266
 - Chip Model: ESP8266EX
 - Chip ID: 00FE6CEE
 - MAC Address: 98:F4:AB:FE:6C:EE
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 460800
Changed.
 - Flash Size: 4MB
 - Flash Mode: dout
 - Flash Frequency: 40MHz
Erasing flash (this may take a while)...
Unexpected error: Error while erasing flash: Timed out waiting for packet content

EDIT 2
helped to replace it with another flasher module
Google Photos

EDIT3
full yaml code whit button (click turn on/hold turn off) and add current meter (ads1115 adc and ct_clamp SCT-013-50A)

i2c:
  sda: GPIO4
  scl: GPIO2

ads1115:
  - address: 0x48

sensor:
# Wifi signal 
  - platform: wifi_signal
    name: "${friendly_name} Signal"
    update_interval: 300s

  - platform: ads1115
    multiplexer: 'A0_GND'
    gain: 6.144
    name: "ADS1115 Channel A0-GND"
    id: adc_sensor
    update_interval: 30s
    internal: true

  - platform: ct_clamp
    sensor: adc_sensor
    name: "${friendly_name} Current"
    update_interval: 30s
    filters:
      - calibrate_linear:
          # Measured value of 0 maps to 0A
          - 0 -> 0
          # Known load: 4.0A
          # Value shown in logs: 0.1333A
          - 0.003 -> 0.142
    id: ctcurrent
  - platform: template
    name: "${friendly_name} Power"
    lambda: |-
      return (235.0 * id(ctcurrent).state);
    unit_of_measurement: 'W'
    update_interval: 30s
      
  

# Example configuration entry
switch:
  - platform: gpio
    id: led
    pin:
      number: GPIO12
      inverted: true
  - platform: gpio
    name: "${friendly_name} USB"
    pin: GPIO15
    id: plugusb
    restore_mode: ALWAYS_ON
  - platform: gpio
    name: "${friendly_name} Socket1"
    pin: GPIO12
    id: plug1
    restore_mode: ALWAYS_ON
  - platform: gpio
    name: "${friendly_name} Socket2"
    pin: GPIO14
    id: plug2
    restore_mode: ALWAYS_ON
  - platform: gpio
    name: "${friendly_name} Socket3"
    pin: GPIO05
    id: plug3
    restore_mode: ALWAYS_ON
    
# Example configuration entry
binary_sensor:
  - platform: gpio
    name: "${friendly_name} gpio13"
    pin:
      number: GPIO13
      mode: INPUT_PULLUP
    id: press_strip
    filters:
      - invert:
      - delayed_on: 10ms
    device_class: power
    on_click:
    - min_length: 50ms
      max_length: 990ms
      then:
        - switch.turn_on: plug1
        - switch.turn_on: plug2
        - switch.turn_on: plug3
        - switch.turn_on: plugusb
    - min_length: 1000ms
      max_length: 5000ms
      then:
        - switch.turn_off: plug1
        - switch.turn_off: plug2
        - switch.turn_off: plug3
        - switch.turn_off: plugusb
2 Likes

Can you share original firmware.