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

13»

Comments

  • Just tried a second Sonoff RF,

    About the same here, as Basic everything works fine, when adding as Sonoff RF I now get the message: "Waiting for connection with MQTT broker".


  • JPeJPe Member
    edited June 2018
    As far as I know, the Sonoff app only works with WIFI  and not with only RF-devices.
  • Have you tried to restart the Sonoff App from Settings - Apps - Sonoff?


  • @RemcoHannink I don't have an RF device myself, so the driver for the RF is almost entirely the same as for the Basic (apart from which module name it checks to identify the device).

    So not sure why it's not working. It could be that the RF device sends something unexpected, but especially in your second example, it's unexpected that you'd get a message about trying to connect to the MQTT broker.

    Do make sure that each device has a unique "topic" set in the MQTT settings, though.
  • I did restart the Sonoff app a few times. I also use unique topics.

    I wil start up my MQTT debug and see what that gives us.

    Gr. Remco

  • AlleAlle Member
    edited June 2018
    @robertklep I'am having trouble adding the sonoff TH device. It says that no new devices are found when i try to add it.

    Data from the device is send to the broker.

    Any ideas?

    *edit: When i configure the device as a POW, i can add to Homey.
  • robertkleprobertklep Member
    edited June 2018
    @alle can you check which data is sent to the broker? Specifically the "INFO1" message (which the device will send to the broker when it has powered on).

    By the way, feel free to create an issue about this on Github: https://github.com/robertklep/name.klep.sonoff/issues

    It's better suited for debugging these kinds of problems than this forum.
  • AaronAaron Member
    Hi @robertklep
    I have flashed my sonoff basic with tasmota. It works through my browser. Now I want to set it up with homey. I have installed the MQTT broker app but I can't seem to find out what to do now. Is there somewhere a guide I could use?

    Do I have to change MQTT setting in tasmota?
    Do I have to change settings in the MQTT broker?
    What is the MQTT broker hostname/IP and where can I find it.

    I hope you can help me
    Thanks in advance
    Aaron
  • @Aaron the MQTT broker is running on Homey, so its IP-address is the same as Homey's. You have to change the MQTT setting for Tasmota so it points to the MQTT broker on Homey.
  • AaronAaron Member
    Hi @robertklep , I thought so but where do I find the ip address of my Homey?   :#

  • @Aaron if you go to `my.athom.com` in a browser, and log in there, you will be redirected to your Homey. You should be able to see its IP-address in the location bar of your browser.
  • AaronAaron Member
    edited June 2018
    Hi @robertklep , sorry to bother you with such a basic question, but when I do that I get a very large number, not an ip address. large_number.homey.athom.com is what I see.

    I don't even see it with fing, but Homey is working and is online..
  • @Aaron that would mean that you're not in the same network as your Homey?

    You can probably find its IP-address in the system settings too, under "Stuff for geeks", "network". It will be one of the "address" fields, but not "127.0.0.1" and also not the IPv6 addresses.
  • AaronAaron Member
    Hi @robertklep , Yes, found it. Overlooked it before o:)
    I am going to give it another try. 
    Thanks for your help.

  • AaronAaron Member
    edited June 2018
    Hi @robertklep
    Thanks for your help, it works! :) It is very fast also. Now I can order more.

    I also have a NodeMCU with tasmota on it. Do I need some other app for it to work or wil your app work also? I imagine it won't work, the NodeMCU has more pins to use...

    Greetings,
    Aaron
  • robertkleprobertklep Member
    edited June 2018
    @Aaron in theory, my app should work. However, I'm not sure which module type you would set in the settings so it provides optimal support for the NodeMCU, and I'm pretty sure that if such a module type exists it isn't yet supported by my app (which means that you need to use either the generic Tasmota driver, or make the NodeMCU act as one of the supported device types, like a POW, TH, ...).
  • AaronAaron Member
    Hi @robertklep
    I wil give it a try. I think all the pins will be a problem and all the readings they can give, but I will keep you posted if you wan't me to.
  • AaronAaron Member
    Hi @robertklep
    I can get the NodeMCU connected to homey (Generic) but as expected not all pins are recognised. I have a led on some pins and I can turn it on and off (so that is cool) but my temperature and humidity is not showing aswel as my button.
    This all was no suprise and not to be expected of your app.

    Is there a way to make Homey and the app see all the pins that are used by tasmota and read their values, switch them and control them? Or should another app be made?
    Your app has the basics already but I can imagine that you only want to keep it for sonoff devices.

    Just thinking out loud here  :p

    greetings,
    Aaron
  • @Aaron I'd be happy to add more features to the "generic tasmota" device.

    I have a few Wemos D1 devices, and some sensors, so I'll have a look and see how Tasmota sends the data from those sensors to the MQTT broker. Ideally, when adding a generic device, the app should "detect" which sensors are available and add the related Homey capabilities to the device during pairing.
  • AaronAaron Member
    @robertklep
    Nice! I think that opens up a lot of new possibilities.
    If you need my NodeMCU or some sensors, buttons, or led, let me know, I'd be happy to send some to you. That is the least I can do.
     
  • @Aaron thanks for the offer! But I'm pretty well equiped already, not specifically with a NodeMCU but with a Wemos D1 and a bunch of shields (or standalone sensors that I can breadboard).
  • If anyone is interested in access to an early alpha version of the app (which implements a "generic Tasmota" device that supports a bunch of different sensors and modules), please PM me your e-mail address (the one you use for Homey).

    The reason I'm pushing this as an alpha (as opposed to a public beta) is that I refactored most drivers. From my own tests it looks like this won't have any consequences for existing devices (i.e. you shouldn't be forced to re-pair the device with this new version), but I can't be entirely sure.
  • BebopperBebopper Member
    edited July 2018
    @robertklep

    Hi Robert, I'm trying to connect a flashed T1 to your app.

    The flash was successful (running Sonoff-Tasmota 6.1.1c) and it has also connected with the MQTT broker on my Homey.

    When trying to add it in your Sonoff app however nothing happens, I fill out the MQTT ip address and port (and have tried with and without a user/password) and restart the T1, after that however nothing happens.

    Below the log from the MQTT broker (not sure if that helps?):
    20180731-20:24:33 sonoff_hallway_switch has unsubscribed from topic sonoff_hallway_switch/cmnd/#
    20180731-20:24:33 client disconnected: sonoff_hallway_switch
    20180731-20:24:33 client connected: sonoff_hallway_switch
    20180731-20:24:33 Packet published {"clientId":"sonoff_hallway_switch","topic":"sonoff_hallway_switch/cmnd/#"}
    20180731-20:24:33 Packet published sonoff_hallway_switch
    20180731-20:24:33 Packet published sonoff_hallway_switch
    20180731-20:24:33 Packet published Online
    20180731-20:24:33 Packet published 
    20180731-20:24:33 sonoff_hallway_switch has subscribed to topic sonoff_hallway_switch/cmnd/#
    20180731-20:24:33 Packet published {"Module":"Sonoff Basic","Version":"6.1.1c","FallbackTopic":"sonoff_hallway_switch","GroupTopic":"sonoffs"}
    20180731-20:24:33 Packet published {"WebServerMode":"Admin","Hostname":"sonoff_hallway_switch-5855","IPAddress":"<ip address>"}
    20180731-20:24:33 Packet published {"RestartReason":"Software/System restart"}
    20180731-20:24:33 Packet published {"clientId":"sonoff_hallway_switch","topic":"sonoff_hallway_switch/cmnd/#"}
    20180731-20:24:34 Packet published {"POWER":"ON"}
    20180731-20:24:34 Packet published ON
    20180731-20:24:41 Packet published {"Time":"2018-07-31T19:24:41","Uptime":"0T00:00:15","Vcc":3.447,"POWER":"ON","Wifi":{"AP":1,"SSId":"********","RSSI":80,"APMac":"82:2A:A8:17:55:93"}}
    If there is more information I can give you or if there is something else I can try please let me know!

    Thanks a lot! Bram.
  • @Bebopper the module type is set to "Sonoff Basic", which will prevent the app to properly detect it as a T1.

    You can change the module type in the Tasmota configuration, which is accessible through a web browser (browse to http://IP.OF.THE.DEVICE) through "Configuration > Configure Module".
  • Thanks! Will try this weekend when I have some more time :smile:
  • kapustickakapusticka Unconfirmed, Member
    Please help me!!! I don’t know how to pair Sonoff with Homey!!! What is it MQTT and what I need fill into the MQTT form (ip, password, etc.). 
  • @kapusticka you will have to use the alternative Tasmota firmware if you want full support for your Sonoff devices.

    It's a rather technical setup procedure which will require some soldering and a USB-to-serial adapter. How do flash the firmware can be found on the Tasmota wiki: https://github.com/arendst/Sonoff-Tasmota/wiki

    But like I said: it's a rather technical procedure and not point-and-click, so to speak.
  • @robertklep Very cool software! I flashed my sonoff 4ch module with TASMOTA and got it to pare with homey. Great!
    One thing though… it worked after i entered static IP-addresses at the Sonoff Tasmota side for the MQTT host. "Homey" as hostname doesnt seem to work. How do you cope with IP-changes as homey is DHCP?
  • @TomMeer most routers have an option to give a particular device the same IP-address every time, which is what I use for my Homey. So even though Homey uses DHCP, it will get the same IP-address from the router.

    I think that Homey also advertises itself on the network as "homey.local", but that will require mDNS support. I'm not sure if Tasmota supports that, but it's worth a try.
  • @robertklep I did a quick search and found the option indeed! Never knew it existed!
    Thanks for the help and the cool project! Flashed 3 Sonoff devices(2x basic and 1x4ch) today and all work like a charm!
Sign In or Register to comment.