Are you doing Bluetooth proxy with the esphone version?
@Budget-Seat, it would be good to edit your original post as with the latest version of Tasmota the process no longer works. Converting to Tasmota is fine but if your end goal is to run ESPHome on the Shelly device then you only get one opportunity to load an ESPHome firmware image. Loading a ESPHome image via the Tasmota web console is fine, and the ESPHome firmware runs as expected. However, after that all OTA updates using ESPHome fail. If you initially flash the ESPHome image via serial then subsequent OTA updates via ESPHome work as expected.
See this issue on github
Hello, I’m new to ESPHome and i have a question. Do esphome (or tasmota) support on-device local scripting (javascript running on device) like in Shelly firmware?
It’s for me very useful feature, quite robust and stable for me. And I think that makes Shelly devices very attractive.
ESPhome can be used so the device works automatically, so yes.
But it’ll be yaml with lambda…not java…
Tasmota can do similar, but I find the code comprehensive…
Thank you, @aceindy, for your response. After researching the scripting capabilities of the ESPHome firmware, I have come to the conclusion that it may not be as user-friendly for both developers and users as the scripting options available through the web interface of the Shelly firmware or the use of the VSCode plugin Shelly for writing and debugging JavaScript scripts on Shelly devices. Given this, I have decided to stick with the Shelly firmware and not pursue flashing ESPHome or Tasmota. I appreciate your help!
Hey all, I just tried to flash several shely plus 1. Long story short
- OTA using Tasmota don’t work
- You have to use UART and best way how to connect use striped CAT5 ETH cable pairs
- You have to compile localy
Long story - ESPHome on Shelly plus 1 — flashed | by Jiri Stepan | May, 2024 | Medium
Hi @jiristepan I have tried to flash the shelly plus 1 based on your guide and I am stuck on boot loop, the flashing works, but after the board starts it tries to initialize WiFi or something like that and than restarts. Any idea what could be wrong? I have tried 2 relays with same result.
My test config
substitutions:
device_name: "Shelly Plus 1"
# Higher value gives lower watt readout
current_res: "0.001"
# Lower value gives lower voltage readout
voltage_div: "1925"
esphome:
name: shelly-plus-1
platformio_options:
board_build.f_cpu: 160000000L
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"
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
logger:
api:
encryption:
key: !secret esp_home_api_password
ota:
password: !secret esp_home_ota_password
output:
- platform: gpio
id: "relay_output"
pin: GPIO26
Logs after boot
[13:37:45]I (395) esp_image: segment 4: paddr=000c8dd0 vaddr=4008c27c size=0789ch ( 30876) load
[13:37:45]I (418) boot: Loaded app from partition at offset 0x10000
[13:37:45]I (418) boot: Disabling RNG early entropy source...
[13:37:45]I (429) cpu_start: Unicore app
[13:37:45]I (429) cpu_start: Pro cpu up.
[13:37:45]I (429) cpu_start: Single core mode
[13:37:45]I (441) cpu_start: Pro cpu start user code
[13:37:45]I (441) cpu_start: cpu freq: 160000000
[13:37:45]I (441) cpu_start: Application information:
[13:37:45]I (446) cpu_start: Project name: shelly-plus-1
[13:37:45]I (451) cpu_start: App version: 2024.5.3
[13:37:45]I (456) cpu_start: Compile time: Jun 9 2024 13:23:49
[13:37:45]I (463) cpu_start: ELF file SHA256: 424c652ddc0644d3...
[13:37:45]I (469) cpu_start: ESP-IDF: 4.4.7
[13:37:45]I (473) cpu_start: Min chip rev: v0.0
[13:37:45]I (478) cpu_start: Max chip rev: v3.99
[13:37:45]I (483) cpu_start: Chip rev: v3.0
[13:37:45]I (488) heap_init: Initializing. RAM available for dynamic allocation:
[13:37:45]I (495) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM
[13:37:45]I (501) heap_init: At 3FFB74B0 len 00028B50 (162 KiB): DRAM
[13:37:45]I (507) heap_init: At 3FFE0440 len 0001FBC0 (126 KiB): D/IRAM
[13:37:45]I (514) heap_init: At 40078000 len 00008000 (32 KiB): IRAM
[13:37:45]I (520) heap_init: At 40093B18 len 0000C4E8 (49 KiB): IRAM
[13:37:45]I (526) heap_init: At 3FF80000 len 00002000 (8 KiB): RTCRAM
[13:37:45]I (533) spi_flash: detected chip: generic
[13:37:45]I (537) spi_flash: flash io: dio
[13:37:45]I (543) cpu_start: Starting scheduler on PRO CPU.
[13:37:45][I][logger:156]: Log initialized
[13:37:45][C][status_led:014]: Setting up Status LED...
[13:37:45][D][esp-idf:000]: I (669) gpio: GPIO[0]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
[13:37:45]
[13:37:45][C][ota:483]: There have been 6 suspected unsuccessful boot attempts.
[13:37:45][D][esp32.preferences:114]: Saving 1 preferences to flash...
[13:37:45][D][esp32.preferences:143]: Saving 1 preferences to flash: 0 cached, 1 written, 0 failed
[13:37:45][I][app:029]: Running through setup()...
[13:37:45][D][esp-idf:000]: I (693) gpio: GPIO[26]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
[13:37:45]
[13:37:45][D][esp-idf:000]: I (694) gpio: GPIO[4]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
[13:37:45]
[13:37:45][D][esp-idf:000]: I (702) gpio: GPIO[25]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
[13:37:45]
[13:37:45][C][output.switch:011]: Setting up Output Switch 'Shelly Plus 1 Relay'...
[13:37:45][D][switch:016]: 'Shelly Plus 1 Relay' Turning OFF.
[13:37:45][D][switch:055]: 'Shelly Plus 1 Relay': Sending state OFF
[13:37:45][C][adc:047]: Setting up ADC 'temp_analog_reading'...
[13:37:45][D][esp-idf:000]: I (753) gpio: GPIO[32]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
[13:37:45]
[13:37:45][C][adc:093]: ADC 'temp_analog_reading' setup finished!
[13:37:45][C][adc:047]: Setting up ADC 'Shelly Plus 1 Relay Supply Voltage'...
[13:37:45][D][esp-idf:000]: I (774) gpio: GPIO[33]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
[13:37:45]
[13:37:45][C][adc:093]: ADC 'Shelly Plus 1 Relay Supply Voltage' setup finished!
[13:37:45][C][wifi:038]: Setting up WiFi...
[13:37:45][D][esp-idf:000]: I (798) wifi:
[13:37:45][D][esp-idf:000]: wifi driver task: 3ffc4100, prio:23, stack:6656, core=0
[13:37:45][D][esp-idf:000]:
[13:37:45]
[13:37:45][D][esp-idf:000][wifi]: I (815) system_api: Base MAC address is not set
[13:37:45]
[13:37:45][D][esp-idf:000][wifi]: I (815) system_api: read default base MAC address from EFUSE
[13:37:45]
[13:37:45][D][esp-idf:000][wifi]: I (828) wifi:
[13:37:45][D][esp-idf:000][wifi]: wifi firmware version: 1fd20f4
[13:37:45][D][esp-idf:000][wifi]:
[13:37:45]
[13:37:45][D][esp-idf:000][wifi]: I (845) wifi:
[13:37:45][D][esp-idf:000][wifi]: wifi certification version: v7.0
[13:37:45][D][esp-idf:000][wifi]:
[13:37:45]
[13:37:45][D][esp-idf:000][wifi]: I (866) wifi:
[13:37:45][D][esp-idf:000][wifi]: config NVS flash: enabled
[13:37:45][D][esp-idf:000][wifi]:
[13:37:45]
[13:37:45][D][esp-idf:000][wifi]: I (876) wifi:
[13:37:45][D][esp-idf:000][wifi]: config nano formating: disabled
[13:37:45][D][esp-idf:000][wifi]:
[13:37:45]
[13:37:45][D][esp-idf:000][wifi]: I (897) wifi:
[13:37:45][D][esp-idf:000][wifi]: Init data frame dynamic rx buffer num: 32
[13:37:45][D][esp-idf:000][wifi]:
[13:37:45]
[13:37:45][D][esp-idf:000][wifi]: I (917) wifi:
[13:37:45][D][esp-idf:000][wifi]: Init static rx mgmt buffer num: 5
[13:37:45][D][esp-idf:000][wifi]:
[13:37:45]
[13:37:45][D][esp-idf:000][wifi]: I (928) wifi:
[13:37:45][D][esp-idf:000][wifi]: Init management short buffer num: 32
[13:37:45][D][esp-idf:000][wifi]:
[13:37:45]
[13:37:46][D][esp-idf:000][wifi]: I (948) wifi:
[13:37:46][D][esp-idf:000][wifi]: Init dynamic tx buffer num: 32
[13:37:46][D][esp-idf:000][wifi]:
[13:37:46]
[13:37:46][D][esp-idf:000][wifi]: I (969) wifi:
[13:37:46][D][esp-idf:000][wifi]: Init static rx buffer size: 1600
[13:37:46][D][esp-idf:000][wifi]:
[13:37:46]
[13:37:46][D][esp-idf:000][wifi]: I (979) wifi:
[13:37:46][D][esp-idf:000][wifi]: Init static rx buffer num: 10
[13:37:46][D][esp-idf:000][wifi]:
[13:37:46]
[13:37:46][D][esp-idf:000][wifi]: I (999) wifi:
[13:37:46][D][esp-idf:000][wifi]: Init dynamic rx buffer num: 32
[13:37:46][D][esp-idf:000][wifi]:
[13:37:46]
[13:37:46][D][esp-idf:000]: I (1021) wifi_init: rx ba win: 6
[13:37:46]
[13:37:46][D][esp-idf:000]: I (1021) wifi_init: tcpip mbox: 32
[13:37:46]
[13:37:46][D][esp-idf:000]: I (1030) wifi_init: udp mbox: 6
[13:37:46]
[13:37:46][D][esp-idf:000]: I (1030) wifi_init: tcp mbox: 6
[13:37:46]
[13:37:46][D][esp-idf:000]: I (1040) wifi_init: tcp tx win: 5760
[13:37:46]
[13:37:46][D][esp-idf:000]: I (1050) wifi_init: tcp rx win: 5760
[13:37:46]
[13:37:46][D][esp-idf:000]: I (1061) wifi_init: tcp mss: 1440
[13:37:46]
[13:37:46][D][esp-idf:000]: I (1061) wifi_init: WiFi IRAM OP enabled
[13:37:46]
[13:37:46][D][esp-idf:000]: I (1071) wifi_init: WiFi RX IRAM OP enabled
[13:37:46]
[13:37:46][C][wifi:051]: Starting WiFi...
[13:37:46][C][wifi:052]: Local MAC: A8:03:2A:B6:B2:58
[13:37:46][D][esp-idf:000][wifi]: I (1082) phy_init: phy_version 4791,2c4672b,Dec 20 2023,16:06:06
[13:37:46]
[13:37:46][D][esp-idf:000][wifi]: W (1102) phy_init: failed to load RF calibration data (0x1102
[13:37:46]Brownout detector was triggered
[13:37:46]
[13:37:46]ets Jul 29 2019 12:21:46
[13:37:46]
[13:37:46]rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
[13:37:46]configsip: 188777542, SPIWP:0xee
[13:37:46]clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
[13:37:46]mode:DIO, clock div:2
[13:37:46]load:0x3fff0030,len:6644
[13:37:46]load:0x40078000,len:15056
[13:37:46]ho 0 tail 12 room 4
[13:37:46]load:0x40080400,len:3628
[13:37:46]entry 0x40080668
[13:37:46]I (29) boot: ESP-IDF 4.4.7 2nd stage bootloader
[13:37:46]I (29) boot: compile time 13:24:03
[13:37:46]W (29) boot: Unicore bootloader
[13:37:46]I (33) boot: chip revision: v3.0
[13:37:46]I (36) boot.esp32: SPI Speed : 40MHz
[13:37:46]I (41) boot.esp32: SPI Mode : DIO
[13:37:46]I (46) boot.esp32: SPI Flash Size : 4MB
[13:37:46]I (50) boot: Enabling RNG early entropy source...
[13:37:46]I (56) boot: Partition Table:
[13:37:46]I (59) boot: ## Label Usage Type ST Offset Length
[13:37:46]I (67) boot: 0 otadata OTA data 01 00 00009000 00002000
[13:37:46]I (74) boot: 1 phy_init RF data 01 01 0000b000 00001000
[13:37:46]I (81) boot: 2 app0 OTA app 00 10 00010000 001c0000
[13:37:46]I (89) boot: 3 app1 OTA app 00 11 001d0000 001c0000
[13:37:46]I (96) boot: 4 nvs WiFi data 01 02 00390000 0006d000
[13:37:46]I (104) boot: End of partition table
[13:37:46]I (108) esp_image: segment 0: paddr=00010020 vaddr=3f400020 size=2129ch (135836) map
[13:37:46]I (166) esp_image: segment 1: paddr=000312c4 vaddr=3ffb0000 size=02ad0h ( 10960) load
[13:37:46]I (170) esp_image: segment 2: paddr=00033d9c vaddr=40080000 size=0c27ch ( 49788) load
[13:37:46]I (192) esp_image: segment 3: paddr=00040020 vaddr=400d0020 size=88da8h (560552) map
[13:37:46]I (395) esp_image: segment 4: paddr=000c8dd0 vaddr=4008c27c size=0789ch ( 30876) load
[13:37:46]I (418) boot: Loaded app from partition at offset 0x10000
[13:37:46]I (418) boot: Disabling RNG early entropy source...
[13:37:46]I (429) cpu_start: Unicore app
[13:37:46]I (429) cpu_start: Pro cpu up.
[13:37:46]I (429) cpu_start: Single core mode
[13:37:46]I (441) cpu_start: Pro cpu start user code
[13:37:46]I (441) cpu_start: cpu freq: 160000000
[13:37:46]I (441) cpu_start: Application information:
[13:37:46]I (446) cpu_start: Project name: shelly-plus-1
[13:37:46]I (451) cpu_start: App version: 2024.5.3
[13:37:46]I (456) cpu_start: Compile time: Jun 9 2024 13:23:49
[13:37:46]I (463) cpu_start: ELF file SHA256: 424c652ddc0644d3...
[13:37:46]I (469) cpu_start: ESP-IDF: 4.4.7
[13:37:46]I (473) cpu_start: Min chip rev: v0.0
[13:37:46]I (478) cpu_start: Max chip rev: v3.99
[13:37:46]I (483) cpu_start: Chip rev: v3.0
[13:37:46]I (488) heap_init: Initializing. RAM available for dynamic allocation:
[13:37:46]I (495) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM
[13:37:46]I (501) heap_init: At 3FFB74B0 len 00028B50 (162 KiB): DRAM
[13:37:46]I (507) heap_init: At 3FFE0440 len 0001FBC0 (126 KiB): D/IRAM
[13:37:46]I (514) heap_init: At 40078000 len 00008000 (32 KiB): IRAM
[13:37:46]I (520) heap_init: At 40093B18 len 0000C4E8 (49 KiB): IRAM
[13:37:46]I (526) heap_init: At 3FF80000 len 00002000 (8 KiB): RTCRAM
[13:37:46]I (533) spi_flash: detected chip: generic
[13:37:46]I (537) spi_flash: flash io: dio
[13:37:46]I (543) cpu_start: Starting scheduler on PRO CPU.
[13:37:46][I][logger:156]: Log initialized
[13:37:46][C][status_led:014]: Setting up Status LED...
[13:37:46][D][esp-idf:000]: I (669) gpio: GPIO[0]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
[13:37:46]
[13:37:46][C][ota:483]: There have been 7 suspected unsuccessful boot attempts.
Photos of the device
I got it working, actually it was working all the time. The problem was that my usb adapter which I used for flashing did not supply enough power to the device which caused reboot. If someone would face same issue watch for Brownout detector was triggered
this means that the device was restarted because it was not getting enough power. When I connected the flashed device to main voltage it started correctly.
Hi Pieter,
I am half-way stuck with your approach.
I have flashed the Shelly to Tasmota and followed all the steps from the link, you provided.
As a result, I now have a recent Tasmota 14.1 version configured with the Safeboot partition introduced in Tasmota 12.x releases.
But now looking at the 2nd link, I see there a huge hint that flashing from Tasmota to ESPhome would not be possible because of the safeboot boot partition.
How have you accomplished this?
BR, Marcus