@@ -6,6 +6,8 @@ Firmware is compatible with stock and can be uploaded via OTA.
6
6
7
7
Reverting to stock firmware is also supported (see below).
8
8
9
+ At the moment only switch functionality is supported - no scheduling, power measurement, etc.
10
+
9
11
## Updating from stock firmware
10
12
11
13
* Download one of the release builds (see Releases) or build a firmware package yourself (see Building below).
@@ -41,12 +43,18 @@ Reverting to stock firmware is also supported (see below).
41
43
42
44
* Enjoy!
43
45
44
- ## Reset
46
+ ## Recovery
47
+
48
+ Device can be recovered from invalid wifi configuration with one of two methods:
45
49
50
+ * On Shelly2.5 press and hold the button for 10 seconds.
51
+ * On both models within first 60 seconds of boot, toggle input switch 10 times in succession.
52
+
53
+ Both of these methods will make device go int AP mode where they can be reconfigured.
46
54
47
55
## LED indication
48
56
49
- Shelly25 has an LED that is used to indicate current status of the device
57
+ Shelly2.5 has an LED that is used to indicate current status of the device
50
58
51
59
* Off - fully provisioned, connected to WiFi, paired.
52
60
* Off, short on pulses - HAP server not provisioned (code not set).
@@ -59,14 +67,59 @@ Reverting to stock firmware is also supported (see below).
59
67
60
68
It is possible to revert back to stock firmware.
61
69
62
- TODO(rojer): document.
70
+ Stock firmware for Shelly1 can be downloaded [ here] ( http://api.shelly.cloud/firmware/SHSW-1_build.zip ) ,
71
+ for Shelly2.5 it's [ here] ( http://api.shelly.cloud/firmware/SHSW-25_build.zip ) .
72
+
73
+ Download it and upload via web interface (this firmware does not support pulling from a remote URL).
63
74
64
75
## Building
65
- * Build and flash the firmware
66
76
67
- * When building, specify ` MODEL=Shelly1 ` or ` MODEL=Shelly25 `
77
+ When building, specify ` MODEL=Shelly1 ` or ` MODEL=Shelly25 `
68
78
69
79
```
70
80
mos build --verbose --local --platform esp8266 --build-var MODEL=Shelly1
71
81
```
72
82
83
+ ## Contributions and development
84
+
85
+ Contributions are welcome!
86
+
87
+ ### OTA method
88
+
89
+ For development, OTA method is recommended.
90
+
91
+ Firmware suports OTA via both RPC and HTTP POST, so something like
92
+
93
+ ```
94
+ $ make Shelly25 && curl -F commit_timeout=120 -F file=@build_Shelly25/fw.zip http://192.168.11.75/update
95
+ ```
96
+
97
+ Note the use of commit timeout: if something goes wrong (as it invariably does during development),
98
+ device will revert to previous firmware automatically. If you are happy with the result, you have 2 minutes
99
+ to commit the firmware via ` curl http://192.168.11.75/update/commit ` or ` mos --port=ws://192.168.11.75/rpc call OTA.Commit ` .
100
+
101
+ ### UDP logging
102
+
103
+ To get remote access to logs, configure UDP logging:
104
+
105
+ ```
106
+ $ mos --port=ws://192.168.11.75/rpc config-set debug.udp_log_addr=192.168.11.30:1234
107
+ ```
108
+
109
+ 192.168.11.30 is the address of your workstation (or any address, really - even external).
110
+
111
+ Then use any UDP listener such as netcat to catch the logs. It is also integrated into mos console:
112
+
113
+ ```
114
+ $ mos --port udp://:1234/ console
115
+ Listening on UDP port 1234...
116
+ [Feb 2 03:45:27.030] shellyswitch25-B955B6 59 18.558 2|shelly_main.c:248 Tick uptime: 18.55, RAM: 32880, 22264 free
117
+ [Feb 2 03:45:28.058] shellyswitch25-B955B6 60 19.558 2|shelly_main.c:248 Tock uptime: 19.55, RAM: 32880, 22264 free
118
+ ...
119
+ ```
120
+
121
+
122
+ ## License
123
+
124
+ This firmware is distributed under Apache 2.0 license.
125
+
0 commit comments