diff --git a/README.md b/README.md index 561c41b5..3e18c267 100644 --- a/README.md +++ b/README.md @@ -1,37 +1,71 @@ -# ESPurna +# ESPurna Firmware -ESPurna ("spark" in Catalan) is a custom C firmware for ESP8266 based smart switches. -It was originally developed with the **[ITead Sonoff][1]** in mind but now it supports a growing number of ESP8266-based boards. +ESPurna ("spark" in Catalan) is a custom firmware for ESP8266 based smart switches. +It was originally developed with the **[IteadStudio Sonoff][1]** in mind but now it supports a growing number of ESP8266-based boards. +It uses the Arduino Core for ESP8266 framework and a number of 3rd party libraries. + +**Current Release Version is 1.2.0**, read the [changelog](CHANGELOG.md). ## Features -* **Asynchronous WebServer for configuration** and simple relay toggle with **basic authentication** -* Communication between webserver and webclient via **websockets** with secure ticket check -* **Flashing firmware Over-The-Air** (OTA) -* Up to **3 configurable WIFI networks**, connects to the strongest signal -* **MQTT support** with configurable host and topic -* **REST API** to query and set relay statuses -* Support for **multi-relay boards** (Sonoff Dual, Electrodragon ESP Relay Board,...) -* Manual switch ON/OFF with button (single click the button) -* AP mode backup (double click the button) -* Manual reset the board (long click the button) -* Visual status of the connection via the LED -* **Alexa** integration (Amazon Echo or Dot) by emulating a Belkin WeMo switch -* Support for **automatic over-the-air updates** through the [NoFUSS Library][2] -* Support for **DHT22** and **DS18B20** sensors -* Support for the **HLW8012** power sensor present in the Sonoff POW -* Support for **current monitoring** through the [EmonLiteESP Library][3] using a non-intrusive current sensor ([requires some hacking][4]) -* Command line configuration - -## Index - -* [Supported hardware](docs/Hardware.md) -* [Build and flash the firmware](docs/Firmware.md) -* [Build and flash the filesystem](docs/Filesystem.md) -* [Configuration](docs/Configuration.md) -* [Over-the-air updates](docs/OTA.md) -* [Sensors](docs/Sensors.md) -* [Troubleshooting](docs/Troubleshooting.md) +* Support for **multiple ESP8266-based boards** ([check list](#supported-hardware)) +* Wifi **AP Mode** or **STA mode** with **multiple network definitions** +* **MQTT** enabled + * Switch on/off and toggle relays + * LED notifications +* Support for different **sensors** + * DHT11 / DHT22 / DHT21 / AM2301 + * DS18B20 + * HLW8012 (Sonoff POW) + * Non-invasive current sensor using the [EmonLiteESP Library][3] (requires some hacking) +* Fast asynchronous **HTTP Server** + * Basic authentication + * Web-based configuration + * Relay switching from the web + * Websockets-based communication between the device and the browser +* **REST API** + * GET and PUT relay status +* **Command line configuration** +* **Over-The-Air** (OTA) updates even for 1Mb boards + * Manually from PlatformIO or Arduino Inside + * Automatic updates through the [NoFUSS Library][2] +* **Alexa** integration (requires staging version of Arduino Core for ESP8266) + +## Documentation + +For more information please refer to the [ESPurna Wiki](https://bitbucket.org/xoseperez/espurna/wiki/Home). + + +## Supported hardware + + + + + + + + + + + + + + + + + + + + + + + + + + + +
![Sonoff](images/devices/s20.jpg)

**IteadStudio S20**
![Sonoff](images/devices/slampher.jpg)

**IteadStudio Slampher**
![Sonoff](images/devices/sonoff-4ch.jpg)

**IteadStudio Sonoff 4CH**
![Sonoff](images/devices/sonoff-basic.jpg)

**IteadStudio Sonoff Basic**
![Sonoff](images/devices/motor-switch.jpg)

**IteadStudio Motor Switch**
![Sonoff](images/devices/1ch-inching.jpg)

**IteadStudio 1CH Inching**
![Sonoff](images/devices/sonoff-dual.jpg)

