Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revisionBoth sides next revision | ||
sonoff [23.01.2018 21:50] – [Making the installation permanent] Pascal Suter | sonoff [10.03.2018 04:40] – [Falshing Tasmota Firmware] Pascal Suter | ||
---|---|---|---|
Line 11: | Line 11: | ||
===== alternative firmware ===== | ===== alternative firmware ===== | ||
* [[https:// | * [[https:// | ||
- | * works also on some other ESP based devices | + | * works also on lots of ESP based devices |
* provides control via serial / web / MQTT | * provides control via serial / web / MQTT | ||
===== What I intend to do with it ===== | ===== What I intend to do with it ===== | ||
Line 22: | Line 22: | ||
at first i will use the existing MQTT bridge for DS which uses the Web-API. In the future i would like to write a little module that uses the Virtual Device API of digitalSTROM which would allow me to emualte a digitalSTROM device for my sonoff. this would make the integration even smoother and there would be no need for an external rules engine anymore. However, i'll get started with the web-api and rules engine first, as I'd like to try out some MQTT stuff first :) | at first i will use the existing MQTT bridge for DS which uses the Web-API. In the future i would like to write a little module that uses the Virtual Device API of digitalSTROM which would allow me to emualte a digitalSTROM device for my sonoff. this would make the integration even smoother and there would be no need for an external rules engine anymore. However, i'll get started with the web-api and rules engine first, as I'd like to try out some MQTT stuff first :) | ||
+ | ===== The simple solution ===== | ||
+ | Isn't there a simple solution to that? Shure there is, but what fun would it be? :) | ||
+ | |||
+ | the digitalSTROM server comes with some " | ||
+ | |||
+ | You can either flash the Tasmona firmware as described below or hack your sonoff in any other way with any other firmware or even with the original firmware in place. All you need to achieve is, that you can send a http-get request to the sonoff to turn the light on and off. Tasmona does that, and since I am going to use it anyway for my project, I will assume you also flashed that. Also this solution requires the sonoff to have a static IP .. either do this with a reservation in your DHCP server or enter a fixed IP in the web-interface of Tasmona. | ||
+ | |||
+ | In the dss web menu go to apps and open the '' | ||
+ | |||
+ | Create a second Responder, but this time select all other scenes in the same room as trigger (you can do that by holding CTRL on your keyboard while clicking on all the scenes you do NOT want your light to be on). then as action use again Call URL but this time enter '' | ||
+ | |||
+ | that's it, you're all set. Congratulations you just saved yourself a day worth of fiddling with tools and scripts :) So why am I still going down the complicated route.. well, mainly **because I can** :) and also because i want to use more devices including some input devices in the future to do more complicated stuff which exceeds the capabilities of my DSS. Also, the Event-Responder is quite slow, it is even slower than my first solution with the DSS-API based mqtt-connector. So expect to wait 2-3 seconds for your light to go on. Unless you have a newer DSS than me. The newer models (DSS20 and 22) have faster cpu's and should be able to process these responders alot quicker. | ||
===== Falshing Tasmota Firmware ===== | ===== Falshing Tasmota Firmware ===== | ||
this is straight forward, just follow the guides on the [[https:// | this is straight forward, just follow the guides on the [[https:// | ||
Line 30: | Line 42: | ||
Here are the steps it took to flash the stock sonoff (current and more detailed instructions can be found in the [[https:// | Here are the steps it took to flash the stock sonoff (current and more detailed instructions can be found in the [[https:// | ||
- | - download the latest | + | - [[setup arduino IDE for ESP8266]] |
- | - create a subdirectory called '' | + | |
- | - start your arduino IDE and go to '' | + | |
- | - select OK and go to '' | + | |
- download the sourcecode tar.gz or zip package from the [[https:// | - download the sourcecode tar.gz or zip package from the [[https:// | ||
- extract the contents of the '' | - extract the contents of the '' | ||
- | - verify your settings under Tools are like these: < | ||
- | Board: " | ||
- | Flash Mode: " | ||
- | Flash Size: "1M (no SPIFFS)" | ||
- | Debug Port: " | ||
- | Debug Level: " | ||
- | LwIP Variant: "v2 Prebuilt (MSS=536)" | ||
- | Reset Method: " | ||
- | Crystal Frequency: "26 MHz" | ||
- | Flash Frequency: " | ||
- | Upload Using: " | ||
- | CPU Frequency: "80 MHz" | ||
- | Upload Speed: " | ||
- | Port: Your COM port connected to sonoff | ||
- | </ | ||
- edit '' | - edit '' | ||
- **make sure your sonoff is disconnected from the AC power lines*** | - **make sure your sonoff is disconnected from the AC power lines*** | ||
Line 140: | Line 134: | ||
Now that we got both our devices connected to the MQTT Broaker it is time to set up a Rules engine, to conenct the two together :) | Now that we got both our devices connected to the MQTT Broaker it is time to set up a Rules engine, to conenct the two together :) | ||
- | [[https:// | + | [[node-red]] looks like a very capable and interesting Rules engine. I have also spotted another interesting open source project called [[https:// |
installation is again very easy through npm: | installation is again very easy through npm: | ||
Line 264: | Line 258: | ||
now restore your node-red settings | now restore your node-red settings | ||
+ | |||
+ | ===== Next Steps ===== | ||
+ | try to get '' | ||
===== Future projects ===== | ===== Future projects ===== | ||
eventually I'd like to write a script that uses the [[https:// | eventually I'd like to write a script that uses the [[https:// | ||
+ | |||
+ | see my progress on that at [[MQTT for digitalSTROM]] |