Shelly Plus Plug S - ESPHOME

Shelly raised the secure. The new convert tool is only compatible with Tasmota

But if I flashed Tasmota bootloader, it will accept all firmwares, not signed only? If yes, then I could flash ESPHome if partition scheme was ESPHome compatible?

Has anyone flashed to Tasmota the UK version of this plug lately? It’s labelled “Shelly Plus Plug UK (type G)”. I flashed one back in May using http://ota.tasmota.com/tasmota32/shelly/mgos32-to-tasmota32-PlusPlugUK.zip, but that appears to be deleted and the tasmota release site doesn’t seem to list it (or anything else for Shelly) and https://github.com/tasmota/mgos32-to-tasmota32 seems to have dropped support for it.

Edit: I’ve had a fix added to mgos32-to-tasmota32 so this now works, and then I uploaded a “legacy” esphome image and it worked, and was found by HA. I then tried to add this to the working yaml:

esp32_ble_tracker:
  scan_parameters:
    active: false

bluetooth_proxy:
  active: true

and the device is now seemingly bricked. It was my understanding that this should be fine unless I was changing frameworks, but in this case I didn’t - it was IDF for both.

Did you convert to tasmota safeboot partition scheme? Since this will be incompatible with esphome.

not knowingly - just the mgos32-to-tasmota32 dance, then had esphome build a “legacy” image and upload it via the tasmota web ui. it did come up OK running esphome, it was just once I’d enabled bluetooth proxy, rebuilt and done an OTA update that it stopped responding.

There does not seem to be a good way to switch the new Shellys with the locked bootloader to esphome through the mgos32-to-tasmota32:

  • if you upgrade the partition layout change then you get the bootloader rewriten and unlocked but this breaks esphome OTAs (as it does not support the safeboot process)
  • if you flash esphome with the layout change then OTAs seem to work but to the locked bootloader it keeps booting the first esphome you program.

I described in the esphome dev discord channel what ideas I have to try to enable updates after flashing but I have not started trying yet.

UPDATE:

4 Likes

Same happened to me. Have not found a fix so far :-/

I tested 3 migrations Shelly Mgos → Tasmota → ESPHome, all over the air without using the serial programming. See instructions in the PR.

It should allow to migrate from any Tasmota v12/v13 with the Safeboot partition.

3 Likes

I have Shelly Plus Plug S converted to Tasmota Safeboot. Can I use instructions in this PR?

Yes, you can. Just ensure to adjust the config.yaml to your device. In fact I developed the extended OTA as I expect to buy multiple Shelly Plus Plugs and I do not want to have to open them.

If anything goes wrong do not disconnect the power. So far you do not reboot you can keep trying. The only problem I encountered was once that I have tried flashing a full configuration that was too large to fit into the safebot partition. When I got the error I just retried with the right configuration and then it wnt well.

1 Like

Hi,
I do not really understand, that`s why I want to ask the following question.
Could somebody explain me what is the benefit or the motive about to change shelly firmware?

This has been discussed before and it boils down to personal preferences or value perceived for:

  • more control over the device - you decide what features to add - if something you want is missing you can add it yourself
  • consistency - if I have many devices already done via ESPHome, then it is easier to add new ones. For example I can update all ESPHome devices with a single click.
  • ESPHome does not use any cloud resources - they are not even in the firmware. So it is easier to ensure they do not send data without consent as a close firmware
1 Like

Does this mean you can change from Arduino to esp-idf even if you get the v2 of the Shelly plug s plus (where you have no physical access to serial)

Or is it esp-idf by default?

I removed the esp-idf requirement in the latest version of the PR

2 Likes

I’ve built esphome firmware with a minimal configuration and custom_partitions.csv for Shelly Plus Plug S (for step 1), but it created 2 files - firmware.bin and firmware-factory.bin. Which one should I flash?

Edit: got an answer in Discord - firmware.bin. firmware-factory.bin is only for serial programming.

I just got 4 shelly plus plug s v1 and I’m trying to flash using TTL Serial, but I’m somewhat unsure how I’m supposed to connect things.

I have put the TTL to usb device in 3v3 mode.
I have connected my

TTL → Plug
3v3 → 3,3V
GND → GND
TXD → RX
RXD → TX

I have also tried to switch RX and TX.

And the GP00 to the ground on the socket (No idea if this is the correct thing to do?)
But nothing happens when I connect the TTL to my PC, I get a COM4 port but nothing is outputted on the comport and nothing lights up? What am I missing?

Edit: Also tried to flash using web.esphome.io but it fails to connect.

Is there some sort of life sign when everything is connected correctly? like a led or something? (I currently get nothing)

Should I see the wifi? (If I don’t ground gpio 0?)

Thank you, it worked with Shelly Plus Plug S. I flashed using Read/Write bootloader, partition table and any partition via OTA by angelnu · Pull Request #5535 · esphome/esphome · GitHub without using TTL Serial.

How can I change LED color? I’ve built esphome image using YAML from Shelly Plus Plug S | devices.esphome.io, including the script section from it:

    #### only needed for RGB LED to set up a while after boot. Not available with esp-idf framework #####

script:
  - id: set_rgb
    mode: queued
    then:...

I used esp-idf framework. Is this script section needed for it?
Edit: it is needed and it works with esp-idf framework.
LED color can be changed by choosing Device info:
image

Hi, I’m going try to use this device and it’s internal thermal sensor for thermostat control.
Could someone tell me if it’s a good idea?

I have some concerns as I suppose the plug might heat itself under load so it’s internal thermal sensor is not quite good candidate for this task.
I also opened a discussion on Tasmota:

Any input appreciated, especially from the device owners.
Thanks.