Skip to content

Instantly share code, notes, and snippets.

@sroebert
Last active October 12, 2024 20:40
Show Gist options
  • Save sroebert/8e42ece13a6fc46015c934ebd45780d7 to your computer and use it in GitHub Desktop.
Save sroebert/8e42ece13a6fc46015c934ebd45780d7 to your computer and use it in GitHub Desktop.
Install esphome on Shelly ESP32 devices

Setup esphome from this PR: esphome/esphome#5535 (Code is also here)

python3 -m venv .
bin/pip install .
bin/pip install setuptools

For each Shelly:

  1. Create minimal yaml with correct firmware version. Check Shelly device for exact board requirements here.
esphome:
  name: shelly-upgrade
esp32:
  board: correct-board
  framework:
    type: esp-idf
    platform_version: 6.4.0
    version: 5.1.1
wifi:
  networks:
    - ssid: "ssid"
      password: "password"
ota:
  password: ota-password
  unprotected_writes: True
logger:
web_server:
button:
  - platform: restart
    name: Restart
  1. Build firmware file with bin/esphome compile path/to/yaml-name.yaml

firmware.bin can be found at: /path/to/.esphome/build/{yaml-esphome-name}/.pioenvs/{yaml-esphome-name}/firmware.bin

  1. Flash the Shelly to Tasmota with Safeboot: https://github.com/tasmota/mgos32-to-tasmota32?tab=readme-ov-file#lets-start

  2. Use firmware.bin file from step 1 to upgrade from Tasmota using the web interface.

  3. Upgrade the partition schema: bin/esphome -v upload-factory-ota /path/to/yaml-name.yaml

  4. Install actual esphome configuration normally with use_address: ip as the hostname is not correct yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment