Skip to content

Commit

Permalink
add more Shellys
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Dornbach committed Jun 26, 2020
1 parent f78967f commit cb2a92b
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
needs: release
strategy:
matrix:
hwModel: [Shelly1]
hwModel: [Shelly1, Shelly1PM, ShellyPlugS, Shelly2, Shelly25]
hwPlatform: [esp8266]
runs-on: ubuntu-latest
steps:
Expand Down
18 changes: 13 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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).
53 changes: 44 additions & 9 deletions mos.yml
Original file line number Diff line number Diff line change
@@ -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]
Expand All @@ -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

0 comments on commit cb2a92b

Please sign in to comment.