This is the forum archive of Homey. For more information about Homey, visit the Official Homey website.

The Homey Community has been moved to https://community.athom.com.

This forum is now read-only for archive purposes.

[APP] ITEAD Sonoff

robertkleprobertklep Member
edited June 2018 in Apps

ITEAD Sonoff

Current app version: 4.0.7 (stable)

Provides support for ITEAD Sonoff devices.

Links:


Original Firmware information


Devices running older versions of the original Sonoff firmware (for the Basic and S20 devices, before firmware version 1.6.0) are supported "out of the box". Instead of pairing the device with the eWeLink app on your smartphone, you can pair it with Homey using a relatively simple procedure (explained during the pairing procedure). Feature support for the original firmware is limited: only switching the device on/off is supported.

Devices running newer versions of the original Sonoff firmware cannot be paired with Homey (the manufacturer removed this ability).

Sonoff-Tasmota Firmware information


This app also supports Sonoff devices running the Sonoff-Tasmota firmware. This alternative, open, firmware can be "flashed" into most Sonoff devices. The flashing procedure does require some hardware skills, and falls beyond the scope of this app (however, if you have questions about this, feel free to ask me).

This app uses the MQTT protocol to communicate with Sonoff-Tasmota devices. This requires an MQTT broker. The MQTT Broker app for Homey provides such a broker.

Supported Devices

The following devices have been tested with this app (either by myself, or by other users). The firmware they were tested with is mentioned as well (not all devices were tested with both firmwares, so only the tested firmware is mentioned):
  • Sonoff Basic WiFi Wireless Switch (original firmware and Tasmota)
  • Sonoff S20 Smart Socket (original firmware and Tasmota)
  • Sonoff RF WiFi Wireless Smart Switch With RF Receiver (original firmware)
  • Sonoff Slampher (original firmware)
  • Sonoff RF Bridge (Tasmota)
  • Sonoff TH10/TH16 (Tasmota)
  • Sonoff Dual (Tasmota)
  • Sonoff 4CH (Tasmota)
  • Sonoff POW (Tasmota, R2 as well, but untested)
  • Sonoff T1 1-/2-/3-channel (Tasmota)

Questions

The quickest way to contact me is through Slack (@robertklep).
«13

