Sonoff Devices / Sonoff with Tasmota

InternetLuddite

Expert Member
Joined
Feb 23, 2016
Messages
1,390
Questions on Sonoff devices here including those flashed with Tasmota.

Important posts , references can be included in this first post ..

Edit:-
17/12/2019: How to Flash Sonoff to Tasmota :- For Windows use Tasmota-PyFlasher https://github.com/arendst/Tasmota/wiki/Flashing . Latest Tasmota Flash Binary will be found here:- http://thehackbox.org/tasmota/tasmota.bin

09/01/2020:-
Also get Termite(https://www.compuphase.com/software_termite.htm) , so that once your sonoff is flashed, and it reboots with Tasmota, you can use the current FTDI connection to send the configuration for WiFi etc

This is what I normally paste into the terminal using Termite connected to the Tasmota Sonoff after reboot.

Change everything in BOLD to your specific use case.
Backlog SSID1 WIFIAP; Password1 WIFIPASSWORD; MqttHost HASSIOIPADDRESS; MqttUser MQTTUSERNAME; MqttPassword REDACTED; Hostname Pool_Pump; MqttClient Pool_Pump; Topic Pool_Pump; FriendlyName1 Pool-Pump

Second config I push into each tasmota:-
backlog Switchretain 1;Powerretain 1;Timezone 2;latitude -26.000000;longitude 28.000000

Then you should see the device come online connect to your WiFI and then you will be able to connect to the web page to do other things
 
Last edited:

InternetLuddite

Expert Member
Joined
Feb 23, 2016
Messages
1,390
First Questions:-

Sonoff L1 LED Strips:-

Questions for anyone who has experience:- is it possible to drive 10m of strip from one controller and power supply that is provided?

Can it be flashed with Tasmota so it be managed inside Hass?

How bright does it get?

Sonoff POW R2
Want to connect one to monitor my fridges. Don’t need remote off/on functionality - just want to monitor the power. If flashed with Tasmota, how can I be sure that the switch will always in an ON state even after power failures, and to ensure it can never be turned off as one can normally do? Is it possible?
 

Tander

Executive Member
Joined
Jun 8, 2008
Messages
5,582
Don't know about those strips. But I was literally just watching this video from The Hookup. Explains the general basics for all LED strips and what to look out for etc.

 

Dolby

Honorary Master
Joined
Jan 31, 2005
Messages
27,634
How bright does it get?[/QUOTE]

I've got the strip - brightness isn't bad (better than the globes) and I don't even run full brightness at night, as I prefer a glow

My annoyance with it is that it doesn't link to IFTTT, if you use that - so I can't use something (Like TV on) as a trigger

752908
 

InternetLuddite

Expert Member
Joined
Feb 23, 2016
Messages
1,390
I have Philips hue strips that work great behind my TV but are expensive. Have a routine that gradually brightens up the light starting 10 mins after sunset. Works like a bomb so lounge is washed with light even if we not in the room. I think that was with ifttt and hue integration. It's works so reliably that I have never looked at it since it was setup. Would be a bummer that I can't do with sonoff L1.
 

InternetLuddite

Expert Member
Joined
Feb 23, 2016
Messages
1,390
So I got a Sonoff L1 via a friend who bought a few from smarkit. Was gonna try to flash to tasmota but it looks a bit impossible. Thought I would then just test ewelink for the first time and a bit of a pain - had to disable 5Ghz on my iOT SSID (UBIQUITI ROCKS ).

As a test just have it on top of kitchen cupboard, and compared to Hue, definitely dimmer. Also as it isn't a RGBW strip , there is no pure white.(if you want that).

Added Alexa Skill. Alexa can't find the strip. Try to add it to google home, Google home doesn't accept my ewelink credentials even though they are correct.

So now wondering if I should be buying a few more for this pool project of just sucking it up and buying more hue strip lights.
 

Dolby

Honorary Master
Joined
Jan 31, 2005
Messages
27,634
disable 5Ghz on my iOT SSID (UBIQUITI ROCKS )
That's an (almost) universal issue with (nearly) all IoT / smarthome devices.

But you're just disabling the 5Ghz during the initial setup - then you can switch back to dual band.

Added Alexa Skill. Alexa can't find the strip
I haven't had an issue with Alexa picking it up - I use it every night to switch on and off. I use a routine in Alexa that it switches off along with all the other lights at the trigger 'goodnight'

Try to add it to google home, Google home doesn't accept my ewelink credentials even though they are correct
I still have my Google Home (in the cupboard!) - but I'll try link it up and see if I have the same issue.

There are, however, two bizarre issues I find with the L1 :

1 - It doesn't work with IFTTT like all the other Sonoff devices
2 - It doesn't have Power On State like all the other Sonoff devices
 

InternetLuddite

Expert Member
Joined
Feb 23, 2016
Messages
1,390
That's an (almost) universal issue with (nearly) all IoT / smarthome devices.

But you're just disabling the 5Ghz during the initial setup - then you can switch back to dual band.



I haven't had an issue with Alexa picking it up - I use it every night to switch on and off. I use a routine in Alexa that it switches off along with all the other lights at the trigger 'goodnight'



I still have my Google Home (in the cupboard!) - but I'll try link it up and see if I have the same issue.

There are, however, two bizarre issues I find with the L1 :

1 - It doesn't work with IFTTT like all the other Sonoff devices
2 - It doesn't have Power On State like all the other Sonoff devices
Thanks for feedback. When power is stable again and I have time, I will check everything again. For google home however, I am using just my phone. It manages my Sonos on hue lights . Love being able to tell my phone regardless of where In the world I am , ok google , turn on lounge... :) must see if I can actually start the Sonos speaker.
 

