Revision history for SonoffSetup2017
Additions:
Ensure switch on Bridge is off in programming mode, Remember to switch it back on in use.
The button is onnected to D0... for programming/flashing hold in on power up.
Pic of the correct FTDI connections.
Note, I could not get programming work work on the headers in the middle... are they the same pins?? not sure - see photos (and links below) for the correct header location to use.
**Info on new RF Bridge Layout**
https://github.com/arendst/Sonoff-Tasmota/issues/1126
The button is onnected to D0... for programming/flashing hold in on power up.
Pic of the correct FTDI connections.
Note, I could not get programming work work on the headers in the middle... are they the same pins?? not sure - see photos (and links below) for the correct header location to use.
**Info on new RF Bridge Layout**
https://github.com/arendst/Sonoff-Tasmota/issues/1126
Deletions:
Info on new RF Bridge Layout: https://github.com/arendst/Sonoff-Tasmota/issues/1126
Additions:
==== Sonoff RF Bridge (2018 version)====
https://github.com/arendst/Sonoff-Tasmota/issues/1916
**Adding remotes and 433 devices to an RF Bridge**
https://github.com/arendst/Sonoff-Tasmota/issues/1916
**Adding remotes and 433 devices to an RF Bridge**
Deletions:
Tested and working.
**Sonoff RF Bridge (2018 version)**
====Adding remotes and 433 devices to an RF Bridge====
Additions:
Info on new RF Bridge Layout: https://github.com/arendst/Sonoff-Tasmota/issues/1126
Additions:
- The UDev rules should be added to. Platform I/O suggests this (as root)
%%curl -fsSL https://raw.githubusercontent.com/platformio/platformio-core/develop/scripts/99-platformio-udev.rules > /etc/udev/rules.d/99-platformio-udev.rules%%
http://docs.platformio.org/en/latest/faq.html#platformio-command-not-found-an-error-pkg-resources-distributionnotfound
- check serial data for IP of device and that it connects to wifi etc. This will help a lot if it isn't doing what you think it should.
====Adding remotes and 433 devices to an RF Bridge====
https://github.com/arendst/Sonoff-Tasmota/issues/1181
Essentially you go to the console (via the web interface) and type RfKey1 2 . The sonoff will beep once, then you press a button on the remote. The Sonoff will beep a couple of times.
%%curl -fsSL https://raw.githubusercontent.com/platformio/platformio-core/develop/scripts/99-platformio-udev.rules > /etc/udev/rules.d/99-platformio-udev.rules%%
http://docs.platformio.org/en/latest/faq.html#platformio-command-not-found-an-error-pkg-resources-distributionnotfound
- check serial data for IP of device and that it connects to wifi etc. This will help a lot if it isn't doing what you think it should.
====Adding remotes and 433 devices to an RF Bridge====
https://github.com/arendst/Sonoff-Tasmota/issues/1181
Essentially you go to the console (via the web interface) and type RfKey1 2 . The sonoff will beep once, then you press a button on the remote. The Sonoff will beep a couple of times.
Deletions:
Additions:
====Issues with USB serial====
====Setup the firmware before flashing====
- Update the user_config.h with wireless SSID, Password (as MINIMUM) and MQTT server details
- change the value of #define CFG_HOLDER - otherwise the values won't stick. Suggest incrementing by 1.
====Setup the firmware before flashing====
- Update the user_config.h with wireless SSID, Password (as MINIMUM) and MQTT server details
- change the value of #define CFG_HOLDER - otherwise the values won't stick. Suggest incrementing by 1.
Deletions:
====Setup the firmware & flash====
- Update the user_config.h with wireless SSID, Password and MQTT server details
Additions:
====Correct Connections for FTDI====
Tested and working.
**Sonoff RF Bridge (2018 version)**
Ensure switch on Bridge is off, and button is D0 for programming
Pins TDI: Blue GND, CTS (No connection) Orange VCC, Green (TXD), Yellow (RXD), DTR (No Connection)
Sonoff: Blue (GND), Yellow (TX), Green (RX), Orange (VCC 3.3v)
https://photos.app.goo.gl/EAVtb427VNELB9a33
** 4 Channel Switch**
https://photos.app.goo.gl/VJg2FZHWuzAYtyGM6
Tested and working.
**Sonoff RF Bridge (2018 version)**
Ensure switch on Bridge is off, and button is D0 for programming
Pins TDI: Blue GND, CTS (No connection) Orange VCC, Green (TXD), Yellow (RXD), DTR (No Connection)
Sonoff: Blue (GND), Yellow (TX), Green (RX), Orange (VCC 3.3v)
https://photos.app.goo.gl/EAVtb427VNELB9a33
** 4 Channel Switch**
https://photos.app.goo.gl/VJg2FZHWuzAYtyGM6
Additions:
====MQTT Example for 4 Channel====
Publish cmnd/sonoff-mollie-fan/power4 with a message of 1
Publish cmnd/sonoff-mollie-fan/power4 with a message of 1
Additions:
- subscribe to stat/sonoff/POWER (seems to need caps?)
Deletions:
Additions:
- Probably need to logout and in again to make this work
Later I had more permissions on this TTY and had to change permissions on this port
%%sudo chmod a+rw /dev/ttyUSB0%%
Later I had more permissions on this TTY and had to change permissions on this port
%%sudo chmod a+rw /dev/ttyUSB0%%
Additions:
- Open Project, click on the Sonoff-Tasmota-development folder
- in the Sonoff-Tasmota-development folder is a platformio.ini file. Click on it
- in the Sonoff-Tasmota-development folder is a platformio.ini file. Click on it
Deletions:
Additions:
- Atom complained clang wasn't installed, needed to install in ubuntu
%%sudo apt-get install clang
%%
%%sudo apt-get install clang
%%
Additions:
- install packages, "platform-ide" (from within the Atom menus - recent versions... it may already be installed))
Deletions:
Additions:
- install packages, "platform-ide" (from within the Atom menus)
Deletions:
Additions:
%%sudo adduser $USER dialout%%
Additions:
- https://github.com/arendst/Sonoff-Tasmota/wiki/Hardware-Preparation
Additions:
Pins TDI: Blue GND, Orange VCC, Green TXD, Yellow RXD
Sonoff: Tot to bottom: Blue (GND), Yellow, Green, Orange (VCC 3.3v)
Sonoff: Tot to bottom: Blue (GND), Yellow, Green, Orange (VCC 3.3v)
Additions:
Then, whenever mains is switched on, it turns on... and turn on time seems to be about half a second, so pretty much little difference noticeable between that and a normal switch. About 25 seconds later it will pick up the on/off value from mqtt server (if it is available)
Deletions:
Additions:
I can just chuck in a sonoff in a light circuit anywhere, and set it up (eg pull out a downlight and install a sonoff in-line). I use the existing main switch - and it works normally without any mqtt server running. Later I put some buttons in another flush box beside the mains switch (ELV buttons, connected to the sonoff, or a sonoff dev or NodeMCU etc), and cover the mains switch with a flip pdl plates. The new buttons just change the values in MQTT server.
Deletions:
Additions:
====Bulk Sonoff Order, August 2017====
https://docs.google.com/spreadsheets/d/1eKHTiDvcRtCvblBAWTz8rt6XeRTrIfBDK974giLYWFE/edit?usp=drivesdk
https://docs.google.com/spreadsheets/d/1eKHTiDvcRtCvblBAWTz8rt6XeRTrIfBDK974giLYWFE/edit?usp=drivesdk
Additions:
Once flashed, I set the 'startup mode' to be on, so it can be used as a normal switch. I didn't really have to worry about running buttons into its i/o.
Then, whenever mains is switched on, it turns on... and turn on time seems to be about half a second, so pretty mush little difference noticeable between that and a normal switch. About 25 seconds later it will pick up the on/off value from mqtt server (if it is available)
I can just chuck in a sonoff in a light circuit anywhere, and set it up (eg pull out a downlight and install a sonoff in-line). I use the existing main switch - and it works normally without any mqtt server running. Later I put some buttons in another flush box beside the mains switch, and cover the mains switch with a flip pdl plates.
Then, whenever mains is switched on, it turns on... and turn on time seems to be about half a second, so pretty mush little difference noticeable between that and a normal switch. About 25 seconds later it will pick up the on/off value from mqtt server (if it is available)
I can just chuck in a sonoff in a light circuit anywhere, and set it up (eg pull out a downlight and install a sonoff in-line). I use the existing main switch - and it works normally without any mqtt server running. Later I put some buttons in another flush box beside the mains switch, and cover the mains switch with a flip pdl plates.
Deletions:
I can just chuck in a sonoff in a light circuit anywhere, and set it up. I use the existing main switch - and it works normally without any mqtt server running. Later I put some buttons in another flush box beside the mains switch, and cover the mains switch with a flip pdl plates.
Additions:
- - local mains isolation with the pdl switch (but covered so it isn't bumped)
- - lights useable with no mqtt and/or wifi running... with the following disadvantages:
- - ability to split lighting ccts in the ceiling space (no need to get into the mains flush box... just throw in more cable and another sonoff)
- - I can put a ceiling fan on the same isolation cct, but control it with sonoffs (using 4 channel)
- - lights useable with no mqtt and/or wifi running... with the following disadvantages:
- - ability to split lighting ccts in the ceiling space (no need to get into the mains flush box... just throw in more cable and another sonoff)
- - I can put a ceiling fan on the same isolation cct, but control it with sonoffs (using 4 channel)
Deletions:
- lights useable with no mqtt and/or wifi running... with the following disadvantages:
- ability to split lighting ccts in the ceiling space (no need to get into the mains flush box... just throw in more cable and another sonoff)
- I can put a ceiling fan on the same isolation cct, but control it with sonoffs (using 4 channel)
Additions:
-
- local mains isolation with the pdl switch (but covered so it isn't bumped)
- lights useable with no mqtt and/or wifi running... with the following disadvantages:
- ability to split lighting ccts in the ceiling space (no need to get into the mains flush box... just throw in more cable and another sonoff)
..... obviously this only works with wifi/mqtt running though
- I can put a ceiling fan on the same isolation cct, but control it with sonoffs (using 4 channel)
- local mains isolation with the pdl switch (but covered so it isn't bumped)
- lights useable with no mqtt and/or wifi running... with the following disadvantages:
- ability to split lighting ccts in the ceiling space (no need to get into the mains flush box... just throw in more cable and another sonoff)
..... obviously this only works with wifi/mqtt running though
- I can put a ceiling fan on the same isolation cct, but control it with sonoffs (using 4 channel)
Deletions:
- lights useable with no mqtt and/or wifi running... with the following disadvantages:
- ability to split lighting ccts in the ceiling space (no need to get into the mains flush box... just throw in more cable and another sonoff)
- can put a ceiling fan on the same isolation cct, but control it with sonoffs (using 4 channel)
..... obviously this only works with wifi/mqtt running though
Additions:
====Final Setup Test====
Once flashed, I set the 'startup mode' to be on, so it can be used as a normal switch. I didn't really have to worry about running buttons into it's i/o. Then, whenever mains is switched on, it turns on... and turn on time seems to be about half a second. About 25 seconds later it will pick up the on/off value from mqtt server (if it is available)
**Advantages with this setup:**
I can just chuck in a sonoff in a light circuit anywhere, and set it up. I use the existing main switch - and it works normally without any mqtt server running. Later I put some buttons in another flush box beside the mains switch, and cover the mains switch with a flip pdl plates.
**I then get:**
- local mains isolation with the pdl switch (but covered so it isn't bumped)
- lights useable with no mqtt and/or wifi running... with the following disadvantages:
...... I'll be wasting power if power outage occurs and wifi/mqtt doesn't come back up
...... There will be some annoyance in a power outage, with possibly 30 seconds of lighting at night after a power cut until sonoff connects back to wifi/mqtt
- ability to split lighting ccts in the ceiling space (no need to get into the mains flush box... just throw in more cable and another sonoff)
- can put a ceiling fan on the same isolation cct, but control it with sonoffs (using 4 channel)
..... obviously this only works with wifi/mqtt running though
====Devices====
====useful youtube tutorials====
====Tasmota====
====Atom Text Editor with platform i/o====
====Isues with USB serial====
====Setup the firmware & flash====
====Connect Sonoff====
====Monitor the serial happenings====
====Configure it more on its web interface if you like====
====MQTT====
Once flashed, I set the 'startup mode' to be on, so it can be used as a normal switch. I didn't really have to worry about running buttons into it's i/o. Then, whenever mains is switched on, it turns on... and turn on time seems to be about half a second. About 25 seconds later it will pick up the on/off value from mqtt server (if it is available)
**Advantages with this setup:**
I can just chuck in a sonoff in a light circuit anywhere, and set it up. I use the existing main switch - and it works normally without any mqtt server running. Later I put some buttons in another flush box beside the mains switch, and cover the mains switch with a flip pdl plates.
**I then get:**
- local mains isolation with the pdl switch (but covered so it isn't bumped)
- lights useable with no mqtt and/or wifi running... with the following disadvantages:
...... I'll be wasting power if power outage occurs and wifi/mqtt doesn't come back up
...... There will be some annoyance in a power outage, with possibly 30 seconds of lighting at night after a power cut until sonoff connects back to wifi/mqtt
- ability to split lighting ccts in the ceiling space (no need to get into the mains flush box... just throw in more cable and another sonoff)
- can put a ceiling fan on the same isolation cct, but control it with sonoffs (using 4 channel)
..... obviously this only works with wifi/mqtt running though
====Devices====
====useful youtube tutorials====
====Tasmota====
====Atom Text Editor with platform i/o====
====Isues with USB serial====
====Setup the firmware & flash====
====Connect Sonoff====
====Monitor the serial happenings====
====Configure it more on its web interface if you like====
====MQTT====
Deletions:
**useful youtube tutorials**
**Tasmota**
**Atom Text Editor with platform i/o**
**Isues with USB serial**
**Setup the firmware & flash**
**Connect Sonoff**
**Monitor the serial happenings**
**Configure it more on its web interface if you like**
**MQTT**
Additions:
--
CategoryMicrocontrol
CategoryHomeAutomation
CategoryLinux
CategoryMicrocontrol
CategoryHomeAutomation
CategoryLinux
Additions:
======Flashing and using a Sonoff with Tasmota firmware======
**Devices**
https://www.itead.cc/sonoff-wifi-wireless-switch.html
**Devices**
https://www.itead.cc/sonoff-wifi-wireless-switch.html
Additions:
**useful youtube tutorials**
http://www.andremiller.net/content/programming-an-itead-sonoff-wireless-smart-switch-esp8266
**Tasmota**
**Atom Text Editor with platform i/o**
- install Atom https://atom.io/
- install packages, "platform-ide"
- had issues with Clang in Ubuntu... Go to Atom's Preferences menu, click packages, autocomplete-clang, settings, and change 'Clang Command" from "clang" to clang-4.0 (or the version running on your linux)
- Open Project, click on the Sonoff-Tasmota-Master folder
**Isues with USB serial**
- in Ubuntu, I needed to add my user to the dialout group
**Setup the firmware & flash**
**Connect Sonoff**
- solder the board pins (see tutorials everywhere)
- Set up a usb ftdi/serial programmer (I got a ch340g for $8 from trademe)
- make sure you set it to 3.3V...
**Monitor the serial happenings**
- Use Atoms inbuilt serial monitor 115200, /dev/ttyUSB0 (in my case)
**Configure it more on its web interface if you like**
- Can also add new firmware like this if needed
**MQTT**
- Get a MQTT client, I used MQTTlens for chrome, mqttfx was too flakey
- subscribe to stat/sonoff/power
- publish cmnd/sonoff/power toggle (or on/off)
http://www.andremiller.net/content/programming-an-itead-sonoff-wireless-smart-switch-esp8266
**Tasmota**
**Atom Text Editor with platform i/o**
- install Atom https://atom.io/
- install packages, "platform-ide"
- had issues with Clang in Ubuntu... Go to Atom's Preferences menu, click packages, autocomplete-clang, settings, and change 'Clang Command" from "clang" to clang-4.0 (or the version running on your linux)
- Open Project, click on the Sonoff-Tasmota-Master folder
**Isues with USB serial**
- in Ubuntu, I needed to add my user to the dialout group
**Setup the firmware & flash**
**Connect Sonoff**
- solder the board pins (see tutorials everywhere)
- Set up a usb ftdi/serial programmer (I got a ch340g for $8 from trademe)
- make sure you set it to 3.3V...
**Monitor the serial happenings**
- Use Atoms inbuilt serial monitor 115200, /dev/ttyUSB0 (in my case)
**Configure it more on its web interface if you like**
- Can also add new firmware like this if needed
**MQTT**
- Get a MQTT client, I used MQTTlens for chrome, mqttfx was too flakey
- subscribe to stat/sonoff/power
- publish cmnd/sonoff/power toggle (or on/off)
Deletions:
Used Atom Text Editor
- install packages, platform-ide
- issues with Clang in Ubuntu? Go to Atom's Preferences menu, click packages, autocomplete-clang, settings, and change 'Clang Command" from "clang" to clang-4.0 (or the version running on your linux)
- Open Project, click Sonoff-Tasmota-Master folder
- in Ubuntu, needed to add my user to the dialout group
- Use the inbuilt serial monitor 115200, /dev/ttyUSB0 (in my case)