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

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”}}

I understand your hesitation and concerns but still need to mention that at least once:
In my personal opinion you should upgrade to openHAB 2.1 before investing any more time improving your outdated 1.8 installation, not even to speak of the old openHAB 1.8 wiki which will soon be deprecated.

openHAB 2.1 is very stable and offers many new/improved features compared to 1.8. Old bindings still work with openHAB 2.1 while new are added every other day. There is really no sane reason to stay with 1.8 any longer. The only valid reason is of cause the initial effort. See http://docs.openhab.org/tutorials/migration.html

2 Likes

I would be very interested in knowing how you set it up I’ve tried on Ubuntu 16.04 LTS and it cannot find the sitemaps. I noticed with the raspberry Pi3 when you changed a sitemap or items a lot was written to the events file (or was it syslog) that doesn’t happen with ubuntu

can you help me in connecting the switch to openhabb server

Hello Samir, please do not hastily post a single sentence (without even checking your spelling) and expect anyone to either know what you are asking or helping with that. Please see the following links and come back with a more detailed response:

Best and good luck

1 Like

Thanks, however unfortunately there are no easy topics for novoices

I have yet to find a video or page where someone has gone step by step from installating tasmota firmware to configuring mqtt and then openhab to interact with sonoff

Even in one of the links you provided on sonoff its just basic code without any explanation on how to use it or for that matter there are no details on how to configure mqtt server.

We assume everyone using this would have on how to configure mqtt which is not the case

Again I am not blaming or criticising anyone but giving my prospective as a novoice if you see there are many well illustrated article and videos on how can install tasmota on sonoff but none which in detail give you all the steps on connecting and controlling the same from openhab

Hello Samir,
I can work with that message, thanks.

Yes getting started is not easy. Home Automation is a diverse field and you’ll need to get up your system step by step. There is no single video or page because multiple steps are involved and not all of them are relevant for everyone. E.g. most users will already have an MQTT broker set up and running. Hence there is no need to learn how to set one up. That’s why there are multiple resources you have to look into.

  1. First you should install an MQTT broker and integrate it in openHAB. There is a bullet-proof tutorial over here: MQTT Binding (v1.11) Getting Started 101 - Be sure to also follow relevant links.
  2. Now you need to flash tasmota to your Sonoff: https://github.com/arendst/Sonoff-Tasmota/wiki/Upload - So far this involved soldering and connecting a serial programmer but it just got a lot easier by the SonOTA method: https://github.com/arendst/Sonoff-Tasmota/wiki/Upload#sonoff-factory-ota-mechanism-experimental - I did not use the method yet but many have successfully and if you need help, you will find tutorials via google.
  3. Now you can configure the module to connect to your Wifi and Broker. That’s pretty easy and shouldn’t be an issue via the web frontend of the module.
  4. After everything went well and you’ve got a Sonoff module sending data to your MQTT broker, with this broker being connected with the openHAB MQTT binding, you can set up openHAB items for your module: https://github.com/arendst/Sonoff-Tasmota/wiki/openHAB

And there you have it. Your one single guide to success :wink: Happy Hacking!

1 Like

I installed openhab snapshot like described in the docs. with apt-get

Hi. Would you have a link to the tutorial so I know I have the right one.
Thanks

Official openhab docs:

http://docs.openhab.org/installation/linux.html

Yes that was the one I used but think i screwed tbe java/zulu installarion up

http://docs.openhab.org/installation/openhabian.html

Having just acquired four Sonoff Basics to control my Christmas lights I think it would be worthwhile adding the SonOTA link to the original article. I went to all the links in the original article and quickly got lost. I knew there was theoretically a way to flash the firmware without a programmer but I couldn’t find anything that claimed to be compatible with the Basic.

The wiki page for SonOTA on the Tasmota wiki is incomplete and unuseful. When I click on the “install with unmodified binaries” it says that is not supported for Basic. But then when I follow the “see the SonOTA for more information” link I finally get to instructions that work and shows support for Basic.

Unfortunately, I stopped short when I saw on the one link that Basic wasn’t supported and bought a programmer and pins. Then I scanned through the rest of this lengthy thread and saw somewhere in the middle someone who said they got the OTA to work with Basic so I went back to work. Eventually, I stumbled upon mirko’s repo with full instructions and the script to make the OTA update. It wasn’t through the Tasmota wiki though.

As you know, I’m no novice when it comes to this stuff so either I’ve been particularly dense or this is likely tripping up other users as well.

My suggestion would be an addition to the “Firmware Flashing and Usage” section with the following:

I’m unfamiliar with the Tasmota wiki so don’t know the best way to address this on the wiki itself. But this one additional line to the OP would have saved me an evening’s lost work and $20. It also might make Sonoff less intimidating for the less DIY electronics users.

Once I found the right instructions I had my first switch flashed in 15 minutes and half of that was installing Python 3.5 on my laptop. It takes me twice as long to wire the device up then it does to get it configured with OH (I’m putting them on those short extension cords so I can resuse them after Christmas).

Fantastic experience! Thanks for the excellent work on this.

1 Like

I have used many of these (I sell them so why not use them), and have always flashed them with Tasmota, basically because I thought i had to.

There are threads (maybe buried in this thread, I don’t remember) of people demonstrating how to interact with them through ITEAD’s eWeLink service. But I think many if not most of the OH users would prefer, where possible, to avoid dependencies on cloud services to control things in their home. And for that you need a custom firmware.

And IMHO Tasmota is lightyears ahead of the native Sonoff firmware that it is objectively a better choice even if you don’t mind depending on a cloud service.

1 Like

Can you implement “esp8266 to knx” into the tasmota firmware so that i can directly speak wireless to knx and don´t need mqtt to do this?

https://knx-user-forum.de/forum/öffentlicher-bereich/knx-eib-forum/1158719-esp8266-über-wlan-an-knx

I agree 100%

Thanks can you help me with how do i create scenes with tasmota sonoff i have been struggling to do the same

The scene i need to create is for when watching tv i have Led downlight with color rings i need to the switch it on and off and then on so that on the colored rings are on
I have Led strips both need to be turned on

Anyother lights that may be needs to turn off

Is it possible to do this i have seen some tutorials but the commands dont seem to to work with tasmota

You need to use openhab rules for this. This is in not specific to Sonoff.

1 Like