Dairyfarmer

Expert Member
Joined
Apr 17, 2016
Messages
3,680
I'm just starting to use Sonoff switches. I just installed one to replace the day/night switch on my spotlights. Not only was it a lot cheaper, but I can now set the on/off times during load shedding as my spots are on my inverter system.

Anyway regarding Tasmota. Can it be installed OTA? Can the flashed device work with no internet access? I am interested in deploying programmed switches in areas that are not covered by wifi.

An example is where we have pump houses that need security lights or on borehole pump controller boxes. Currently we use geyser timers. They cost about upward of R300 a pop. Day/night switches are R170+. Where as Sonoff basic switches cost between R70 (10A) and R180 (16A). I know that I can program them at the office and then go deploy them, but it would be nice to be able to go manage them at the site.
 

Sinbad

Honorary Master
Joined
Jun 5, 2006
Messages
69,686
Had to reflash one of my sonoff switches the other day - no idea what happened.
The ecosystem around Tasmota has developed really nicely, especially Tasmotizer! What a pleasure, compared to the old days of custom arduino builds and uploads.
 

patrick123

Expert Member
Joined
Apr 10, 2005
Messages
2,703
I'm just starting to use Sonoff switches. I just installed one to replace the day/night switch on my spotlights. Not only was it a lot cheaper, but I can now set the on/off times during load shedding as my spots are on my inverter system.

Anyway regarding Tasmota. Can it be installed OTA? Can the flashed device work with no internet access? I am interested in deploying programmed switches in areas that are not covered by wifi.

An example is where we have pump houses that need security lights or on borehole pump controller boxes. Currently we use geyser timers. They cost about upward of R300 a pop. Day/night switches are R170+. Where as Sonoff basic switches cost between R70 (10A) and R180 (16A). I know that I can program them at the office and then go deploy them, but it would be nice to be able to go manage them at the site.
I cannot say for the latest Sonoff if they can be flashed OTA, but once flashed however, you are able to set the time( set TZ for our Timezone and Daylight savings) and you are able to program them with a schedule so even if Home Assistant dies, they can continue to run autonomously.

They did not need internet access to be flashed but an access point from your server to where the latest bin file has been downloaded.
 

Dairyfarmer

Expert Member
Joined
Apr 17, 2016
Messages
3,680
@patrick123 Thanks. I'll start with programing one on the LAN and then deploy it remotely and see how they run for a few weeks. Not sure if they need to periodically connect to a NTP server. Will be interesting.
 

patrick123

Expert Member
Joined
Apr 10, 2005
Messages
2,703
@patrick123 Thanks. I'll start with programing one on the LAN and then deploy it remotely and see how they run for a few weeks. Not sure if they need to periodically connect to a NTP server. Will be interesting.
That, I cannot say where they get the time, but I always noticed an hour difference. I did find a setting for UTC and daylight savings though.
If you don't come right, give me a shout.
 