**IteadStudio Sonoff Dual**
![Sonoff](images/devices/sonoff-pow.jpg)

**IteadStudio Sonoff POW**
![Sonoff](images/devices/sonoff-th10-th16.jpg)

**IteadStudio Sonoff TH10/TH16**
![Sonoff](images/devices/sonoff-rf.jpg)

**IteadStudio Sonoff RF**
![Sonoff](images/devices/sonoff-sv.jpg)

**IteadStudio Sonoff SV**
![Sonoff](images/devices/sonoff-led.jpg)

**IteadStudio Sonoff LED**
![Sonoff](images/devices/sonoff-touch.jpg)

**IteadStudio Sonoff Touch**
![Sonoff](images/devices/electrodragon-relay-board.jpg)

**Electrodragon Relay Board**
![Sonoff](images/devices/workchoice-ecoplug.jpg)

**WorkChoice EcoPlug**
+ ## License @@ -54,4 +88,3 @@ along with this program. If not, see . [1]: https://www.itead.cc/sonoff-wifi-wireless-switch.html [2]: https://bitbucket.org/xoseperez/nofuss [3]: https://bitbucket.org/xoseperez/emonliteesp -[4]: http://tinkerman.cat/your-laundry-is-done/ diff --git a/docs/Configuration.md b/docs/Configuration.md deleted file mode 100644 index 680c49af..00000000 --- a/docs/Configuration.md +++ /dev/null @@ -1,21 +0,0 @@ -# Configuration - -*TODO* - -## First boot - -On normal boot (i.e. button not pressed) it will execute the firmware. It configures the hardware (button, LED, relay), the SPIFFS memory access, the WIFI, the WebServer and MQTT connection and whatever other enabled modules. - -Obviously the default values for WIFI network and MQTT will probably not match your requirements. The device will start in Soft AP creating a WIFI SSID named "DEVICE_XXXXXX", where DEVICE will be an identifier of your device and XXXXXX are the last 3 bytes of the radio MAC. Connect with phone, PC, laptop, whatever to that network, password is "fibonacci". Once connected browse to 192.168.4.1. It will then present an **authentication challenge**. Default user and password are "admin" and "fibonacci" (again). Then you will be presented a configuration page where you will be able to define different configuration parameters, including changing the default password. The same password is used for the WIFI Access Point, for the web interface and for the OTA firmware upload. - -## WiFi configuration - -You can configure up to three WIFI networks. It will then try to connect to the configure WIFI networks in order of signal strength. If none of the 3 attempts succeed it will default to SoftAP mode again. You can also switch to SoftAP mode by double click the on-board button or reset the board long clicking it. - -## MQTT - -Once connected to an access point (so in station mode) the board will try to connect the MQTT server defined. - -The device will publish the relay state to the given topic and it will subscribe to the same topic for remote switching. Don't worry, it avoids infinite loops. - -You can also use "{identifier}" as place holder in the topic. It will be translated to your device ID (same as the soft AP network it creates). diff --git a/docs/Filesystem.md b/docs/Filesystem.md deleted file mode 100644 index 608c0db8..00000000 --- a/docs/Filesystem.md +++ /dev/null @@ -1,77 +0,0 @@ -# Filesystem - -## Introduction - -Normally when you flash an ESP8266 you only flash the firmware, like for any other microcontroller. But the ESP8266 has plenty of room and normally it is split into different partitions. One such partition is used to store web files like a normal webserver. - -Problem is that, even thou the ESP8266 is a very capable microcontroller it has its limitations and does not handle very well concurrent connections. This is specially true for the *default* webserver that comes with the Arduino Core for ESP8266. - -On the other side, to provide a good user experience and work with a comfortable development environment you end up having different files: scripts, stylesheet files, images,... The browser will load the index.html file and quickly request for all those other files and the ESP8266 will easily struggle trying to serve them all. - -So the trick here is to squeeze them all into one single compressed file just before uploading it. Luckily, we can do that automatically. - -## Web interface build process - -The build process reads the HTML files, looks for the stylesheet and script files linked there, grabs them, minifies them and includes them inline, in the same order they are loaded. The resulting single HTML file is then cleaned, further minified and compressed resulting in a single index.html.gz file. This way the ESP8266 webserver can serve it really fast. - -To build this file we are using **[Gulp][1]**, a build system built in [node.js][2]. So you will need node (and [npm][3], its package manager) first. [Read the documentation][4] on how to install them. - -Once you have node and npm installed, go to the 'code' folder and install all the dependencies with: - -``` -npm install -``` - -It will take a minute or two. Then you are ready to build the webserver files with: - -``` -gulp -``` - -It will create a populate a 'data' folder with all the required files. - -## Images - -Along with the HTML, CSS and JS files compressed into the index.html.gz file, the ESPurna firmware uses some images in its web interface. These are the favicon.ico file and a **sprite** for the iPhone style buttons in the interface. Again the idea is to use the minimum possible number of files. - -## Flashing it - -### Using PlatformIO - -[PlatformIO][5] allows the developer to define hooks to be executed before or after certain actions. This is really cool since we can plug one such hook to the *uploadfs* target to automatically build the web interface before uploading it to the board. - -This is done by specifying the script with the hook definitions in the *extra_script* option in the platformio.ini file. The script, written in python, binds the target file (spiffs.bin) to a method that executes the gulp command we have seen before. - -``` -#!/bin/python - -from SCons.Script import DefaultEnvironment -env = DefaultEnvironment() - -def before_build_spiffs(source, target, env): - env.Execute("gulp buildfs") - -env.AddPreAction(".pioenvs/%s/spiffs.bin" % env['PIOENV'], before_build_spiffs) -``` - -The included platformio.ini file has all this already configured, so you don't have to worry about it. Just type: - -``` -pio run -t uploadfs -e sonoff -``` - -(or whatever other enviroment) and you are good to go. - -### Using Arduino IDE - -First you will have to manually build the data folder contents using gulp (see [instructions above](#web-interface-build-process)). - -Then you will have to have the "[ESP8266 Sketch Data Upload][6]" utility installed. Check the instructions in the previous link. The data folder should be a subfolder of the code folder for the tool to find it. Then just execute it and it will upload the data folder contents to your board. - - -[1]: http://gulpjs.com/ -[2]: https://nodejs.org/en/ -[3]: https://www.npmjs.com/ -[4]: https://docs.npmjs.com/getting-started/installing-node -[5]: http://www.platformio.org -[6]: https://github.com/esp8266/Arduino/blob/master/doc/filesystem.md#uploading-files-to-file-system diff --git a/docs/Firmware.md b/docs/Firmware.md deleted file mode 100644 index 648edb4e..00000000 --- a/docs/Firmware.md +++ /dev/null @@ -1,56 +0,0 @@ -# Firmware - -## Build the firmware - -The project is ready to be build using [PlatformIO][1]. -Please refer to their web page for instructions on how to install the builder. - -If you are using PlatformIO /strongly recommended) it will take care of the library dependencies. Otherwise you will have to install them manually: - -* Benoit Blanchon's [ArduinoJson](https://github.com/bblanchon/ArduinoJson) -* Hristo Gochkov's [ESPAsyncTCP](https://github.com/me-no-dev/ESPAsyncTCP) -* Hristo Gochkov's [ESPAsyncUDP](https://github.com/me-no-dev/ESPAsyncUDP) -* Hristo Gochkov's [ESPAsyncWebServer](https://github.com/me-no-dev/ESPAsyncWebServer) -* Marvin Roger's [AyncMqttClient](https://github.com/marvinroger/async-mqtt-client) -* Adafruit's [DHT Sensor Library](https://github.com/adafruit/DHT-sensor-library) (required if compiling with DHT support: -DENABLE_DHT) -* Adafruit's [Unified Sensor Library](https://github.com/adafruit/Adafruit_Sensor) (required if compiling with DHT support: -DENABLE_DHT) -* Paul Stoffregen (et al.) [OneWire](https://github.com/PaulStoffregen/OneWire) -* Miles Burton (et al.) [DallasTemperature](https://github.com/milesburton/Arduino-Temperature-Control-Library) -* The PatternAgents (et al.) [Embedis](https://github.com/thingSoC/embedis) -* German Martin's [NtpCLientLib](https://github.com/gmag11/NtpClient) -* Michael Maregolis & Paul Stoffregen's [Time](https://github.com/PaulStoffregen/Time) -* Randy Simons' [RemoteSwitch](https://github.com/jccprj/RemoteSwitch-arduino-library) (required if using custom RF module: -DENABLE_RF) - -And my own libraries: - -* [JustWifi](https://bitbucket.org/xoseperez/justwifi.git) -* [FauxmoESP](https://bitbucket.org/xoseperez/fauxmoesp.git) (required if compiling with WeMo emulation support: -DENABLE_FAUXMO) -* [HLW8012](https://bitbucket.org/xoseperez/hlw8012.git) (required if compiling for Sonoff POW: -DENABLE_POW) -* [EmonLiteESP](https://bitbucket.org/xoseperez/emonliteesp.git) (required if compiling with Energy Monitoring support: -DENABLE_EMON) -* [NoFUSS](https://bitbucket.org/xoseperez/nofuss.git) (required if compiling with NoFUSS Automatic OTA support: -DENABLE_NOFUSS) - -**Note**: The fauxmoESP library requires the staging version of Arduino Core for ESP8266. Either you are using Arduino IDE or PlatformIO you will have to manually install this. Check the [documentation for the fauxmoESP library](https://bitbucket.org/xoseperez/fauxmoesp) for more info. - -Once you have all the code, you can check if it's working by: - -```bash -> pio run -e node-debug -``` - -If it compiles you are ready to flash the firmware. - -## Flash your board - -Wire your board (check the [Hardware page](Hardware.md)) and flash the firmware (with ```upload```): - -```bash -> pio run -t upload -e sonoff -``` - -(or any other environment, depending on the board you are working with). - -Library dependencies are automatically managed via PlatformIO Library Manager or included via submodules and linked from the "lib" folder. - -Once the firmware is uploaded next step is to upload the web interface. Check how to [build and flash the filesystem](Filesystem.md). - -[1]: http://www.platformio.org diff --git a/docs/Hardware.md b/docs/Hardware.md deleted file mode 100644 index a62ce51f..00000000 --- a/docs/Hardware.md +++ /dev/null @@ -1,216 +0,0 @@ -# Supported Hardware - -This is the official list of supported hardware for the ESPurna firmware. The hardware configuration for each of these boards can be selected by supplying the build flag (see [Firmware section](Firmware.h)). - -**CAUTION: Never ever connect any of these devices to your computer and to mains at the same time. Never ever manipulate them while connected to mains. Seriously. I don't want you to die. I hold no responsibility for any damage to you, your family, your house,... for any action or results derived from flashing or using these devices.** - -* [IteadStudio Sonoff](#iteadstudio-sonoff) -* [IteadStudio Sonoff RF](#iteadstudio-sonoff-rf) -* [IteadStudio Sonoff TH](#iteadstudio-sonoff-th) -* [IteadStudio Sonoff POW](#iteadstudio-sonoff-pow) -* [IteadStudio Sonoff DUAL](#iteadstudio-sonoff-dual) -* [IteadStudio Sonoff TOUCH](#iteadstudio-sonoff-touch) -* [IteadStudio Sonoff 4CH](#iteadstudio-sonoff-4ch) -* [IteadStudio Sonoff SV](#iteadstudio-sonoff-sv) -* [IteadStudio Slampher](#iteadstudio-slampher) -* [IteadStudio S20](#iteadstudio-s20) -* [Electrodragon ESP Relay Board](#electrodragon-esp-relay-board) -* [WorkChoice EcoPlug](#workchoice-ecoplug) - -## IteadStudio Sonoff - -|Property|Value| -|---|---| -|Manufacturer|Itead Studio| -|Web page|[https://www.itead.cc/sonoff-wifi-wireless-switch.html](https://www.itead.cc/sonoff-wifi-wireless-switch.html)| -|Build flag|SONOFF| - -The [IteadStudio Sonoff][1] has an ESP8266 on board with a 8Mbit flash memory chip, a mains to 3V3 transformer and a relay (GPIO12). It also features a button (GPIO0), an LED (GPIO13) and an unpopulated header you can use to reprogram it. - -### Flashing - -![Sonoff - Inside front view](images/sonoff-flash.jpg) - -The unpopulated header in the Sonoff has all the required pins. My board has a 5 pins header in-line with the button. They are (from the button outwards) 3V3, RX, TX, GND and GPIO14. - -Last one is not necessary. Mind it's a **3V3 device**, if connected to 5V you will probably fry it. Button is connected to GPIO0 on the ESP8266 chip, so to enter flash mode you have to hold the button pressed while powering on the board, then you can release it again. - -## IteadStudio Sonoff RF - -|Property|Value| -|---|---| -|Manufacturer|Itead Studio| -|Web page|[https://www.itead.cc/sonoff-rf.html][2]| -|Build flag|SONOFF_RF| - -### Flashing - -![Sonoff POW - Inside back view](images/sonoff-rf-flash.jpg) - -The Sonoff RF has the same unpopulated header as the Sonoff. It is a 5 pins header in-line with the button. They are (from the button outwards) 3V3, RX, TX, GND and GPIO14. - -Solder a male or female header here and connect your USB-to-UART programmer (remember **it's a 3V3 device**). This time through **the button is not connected to GPIO0** but to a EFM8BB1 microcontroller that also monitors the RF module output. - -There are a couple of ways to enter flash mode. Some recommend to move 0Ohm R9 resistor to R21 to connect the button directly to the ESP8266 GPIO0 and use it in the same way as for the Sonoff or Sonoff TH. The drawback is the by doing that you lose the RF capability. - -My recommendation is to **temporary shortcut the bottom pad of the unpopulated R21 footprint** (see the image above) and connect your USB-to-UART board at the same time. You will have to do it just once (unless there is something really wrong in the firmware) and use OTA updates from there on. - - -## IteadStudio Sonoff TH - -|Property|Value| -|---|---| -|Manufacturer|Itead Studio| -|Web page|[https://www.itead.cc/sonoff-th.html](https://www.itead.cc/sonoff-th.html)| -|Build flag|SONOFF_TH| - -### Flashing - -![Sonoff TH - Inside back view](images/sonoff-th-flash.jpg) - -You have all the required pins in an unpopulated header in one of the corners of the board (see top left corner in the image above). Solder a 4 pins male or female header here and connect it to your favourite USB-to-UART module. Remember: **it's a 3V3 device**!!. - -As in the Sonoff the button is connected to GPIO0, so to enter flash mode press and hold the button and connect the programmer to your computer to power the board. - -## IteadStudio Sonoff POW - -|Property|Value| -|---|---| -|Manufacturer|Itead Studio| -|Web page|[https://www.itead.cc/sonoff-pow.html](https://www.itead.cc/sonoff-pow.html)| -|Build flag|SONOFF_POW| - -### Flashing - -![Sonoff POW - Inside back view](images/sonoff-pow-flash.jpg) - -Same as for the [Sonoff TH](#iteadstudio-sonoff-th) above. - -## IteadStudio Sonoff DUAL - -|Property|Value| -|---|---| -|Manufacturer|Itead Studio| -|Web page|[https://www.itead.cc/sonoff-dual.html](https://www.itead.cc/sonoff-dual.html)| -|Build flag|SONOFF_DUAL| - -### Flashing - -![Sonoff DUAL - Inside back view](images/sonoff-dual-flash.jpg) - -The Sonoff Dual it's a bit tricky to flash since GPIO0 is not connected to the button as in the TH or POW, but to the pin 15 in the SIL F330 chip that manages the buttons and the relays. SO you have to locate a pad connected to GPIO and short it to ground while powering the device. - -In the picture above you have a location of an available and easily accessible GPIO0 pad. The other required pins are brought out in the top header. Remember it's a *3V3* device. - -Once flashed use OTA to update the firmware or the filesystem. - -## IteadStudio Sonoff TOUCH - -|Property|Value| -|---|---| -|Manufacturer|Itead Studio| -|Web page|[https://www.itead.cc/sonoff-touch.html](https://www.itead.cc/sonoff-touch.html)| -|Build flag|SONOFF_TOUCH| - -### Flashing - -*TODO* - -## IteadStudio Sonoff 4CH - -|Property|Value| -|---|---| -|Manufacturer|Itead Studio| -|Web page|[https://www.itead.cc/sonoff-4ch.html](https://www.itead.cc/sonoff-4ch.html)| -|Build flag|SONOFF_4CH| - -### Flashing - -*TODO* - -## IteadStudio Sonoff SV - -|Property|Value| -|---|---| -|Manufacturer|Itead Studio| -|Web page|[https://www.itead.cc/sonoff-sv.html](https://www.itead.cc/sonoff-sv.html)| -|Build flag|SONOFF_SV| - -### Flashing - -*TODO* - -## IteadStudio Slampher - -|Property|Value| -|---|---| -|Manufacturer|Itead Studio| -|Web page|[https://www.itead.cc/slampher.html](https://www.itead.cc/slampher.html)| -|Build flag|SLAMPHER| - -### Flashing - -![Slampher - Inside front view](images/slampher-flash1.jpg) -![Slampher - Flashing short](images/slampher-flash2.jpg) - -There is a 4 pin unpopulated header in a border near the ESP8266 chip. Starting form the little white mark this header brings out 3V3, RX, TX and GND. Solder a male or female header here and connect your USB-to-UART programmer (remember it's a 3V3 device). This time through **the button is not connected to GPIO0** but to a EFM8BB1 microcontroller that also monitors the RF module output. - -There are a couple of ways to enter flash mode. Some recommend to move R21 to R20 (at the top right of the first picture above) to connect the button directly to the ESP8266 GPIO0 and use it in the same way as for the Sonoff or Sonoff TH. The drawback is the by doing that you lose the RF capability. - -My recommendation is to **temporary shortcut the right pad of the unpopulated R20 footprint** (see second image above) and connect your USB-to-UART board at the same time. You will have to do it just once (unless there is something really wrong in the firmware) and use OTA updates from there on. - -## IteadStudio S20 Smart Socket - -|Property|Value| -|---|---| -|Manufacturer|Itead Studio| -|Web page|[https://www.itead.cc/smart-socket.html](https://www.itead.cc/smart-socket.html)| -|Build flag|S20| - -### Flashing - -![S20 Smart Socket - Inside front view](images/s20-flash.jpg) - -There is a labeled header in the front of the PCB and the button is connected to GPIO0, so no problems here. - -Solder a 4 pin male or female header and connect it to your USB-to-UART bridge. Again, remember **it's a 3V3 device**. Then press and hold the button and connect the programmer to your computer. The microcontroller will boot into flash mode and you are ready to update the firmware. - -## Electrodragon ESP Relay Board - -|Property|Value| -|---|---| -|Manufacturer|Electrodragon| -|Web page|[http://www.electrodragon.com/product/wifi-iot-relay-board-based-esp8266/](http://www.electrodragon.com/product/wifi-iot-relay-board-based-esp8266/)| -|Build flag|ESP_RELAY_BOARD| - -### Flashing - -![Electrodragon ESP Relay Board - Front view](images/electrodragon-flash.jpg) - -The Electrodragon ESP Relay Board is pretty easy to flash IF you do not follow their wiki, it's all wrong. Check the picture above and note that: - -* Power the board from the 5V pin, GND to GND -* The RX pin in the header should go to your programmer TX pin and -* The TX pin in the header should go to your programmer RX pin -* The button labeled BTN2 is connected to GPIO0, so hold it down while powering the board, I've had better results keeping it down until the flashing starts - -## WorkChoice EcoPlug - -|Property|Value| -|---|---| -|Manufacturer|WorkChoice| -|Web page (non-official)|[http://thegreatgeekery.blogspot.com.es/2016/02/ecoplug-wifi-switch-hacking.html](http://thegreatgeekery.blogspot.com.es/2016/02/ecoplug-wifi-switch-hacking.html)| -|Build flag|ECOPLUG| - -### Flashing - -*TODO* - - - -[1]: https://www.itead.cc/sonoff-wifi-wireless-switch.html -[2]: https://www.itead.cc/sonoff-rf.html -[2]: https://www.itead.cc/sonoff-th.html -[4]: https://www.itead.cc/sonoff-pow.html -[5]: https://www.itead.cc/slampher.html -[6]: https://www.itead.cc/smart-socket.html diff --git a/docs/OTA.md b/docs/OTA.md deleted file mode 100644 index 38ec909d..00000000 --- a/docs/OTA.md +++ /dev/null @@ -1,28 +0,0 @@ -# Over-the-air updates - -## Manually driven OTA updates - -Once you have flashed your board with the ESPurna firmware you can flash it again over-the-air using PlatformIO and the ```ota``` environment: - -```bash -> pio run -t upload -e node-debug-ota -> pio run -t uploadfs -e node-debug-ota -``` - -When using OTA environment it defaults to the IP address of the device in SoftAP mode. If you want to flash it when connected to your home network best way is to supply the IP of the device: - -```bash -> pio run -t upload -e node-debug-ota --upload-port 192.168.1.151 -> pio run -t uploadfs -e node-debug-ota --upload-port 192.168.1.151 -``` - -Please note that if you have changed the admin password from the web interface you will have to change it too in the platformio.ini file for the OTA to work. Check for the *upload_flags* option in your ota-enabled environment. - -## Automatic OTA updates - -You can also use the automatic OTA update feature. Check the [NoFUSS library][6] for more info. - -This options is disabled by default. Enable it in your firmware with the -DENABLE_FUSS build flag. - - -[6]: https://bitbucket.org/xoseperez/nofuss diff --git a/docs/Sensors.md b/docs/Sensors.md deleted file mode 100644 index 34bd1811..00000000 --- a/docs/Sensors.md +++ /dev/null @@ -1,3 +0,0 @@ -# Sensors - -*TODO* diff --git a/docs/Troubleshooting.md b/docs/Troubleshooting.md deleted file mode 100644 index 4e318157..00000000 --- a/docs/Troubleshooting.md +++ /dev/null @@ -1,13 +0,0 @@ -# Troubleshooting - -## Problems resetting the board - -After flashing the firmware via serial do a hard reset of the device (unplug & plug). There is an issue with the ESP.reset() method. Check [https://github.com/esp8266/Arduino/issues/1017][1] for more info. - -## Can't find espresiff8266_stage platform - -The fauxmoESP library requires the staging version of Arduino Core for ESP8266. Either you are using Arduino IDE or PlatformIO you will have to manually install this. Check the [documentation for the fauxmoESP library][2] for more info. - - -[1]: https://github.com/esp8266/Arduino/issues/1017 -[2]: https://bitbucket.org/xoseperez/fauxmoesp diff --git a/docs/images/electrodragon-flash.jpg b/docs/images/electrodragon-flash.jpg deleted file mode 100644 index b440bbdd..00000000 Binary files a/docs/images/electrodragon-flash.jpg and /dev/null differ diff --git a/docs/images/s20-flash.jpg b/docs/images/s20-flash.jpg deleted file mode 100644 index 6d0a4315..00000000 Binary files a/docs/images/s20-flash.jpg and /dev/null differ diff --git a/docs/images/slampher-flash1.jpg b/docs/images/slampher-flash1.jpg deleted file mode 100644 index 25bcc29e..00000000 Binary files a/docs/images/slampher-flash1.jpg and /dev/null differ diff --git a/docs/images/slampher-flash2.jpg b/docs/images/slampher-flash2.jpg deleted file mode 100644 index a3ab9b0b..00000000 Binary files a/docs/images/slampher-flash2.jpg and /dev/null differ diff --git a/docs/images/sonoff-dual-flash.jpg b/docs/images/sonoff-dual-flash.jpg deleted file mode 100644 index 93dd3c70..00000000 Binary files a/docs/images/sonoff-dual-flash.jpg and /dev/null differ diff --git a/docs/images/sonoff-flash.jpg b/docs/images/sonoff-flash.jpg deleted file mode 100644 index cf667938..00000000 Binary files a/docs/images/sonoff-flash.jpg and /dev/null differ diff --git a/docs/images/sonoff-pow-flash.jpg b/docs/images/sonoff-pow-flash.jpg deleted file mode 100644 index 7d177e48..00000000 Binary files a/docs/images/sonoff-pow-flash.jpg and /dev/null differ diff --git a/docs/images/sonoff-rf-flash.jpg b/docs/images/sonoff-rf-flash.jpg deleted file mode 100644 index 8265b982..00000000 Binary files a/docs/images/sonoff-rf-flash.jpg and /dev/null differ diff --git a/docs/images/sonoff-th-flash.jpg b/docs/images/sonoff-th-flash.jpg deleted file mode 100644 index 2e3dc3a1..00000000 Binary files a/docs/images/sonoff-th-flash.jpg and /dev/null differ diff --git a/images/devices/1ch-inching.jpg b/images/devices/1ch-inching.jpg new file mode 100644 index 00000000..fc227042 Binary files /dev/null and b/images/devices/1ch-inching.jpg differ diff --git a/images/devices/electrodragon-relay-board.jpg b/images/devices/electrodragon-relay-board.jpg new file mode 100644 index 00000000..8a6ac83b Binary files /dev/null and b/images/devices/electrodragon-relay-board.jpg differ diff --git a/images/devices/motor-switch.jpg b/images/devices/motor-switch.jpg new file mode 100644 index 00000000..576de922 Binary files /dev/null and b/images/devices/motor-switch.jpg differ diff --git a/images/devices/s20.jpg b/images/devices/s20.jpg new file mode 100644 index 00000000..695850a5 Binary files /dev/null and b/images/devices/s20.jpg differ diff --git a/images/devices/slampher.jpg b/images/devices/slampher.jpg new file mode 100644 index 00000000..d62d051f Binary files /dev/null and b/images/devices/slampher.jpg differ diff --git a/images/devices/sonoff-4ch.jpg b/images/devices/sonoff-4ch.jpg new file mode 100644 index 00000000..dea3fa45 Binary files /dev/null and b/images/devices/sonoff-4ch.jpg differ diff --git a/images/devices/sonoff-basic.jpg b/images/devices/sonoff-basic.jpg new file mode 100644 index 00000000..26f034cb Binary files /dev/null and b/images/devices/sonoff-basic.jpg differ diff --git a/images/devices/sonoff-dual.jpg b/images/devices/sonoff-dual.jpg new file mode 100644 index 00000000..8dbc4a37 Binary files /dev/null and b/images/devices/sonoff-dual.jpg differ diff --git a/images/devices/sonoff-led.jpg b/images/devices/sonoff-led.jpg new file mode 100644 index 00000000..33215c81 Binary files /dev/null and b/images/devices/sonoff-led.jpg differ diff --git a/images/devices/sonoff-pow.jpg b/images/devices/sonoff-pow.jpg new file mode 100644 index 00000000..c5458e25 Binary files /dev/null and b/images/devices/sonoff-pow.jpg differ diff --git a/images/devices/sonoff-rf.jpg b/images/devices/sonoff-rf.jpg new file mode 100644 index 00000000..70a14bb6 Binary files /dev/null and b/images/devices/sonoff-rf.jpg differ diff --git a/images/devices/sonoff-sv.jpg b/images/devices/sonoff-sv.jpg new file mode 100644 index 00000000..86ea2c44 Binary files /dev/null and b/images/devices/sonoff-sv.jpg differ diff --git a/images/devices/sonoff-th10-th16.jpg b/images/devices/sonoff-th10-th16.jpg new file mode 100644 index 00000000..a3e728d3 Binary files /dev/null and b/images/devices/sonoff-th10-th16.jpg differ diff --git a/images/devices/sonoff-touch.jpg b/images/devices/sonoff-touch.jpg new file mode 100644 index 00000000..5156a2cb Binary files /dev/null and b/images/devices/sonoff-touch.jpg differ diff --git a/images/devices/workchoice-ecoplug.jpg b/images/devices/workchoice-ecoplug.jpg new file mode 100644 index 00000000..2605517b Binary files /dev/null and b/images/devices/workchoice-ecoplug.jpg differ