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

Hello Jan,
the solution should be clear from the actual messages on those topics. Use a stand alone client to capture them, then build your jsonpath transformation accordingly. If in doubt please post the messages.

Thanks ThomDietrich, the problem is it seems that there is no message with this topic, i am using mqqt-spy and the topic does not give any message. What i receive you can see in the screenshot. No INFO, NO STATUS messages. I also cannot trigger them or i am missing something here

Gary you should have bought my SONOFF’s LOL, I better not mention my ebay shop id as its probably not allowed

Thats the Chinese ripping the Chinese off

Have a look at the console window in the SonOff and establish how the correct topics look like. If you are using a localised version then the State topic might read Status (or similar).


A correct item definition should read (corresponding to the picture):

Switch SOnOff02_Reachable "Schalter online"	<switch> { mqtt="<[altenburg:tele/sonoff-A78D13/LWT:state:MAP(reachable.map)]" }

(And firmware 5.9.1 helps as well).

the console gives actually the same as mqtt-spy. Nothing shown as INFO with the current firmware version included which i want to read with the item as stated in the documentations and shown in this threat.

I dont have a problem with all other items like Uptime, Power, Energy today, Total… all working fine.

I believe that current version of firmware for Tasmota is 5.10.0a according to Github which i have updated recently.

image

Maybe that is the issue if it works with 5.9.1

Could you try to get the topic manually shown with a command in that console?

19:43:56 CMD: Status 2
19:43:56 MQT: stat/sonoff_wohnzimmertisch/STATUS2 = {"StatusFWR":{"Version":"5.9.1", "BuildDateTime":"2017-11-16T23:10:27", "Boot":6, "Core":"2_3_0", "SDK":"1.5.3(aec24ac9)"}}

With 5.9.1 Firmware there is a response.
I will do a test for that String in my OH installation.

I just downgraded one POW to make a comparison
There is a response with 5.9.1 and with 5.10.0

19:47:20 CMD: Status 2
19:47:20 MQT: stat/sonoffbasic3/STATUS2 = {"StatusFWR":{"Version":"5.10.0","BuildDateTime":"2017-12-01T13:55:52","Boot":6,"Core":"2_3_0","SDK":"1.5.3(aec24ac9)"}}

19:46:59 CMD: Status 2
19:46:59 MQT: stat/sonoff1/STATUS2 = {"StatusFWR":{"Version":"5.9.1", "BuildDateTime":"2017-11-07T16:23:04", "Boot":31, "Core":"2_3_0", "SDK":"1.5.3(aec24ac9)"}}

how would the console be showing INFO? with Info 1 it does not work.

I think i’ve got a solution.

The Status topic is not send with an interval.
It is only send, when one triggers the corresponding command.

For solving this i have set up a cron rule now:
(Keep in mind that you have to install the mqqt action additionally to the mqtt binding for this!)

rule "Update Sonoff Status"
when
    Time cron "0/30 0/1 * 1/1 * ? *" // Update every 30 seconds
then
    
    logInfo("testarea", "publishing mqqt message")
    publish("ohBroker", "cmnd/sonoff_wohnzimmertisch/STATUS", "2")
end

also you seem to had a typo in that jsonpath:

String sonoffWzFwVersion {mqtt="<[ohBroker:stat/sonoff_wohnzimmertisch/STATUS2:state:JSONPATH($.StatusFWR.Version)"} 

(you dind’t use version in your example above.)

With this setup i get the following result:

image

Hopefully this will work for you too. :+1:

1 Like

That absolutely works! Great, thanks so much for your support here, Jerome

1 Like

You’re welcome. :slight_smile:

Interesting video on Sonoff factory from SuperHouseTV ( Jon Oxer )

3 Likes

I wish he had asked them why they still haven’t added terminals to allow us to wire in external switches…

Great video indeed!

Hello!

I was wondering if anyone used Sonoff B1 light bulbs? Is it possible to install Tasmota firmware on them, and, if it’s possible, is it possible to do so using SonOTA (without hardware modifications and soldering)? I’m looking for a RGB LED E27 light bulb that’s controllable via OpenHAB.

Best regards,
Davor

I do not but yes, many discussed it and you’ll also find a few comments in this thread. The B1 is easiest flashed with SonOTA.

You should be aware that the Sonoff B1 isn’t the best product on the market though. Check out AILight: http://tinkerman.cat/sonoff-b1-lights-and-shades/

Hello @ThomDietrich

Thank you for your insight. What do you mean by “isn’t the best product”? From the review you’ve linked, and if I understood it correctly, the only way to flash AiLight is by soldering connectors (and I’m really bad at soldering stuff). Are there any other LED RGB Bulbs, which could be used with OpenHAB, but without soldering? And what is a downside of B1? Is it a shadow of the antenna (it shouldn’t be a problem for me, since the bulb would be inside a desk lamp, therefore, not directly visible)? I will use it mostly for the mood light, so, light brightness shouldn’t be a problem either. Anyways, thank you for your help once again.

Best regards,
Davor

Brightness and color seem to be downsides (remember: I do no own a B1). From what you wrote the B1 might indeed be your better option.

Philips Hue, Milight, Ikea Trafri… :slight_smile:

1 Like

Hello!

Thank you for all the information. I will take it all into consideration before making a purchase.

Best regards,
Davor

Hi,
I also run into the trap with the cheap “SONOFF” Switch which is no SONOFF. Leason learned.

Now I’ll order here (I’m from Germany)
https://creationx.de/