Comments

  • Hi Robert,

    I like your App to support the Sonoff with Tasmota support!
    Would it be possible to support the Sonoff POW and TH16 versions as well?
    Using MQTT client I'm having trouble decoding the JSON response for the POW and AM2301 responses.
    Would be nice to extract the power, temperature and humidity readings directly from the app.
  • arthur said:
    Hi Robert,

    I like your App to support the Sonoff with Tasmota support!
    Would it be possible to support the Sonoff POW and TH16 versions as well?
    Using MQTT client I'm having trouble decoding the JSON response for the POW and AM2301 responses.
    Would be nice to extract the power, temperature and humidity readings directly from the app.
    I'd be happy to add support, but I don't have any of these devices myself.

    If you can open an issue requesting support on Github, including some of the MQTT data they send (in particular the sensor data, and preferably the INFO1 message), I might be able to add support without needing direct access to the devices themselves.
  • Hi Robert,

    Great I create an issue on the project's Github page with all requested details. feel free to connect for additional information and testing!
  • DrDoomDrDoom Member
    edited March 2018
    Apparently this also doesn't work with firmware 1.6...  :(


    Just FYI: I found a nice tutorial on how to flash the Tasmota software over the air to the Sonoff Basic WiFi Wireless Switch. Haven't tested it yet, though....


  • Just FYI: I found a nice tutorial on how to flash the Tasmota software over the air to the Sonoff Basic WiFi Wireless Switch. Haven't tested it yet, though....

    It looks like this method uses the same method as the Homey Sonoff app to allow it to use Homey as its "cloud server", which would mean it will also only work on older versions of the Sonoff firmware  :(

  • JPeJPe Member
    edited March 2018
    Alternatives:





  • robertkleprobertklep Member
    edited April 2018
    Quick update: I've rewritten the Tasmota driver so it's much easier to support new devices. Also, Tasmota devices will get separate drivers.

    The pairing screen now looks like this (Sonoff Dual support and the RF Bridge, which was already supported, now has a separate driver):



    The TH10/TH16 devices are next.
  • Version 4.0.1 (beta) was just published to the Homey App Store, supporting more (Tasmota) devices.
  • Hi Robert,

    I just installed the Beta update, when I try to install the "Basic" an empty screen appears. 
    On top this screen "Volg de instructies... nothing else.

    Please your findings!

    TY,  Martin
  • @Undutchable62 I assume you're trying to install "Basic (Tasmota)"? Do you use the Homey app, or a regular webbrowser?
  • Undutchable62Undutchable62 Member
    edited April 2018
    Homey app, Basic Tasmota
  • robertkleprobertklep Member
    edited April 2018
    @Undutchable62 can you open the developer tools (View > Toggle Developer Tools) and check if there are any errors being generated when you start a pairing operation? Screenshot is good too <span>:smiley:</span>
  • Okay, thanks, I know what's going wrong now. It will require a new release of the app, I'm afraid, but I'll try to push it ASAP.
  • robertkleprobertklep Member
    edited April 2018
    v4.0.2 submitted for approval. 

    v4.0.2 is published.
  • So, firstly, great stuff - I just tested this for the first time and had no issues getting my stock Sonoff 12v switch setup :)

    But I'm hoping for some help... I have one of these: 
    http://vi.raptor.ebaydesc.com/ws/eBayISAPI.dll?ViewItemDescV4&item=172841978949&category=4660&pm=1&ds=0&t=1516689780000&ver=0

    12v input connected correctly (obviously) since it is connected to Homey and I can flick it and hear the switch turning.

    However, I can't seem to connect my output right... I have a Siren that has a black and a red wire, where Black appears to be the negative and red the positive. If I connect these direct to the 12v input I get a siren

    However, I have 3 outputs on the Sonoff - seemingly NO, NC and COM

    My assumption was that positive should go to the COM and the other to NO - tho this resulted in nothing. 
    I have since tried every combination (I think) of these two wires in those 3 holes...

    So, what am I doing wrong?!
  • @vaderag COM isn't an output, it's the connection that will get switched by the relay. The power inputs are only used to switch the relay, but they aren't passed through to the NO/NC/COM terminals.

    So you need to create an additional "loop", where GND from your power supply is connected to the siren's black wire, the siren's red wire is connected to COM, and the NO ("normally open"; I assume that you want the siren to sound only when the relay is activated) is connected to +12V. I think you can re-use the same 12V power supply.
  • @vaderag COM isn't an output, it's the connection that will get switched by the relay. The power inputs are only used to switch the relay, but they aren't passed through to the NO/NC/COM terminals.

    So you need to create an additional "loop", where GND from your power supply is connected to the siren's black wire, the siren's red wire is connected to COM, and the NO ("normally open"; I assume that you want the siren to sound only when the relay is activated) is connected to +12V. I think you can re-use the same 12V power supply.
    Ah ha, I see!! 
    Thanks so much, I'll give that a try :)

    I'm really amazed btw how easy it was too follow the instructions and get the actual device working with Homey - with all the warnings I was convinced I was going to be out of luck but worked a charm,!!
  • @robertklep
    Just tried your setup above and it worked a treat! Thank you very much :)
  • Hi
    When I want to add my sonoff basic Tasmota. then the MQTT connection writes unsuccssful. Can you help me?
  • @lunddorph are you sure everything you entered is correct?
  • Yes I am. I have written it in as it stands on sonoff
  • @lunddorph and you're sure that the Sonoff made a succesful connection? Have you tried connecting to the broker using an alternative client?
  • Hi Robert, first of all, thank you for this superb app, works like a charme. :-)
    But on short question, 1 have now 2 Sonoff Basic, but i planed to buy a Sonoff Wall-Sitch Europe T1. Can i use this device with your app ??? I did not found a special driver for switches, schould i use generic tasmota ???
  • robertkleprobertklep Member
    edited April 2018
    @mat_industries I'm working on support for the T1 devices as we speak, hopefully finished this weekend. This would be for the Tasmota firmware.

    There's an open issue on Github which you could track if you want to be informed when it's done: https://github.com/robertklep/name.klep.sonoff/issues/10
  • Hi Robert, thanks a lot for this information, i am waiting, and meanwhile, i will order some Sonoff Stuff (T1) for testing. :-)
    Have a nice day.
  • Ah, you're trying to connect the Homey app directly to the device, which isn't how it works.

    You need an additional piece of software, called an MQTT broker, to act as a go-between between the device and the Homey app. There's a Homey-based MQTT broker (https://apps.athom.com/app/nl.scanno.mqttbroker) that you can use.

    In the device settings, you add the broker IP address (which is the same as Homey IP-address if you run aforementioned app), and you also configure the Sonoff app to use that IP-address.
  • I have got the mqtt app to run. but now the sonoff app writes that i need to restart the device i want to add. but when I restart sonoff, nothing happens.
  • Which device type are you adding? And which module is the Sonoff device configured to (in the Tasmota configuration)? Those two have to match.

    If they are the same, retry a few times.
Sign In or Register to comment.