diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 056aa12..c26b57d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -24,7 +24,7 @@ jobs: needs: release strategy: matrix: - hwModel: [Shelly1] + hwModel: [Shelly1, Shelly1PM, ShellyPlugS, Shelly2, Shelly25] hwPlatform: [esp8266] runs-on: ubuntu-latest steps: diff --git a/README.md b/README.md index 828bf53..72f48a1 100644 --- a/README.md +++ b/README.md @@ -3,8 +3,8 @@ ## Overview This is a first working draft for an intermediate firmware that can be used to -install [Tasmota](https://github.com/arendst/Tasmota) on a Shelly 1 switch. It -will install the same version of Tasmota as [Tuya Convert](https://github.com/ct-Open-Source/tuya-convert/), +install [Tasmota](https://github.com/arendst/Tasmota) on various Shelly +models. It will install the same version of Tasmota as [Tuya Convert](https://github.com/ct-Open-Source/tuya-convert/), and you can continue from there to your favourite target release. ## Install @@ -20,7 +20,15 @@ back to stock firmware._ Before flashing this firmware, connect your device to a WIFI network with internet access. From your browser, open -`http://shellyip/ota?url=http://dl.dasker.eu/firmware/mg2tasmota-Shelly1.zip` + * Shelly1 `http://shellyip/ota?url=http://dl.dasker.eu/firmware/mg2tasmota-Shelly1.zip` + + * Shelly1PM `http://shellyip/ota?url=http://dl.dasker.eu/firmware/mg2tasmota-Shelly1PM.zip` + + * ShellyPlugS `http://shellyip/ota?url=http://dl.dasker.eu/firmware/mg2tasmota-ShellyPlugS.zip` + + * Shelly2 `http://shellyip/ota?url=http://dl.dasker.eu/firmware/mg2tasmota-Shelly2.zip` + + * Shelly25 `http://shellyip/ota?url=http://dl.dasker.eu/firmware/mg2tasmota-Shelly25.zip` replacing _shellyip_ with the IP address of your Shelly 1. The device will restart one or two times and attempt to download Tasmota. If this download @@ -39,11 +47,11 @@ which you can use for recovery. You can compile a binary version of this firmware using [mos tools](https://mongoose-os.com/docs/mongoose-os/quickstart/setup.md#1-download-and-install-mos-tool). Once installed, clone this repository and run `mos build --build-var MODEL=Shelly1 --platform esp8266` to create a binary -located in `build/fw.zip`. +for e.g. a Shelly1 switch located in `build/fw.zip`. ## Acknowledgments Thanks to [rojer](https://github.com/rojer) for helping me with the debugging of -this code. +the initial code. This firmware is build using a fork of [Mongoose OS docker action](https://github.com/dea82/mongoose-os-action) which can be found [here](https://github.com/yaourdt/mongoose-os-action). diff --git a/mos.yml b/mos.yml index 33a146b..ae74193 100644 --- a/mos.yml +++ b/mos.yml @@ -1,12 +1,11 @@ author: mark dornbach -platform: esp8266 description: a minimal firmware for ota flashing tasmota from mongoose os -version: 0.2.1 +version: 0.3.0 libs_version: latest modules_version: latest mongoose_os_version: latest -manifest_version: 2017-09-29 +manifest_version: 2020-01-29 sources: [src] filesystem: [fs] tags: [c, tuya, tasmota, mongoose] @@ -31,13 +30,49 @@ libs: - origin: https://github.com/mongoose-os-libs/rpc-service-config # manage device configuration remotely - origin: https://github.com/mongoose-os-libs/ca-bundle # CA certificates -build_vars: - FLASH_SIZE: 2097152 - FS_SIZE: 262144 - BOOT_CONFIG_ADDR: 0x1000 - MGOS_ROOT_FS_TYPE: SPIFFS - conds: - when: build_vars.MODEL == "Shelly1" apply: name: switch1 + platform: esp8266 + build_vars: + FS_SIZE: 262144 + FLASH_SIZE: 2097152 + BOOT_CONFIG_ADDR: 0x1000 + MGOS_ROOT_FS_TYPE: SPIFFS + - when: build_vars.MODEL == "Shelly1PM" + apply: + name: switch1pm + platform: esp8266 + build_vars: + FS_SIZE: 262144 + FLASH_SIZE: 2097152 + BOOT_CONFIG_ADDR: 0x1000 + MGOS_ROOT_FS_TYPE: SPIFFS + - when: build_vars.MODEL == "ShellyPlugS" + apply: + name: shelly-plug-s + platform: esp8266 + build_vars: + FS_SIZE: 262144 + FLASH_SIZE: 2097152 + BOOT_CONFIG_ADDR: 0x7000 + MGOS_ROOT_FS_TYPE: SPIFFS + - when: build_vars.MODEL == "Shelly2" + apply: + name: switch + platform: esp8266 + build_vars: + FS_SIZE: 262144 + FLASH_SIZE: 2097152 + BOOT_CONFIG_ADDR: 0x1000 + MGOS_ROOT_FS_TYPE: SPIFFS + - when: build_vars.MODEL == "Shelly25" + apply: + name: switch25 + platform: esp8266 + build_vars: + FS_SIZE: 262144 + FLASH_SIZE: 2097152 + BOOT_CONFIG_ADDR: 0x1000 + MGOS_ROOT_FS_TYPE: SPIFFS