Shelly PLUS 1 + ESPHome (+ bletracker)

With mgos the temperature never went above something like 60 degrees, so it’s a calibration issue (and not hopefully something like we’ve seen on the 2.5: Shelly 2.5 + ESPHome: potential fire hazard + fix | Savjee.be)

1 Like

Mine is around 42°C the very second I power it up. Then it stays in that range, fluctuating maybe between 40 and 45.
So I would assume its a calibration issue.

Attaching a load and measuring the temp with an external thermometer might be the only way to get some mapping values, which probably isn’t very accurate.

Which component would even overheat, is it just the copper traces on the board which can’t handle high currents?
The configuration I linked to in the first post does turn the relay off at 80°.

How exactly do you go about flashing the Shelly Plus series? These do not support OTA, do they?

I’ve bought a few and would like to put ESPHome in them (due to the ability to use with smart bulbs and fallback to relay if Home Assistant is down), but I have not yet seen any clear guides on how to do it.

If using the USB to UART flash, can it be flashed directly via the ESPHome dashboard?

Thanks

You will need to flash over USB once. After that flashing OTA is possible.
The proces is very well explained in this youtube video by Digiblur.

The hardest part was fitting the wires in the tiny connectors. I tried many different wires i had lying around but all were too thick or too thin. I ended up stripping normal jumper wires and tinning them very lightly. That was a perfect fit.

I wasn’t able to flash from the ESPHome Home assistant add-on back then for some reason. So i used ESPHome for windows. But that might have been changed allready. Just give it a try.

1 Like

I had similar problem.
The shelly1 plus has a separate terminal for 12V power supply - different from 24-48V AND from 110/240V.
+12V connects to "12V’ terminal - Ground connects to L (earth) terminal.

Is there any guide to flash esphome on Shelly 1 plus? I am searching but can’t find a step by step guide. In the past I flashed other Shelly devices (I3) via OTA, but for plus versions I can’t find direct OTA update.

You know this page here?

It has a picture with pin out for the serial adapter.

yes I saw, but I dont know how to do. Is there any place where is explained how to flash? Have I to give power only to the adapter or have I to give power also using 220V AC?

Sorry if It seems basic questions, but I dont want to fry items and I would like to understand what I am doing.

Thank you

:zap: :skull_and_crossbones: :zap:

Please never do something like that if you aren’t in search of some electric shocks or magic smoke.

I expect the internet to be full of such guides.

Typically you need a serial-usb adapter and then hook up to esp like this:

  • Ground with GND
  • Voltage (3.3V) with VDD
  • RX with TX
  • TX with RX
  • Ground with GPIO0 (typically to active the flash mode in esp’s)

This images shows the pin-out of the header:

Thank you, I will get a converter and try.

Easiest way to do it is to get something like the VoltLink usb programmer with the additional shelly pin adapter.

Can anyone confirm if OTA updates are working with esp32_ble_tracker enabled on the Shelly Plus 1? I seem to be able to compile and upload via UART, but I keep getting an error, Error receiving acknowledge binary size: timed out, when attempting to OTA.

Looking at various threads, it seems to be a common issue with the esp-idf framework required for single-core ESP32 boards (which the shelly plus 1 is). The various recommendations for sdkconfig_options do not appear to ease things. Any help would be appreciated.

This sounds very similar to an issue on GIthub with the ESP32-C3. Have you tried increasing CONFIG_ESP_TASK_WDT_TIMEOUT_S from the default of 5 seconds?

esp32:
  board: esp32doit-devkit-v1
  framework:
    type: esp-idf
    sdkconfig_options:
      # ... other options from working config
      CONFIG_ESP_TASK_WDT_TIMEOUT_S: "10"

Official documentation for this setting

Yep, that was the exact thread I was using. No luck unfortunately. I could get the device to flash over USB, but not OTA.

I managed OTA and BLE to work with below parameters… update with uart first, after that ota works for me for tuning the divider.

esp32:
  board: esp32doit-devkit-v1
  framework:
    type: esp-idf
    sdkconfig_options:
      CONFIG_FREERTOS_UNICORE: y
      CONFIG_ESP32_DEFAULT_CPU_FREQ_160: y
      CONFIG_ESP32_DEFAULT_CPU_FREQ_MHZ: "160"
      CONFIG_ESP_TASK_WDT_TIMEOUT_S: "20"
      CONFIG_BT_BLE_50_FEATURES_SUPPORTED: n
      CONFIG_BT_BLE_42_FEATURES_SUPPORTED: y

Confirmed. Mine work with CONFIG_ESP_TASK_WDT_TIMEOUT_S: "10", though increasing this number doesn’t seem problematic.

I’d be intrigued if anyone has experienced odd OTA behaviour in this context. Sometimes mine successful flash, but then appear unresponsive remotely for a few minutes (no log output and registered as offline) while working for any automations relying on the physical switch etc.

I don’t know if something about the BLE stack is causing OTA to come up slowly?

I tried almost this exact config, but had both ble 42/50 settings enabled. I wonder if this was the key issue?

@davidtm, In general ESPHome has some issues with OTA on devices with esp32_ble_tracker enabled. This was a response I’d gotten at the beginning of the 2022 in the ESPHome discord:

It is a known issue. WiFi and BLE are sharing the same radio, thus it needs to switch back and forth. Unfortunately, OTA will not stop BLE, it takes over the radio and OTA dies

Can be easily mitigated when just (re)booting into the safe mode before initiating the ota:

Very interesting. I will definitely give this a try! Thanks.

This gives me some idea’s. I assume from this is may be possible to configure shelly with the new bluetooth proxy. I currently use esp32, but it would be nice to piggyback on existing other devices.