ITEAD Sonoff switches and sockets - cheap ESP8266 Wifi+MQTT hardware

@Artyom_Syomushkin The device that was connected to the sonoff has a maximum power of 1800 Watt (so about 7.8 A). Maybe the tinning is an issue causing overloading below the specifications.

I just saw another user complain about the safety of the Sonoff devices:
http://support.iteadstudio.com/support/discussions/topics/11000012976

For switching a simple light it is probably ok. For higher loads (> 3A) I do not feel safe with Sonoff anymore.

That article reckons the fuse holder is at fault. It’s difficult to tell whether the overheating is from the tracks as I described before or from the actual fuse holder overheating.

I’m surprised, in the EN60669-1 test report that the fuse holders are not mentioned in the critical component list of the report. I don’t have a copy of EN60669-1 but from previous experience, fuse holders are always included in the report and should be a named part (manufacturer and part number).
This is not the case here which to me, makes the whole report a little bit suspect.

You need to install the openHAB add-on “MQTT action”.

:roll_eyes:…sometimes its that easy :)…THX Thomas :wink:

1 Like

It doesn’t seem as anybody here is really interested in using sonoff without flashing them. Anyway: here is code that emulates the sonoff cloud, and can easily being interested with the http binding into openhab.

Thanks for the hint, it’s great to hear, that there is a way.

For me and I believe most others the reasoning for flashing is probably the following: The Sonoff Tasmota firmware is free, open source, feature rich and cloud-decoupled. The module will henceforth communicate via MQTT and offer many functions and options not available with the original firmware. In retrospective I’d go as far and say that the Sonoff modules become especially interesting for home automation because of the Tasmota firmware.

1 Like

Is this also applicable to the sonoff led lights?

What is? Please remember that others can only work with details you provide.

I have been using Sonoff-Tasmota for my own build LED drivers with ESP-01 --> Sonoff "own build" and javascript

Sorry about that I’m hindsight that was not the most well phrased question.

The question(s) that I wanted to ask was: does flashing firmware with sonota/tosmota also work with the LED lights from sonoff, specifically the B1 LED light?
Has any one made an implementation of the sonoff LED lights with openhab, with dimming, color change and the works?

I see. Yes it’s supported and as far as I know all of these features work. See:

I have several sonoffs with tasmota already up and running with openhab but today I added a sonoff RF bridge with tasmota. I already let it learn my rf switches’ signals but now I have the problem of adding them to openhab.

Does anyone have the code (or an idea) to do it? I get messages like this (topic / content): sonoffs/tele/sonoffRFBridge/RESULT = {“RfReceived”:{“Sync”:8130, “Low”:270, “High”:800, “Data”:“4536B4”, “RfKey”:3}}
so I guess I need to react to the right message only in Openhab.

Something like:

Switch SonoffrfBridgeBtn3 "Button 3 is: [%s]" { mqtt="<[mosquitto:sonoffs/tele/rfbridge/???]" }

where I am unsure about the last part.

Thanks for the help!

You’ll need to work with the JsonPath transformation. That is documented here: https://github.com/arendst/Sonoff-Tasmota/wiki/openHAB#integration

Switch SonoffrfBridgeBtn3 "Button 3 is: [%s]" { "<[mosquitto:sonoffs/tele/sonoffRFBridge/RESULT:state:JSONPATH($.RfReceived.RfKey)]" }

Hi not sure if this is the right post,I can’t place my sonoff basic in programming mode,I push the button on the sonoff and I’ve soldered the pins to sonoff and USB to computer but not working?

You need to:

  • power of the sonoff
  • push the button and keep it pressed
  • power on the sonoff

Now you can release the button and start programming. Did you do that? Also you have switched RX/TX lines on your programmer?

1 Like

Have tried that ,I have looked online new sonoff basic have problems getting into programming mode?

Sonoff Pow Switches state undefined after Openhab 1.8.3 startup

I’m running OpenHAB 1.8.3 on a RaspBerry with two Sonoff Pow with Arendst Tasmota firmware 4.0.3: I know these are not the last versions, but as almost everything works I am reluctant to update!
From the OpenHAB web page I can operate the two switches. If I operate the switches from their web page, the openHAB web page is updated. The problem is that at OpenHAB startup the status of the switches is Undefined (this is happening daily as I stop and restart openhab after a backup) and they appear as OFF while in reality they are ON.

Here’s my item definition (the line is split for improved readability)

Switch SonoffPow1 "Appl1 "  <heat> (SwitchStatus)  {mqtt=">[broker:cmnd/sonoff-pow1/power:command:ON:1],
>[broker:cmnd/sonoff-pow1/power:command:OFF:0],
<[broker:stat/sonoff-pow1/POWER:state:default]", autoupdate="false"} 

I’ve subscribed to the topic “stat/sonoff-pow1/POWER” with mosquitto_sub and I’ve seen that nothing appears when OpenHAB starts.

I then modified the item adding the tele/sonoff-pow1/STATE topic as follows

Switch SonoffPow1 "SAppl1 "  <heat> (SwitchStatus)    {mqtt=">[broker:cmnd/sonoff-pow1/power:command:ON:1],
>[broker:cmnd/sonoff-pow1/power:command:OFF:0],
<[broker:stat/sonoff-pow1/POWER:state:default],
<[broker:tele/sonoff-pow1/STATE:state:JSONPATH($.POWER)]", autoupdate="false"} // :.*

This solution works but I wonder if I’m following the right path or if there are some other ways to solve this problem.
Should I force OpenHAB to submit a message “stat/sonoff-pow1/POWER” in the startup rule (if yes how?) so that the item SonoffPow1 will be updated?

You could probably do something with persistence to make it so that OH remembers the last state?
But what happens if the state is changed while your OH is rebooting…
I had the same question and the Tasmota guys reckon the “tele” topic and it’s STATE is a decent approach.

1 Like

Thank for your reply.
Would it be worth updating the wiki with these findings?

Not a bad idea… Do you know how to do it cause I never have?
This is an example of the “tele” topic from a 4 channel Sonoff named “sonoff4ch01”.
I see it publishing this topic every 5 minutes.

Topic : tele/sonoff4ch01/STATE
Payload : {“Time”:“2017-11-13T07:52:27”, “Uptime”:0, “Vcc”:3.157, “POWER1”:“OFF”, “POWER2”:“ON”, “POWER3”:“ON”, “POWER4”:“ON”, “Wifi”:{“AP”:1, “SSId”:“MyWifiDontTouch”, “RSSI”:82, “APMac”:“AA:BB:CC:DD:EE:FF”}}