InternetLuddite

Expert Member
Joined
Feb 23, 2016
Messages
1,390
So a year to the day (since I last did it) , I am trying to flash my newly acquired sonoffs from smarkit with tasmota. POW R2s , basics and duals.

For the life of me , while the device is powering up via the flashing converter thing, I can't figure out how to put the sonoffs into flashing mode.

I push the button on the POW R2, then connect the flashing converter thing into PC which starts powering up. As soon as that happens , 1-2 seconds later I let go of the button on the Sonoff and it should be in flashing mode - however whether I use the old easyesp flashing tool (that I used last year) or the new tasmota-pyflasher, the software can't connect to flash it.

Since the com port is found and a connection is initiated , I think I am failing because I am missing a step I can't find.
How does one put the pow r2 and others into flashing mode? And is there a way to see via a console port if it is in flashing mode?
 
Last edited:

InternetLuddite

Expert Member
Joined
Feb 23, 2016
Messages
1,390
@patrick123 Thanks. I'll start with programing one on the LAN and then deploy it remotely and see how they run for a few weeks. Not sure if they need to periodically connect to a NTP server. Will be interesting.
That, I cannot say where they get the time, but I always noticed an hour difference. I did find a setting for UTC and daylight savings though.
If you don't come right, give me a shout.
For my devices, i used the following:-
Timezone 2
latitude -26.XXXX
longitude 28.YYYY

This way the devices know exactly where they are and then use sunrise/sunset as triggers to turn on or off. Using basics over the day/night switches. Works really well. But I guess still needs internet to get update sunrise/setset schedules?

For just NTP, you could use this (assuming your router or some network device provides time)
NtpServer<x>​
NTP server setup (x= 1..3)
0 = clear NtpServer<x> settings
1 = reset NtpServer<x> settings to firmware defaults
<value> = set NtpServer<x> host or IP address (32 char limit)​
 

riscbroker

Expert Member
Joined
Sep 29, 2006
Messages
1,906
So a year to the day (since I last did it) , I am trying to flash my newly acquired sonoffs from smarkit with tasmota. POW R2s , basics and duals.

For the life of me , while the device is powering up via the flashing converter thing, I can't figure out how to put the sonoffs into flashing mode.

I push the button on the POW R2, then connect the flashing converter thing into PC which starts powering up. As soon as that happens , 1-2 seconds later I let go of the button on the Sonoff and it should be in flashing mode - however whether I use the old easyesp flashing tool (that I used last year) or the new tasmota-pyflasher, the software can't connect to flash it.

Since the com port is found and a connection is initiated , I think I am failing because I am missing a step I can't find.
How does one put the pow r2 and others into flashing mode? And is there a way to see via a console port if it is in flashing mode?
I can't comment about putting the Sonoff POW into firmware flashing mode, but what I have found is that there are two distinctly different modes when connecting the Sonoff basic to LAN. The first mode is achieved by holding the button down for about 7 seconds. Once the mode changes (3 brief flashes, brief pause and repeat), you release the button and then hold it down again, which leads to a constant rapid flashing after a few seconds. Maybe you could try this.
 

Sinbad

Honorary Master
Joined
Jun 5, 2006
Messages
69,686
The pows you need to short a contact to ground if I remember right, as the button isn't connected to the right gpio pin
 

SauRoNZA

Honorary Master
Joined
Jul 6, 2010
Messages
36,216
So a year to the day (since I last did it) , I am trying to flash my newly acquired sonoffs from smarkit with tasmota. POW R2s , basics and duals.

For the life of me , while the device is powering up via the flashing converter thing, I can't figure out how to put the sonoffs into flashing mode.

I push the button on the POW R2, then connect the flashing converter thing into PC which starts powering up. As soon as that happens , 1-2 seconds later I let go of the button on the Sonoff and it should be in flashing mode - however whether I use the old easyesp flashing tool (that I used last year) or the new tasmota-pyflasher, the software can't connect to flash it.

Since the com port is found and a connection is initiated , I think I am failing because I am missing a step I can't find.
How does one put the pow r2 and others into flashing mode? And is there a way to see via a console port if it is in flashing mode?

Seems about right.

You've likely setup the software tool wrong, or not touching pins.
 
Top