robertklep / name.klep.sonoff

Homey driver for Sonoff devices
7 stars 7 forks source link

Support fore Touch and 4ch switch #4

Closed BPC83 closed 6 years ago

BPC83 commented 6 years ago

Hi.. any plans fore supporting touch switch, and 4ch relay module from sonoff??

i have both, if you need some information ?

robertklep commented 6 years ago

I don't have either device so I can't test them.

I can imagine that the switch may send the same messages as, for instance, the Basic or the S20, so you may just try and see if you can pair the device with Homey and see if anything happens when you use the switch.

BPC83 commented 6 years ago

Den 1. feb. 2018 kl. 17.01 skrev Robert Klep notifications@github.com<mailto:notifications@github.com>:

I don't have either device so I can't test them.

I can imagine that the switch may send the same messages as, for instance, the Basic or the S20, so you may just try and see if you can pair the device with Homey and see if anything happens when you use the switch.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/robertklep/name.klep.sonoff/issues/4#issuecomment-362311923, or mute the threadhttps://github.com/notifications/unsubscribe-auth/Af2AYJTARrsM2V4-AhZys-WHHNbBi_Mkks5tQd_mgaJpZM4R11nP.

I will try the touch switch…

Have tried pairing til 4ch relay, by trying to send the pair.json file, but the terminal does not respond…

//Brian Denmark...

robertklep commented 6 years ago

The latest (beta) version of the app includes a pairing page that you can use instead of the terminal (although if it doesn't respond, it may also mean that your computer needs an explicit route to the device, something that is explained here: https://blog.ipsumdomus.com/sonoff-switch-complete-hack-without-firmware-upgrade-1b2d6632c01#e0d7).

Also, if your device(s) have a firmware version of 1.6 or higher, chances are that they won't work with Homey even íf you can send the new pairing information to them, because this was disabled by the manufacturer in these firmware versions. I'm working on support for alternative firmwares to work around this, but it will involve flashing a new firmware into the device.

Maxwell70 commented 6 years ago

@robertklep Hi! I have the Basic and can't connect it. Maybe the firmware fresh .... How can I know the firmware version?

All done via the app on Homey. After that Switch blinks so you wrote, but Homey does not see the Switch.

{ "deviceid":"1000306e9c", "apikey":"06cfdd0f-17e3-40b6-b810-381de11f33de", "accept":"post" }

Maxwell70 commented 6 years ago

@robertklep I found the firmware version number - 1.6.0 :(((((

robertklep commented 6 years ago

@Maxwell70 that's too bad ☹️

Maxwell70 commented 6 years ago

@robertklep It is possible to do something? Or throw it away?

robertklep commented 6 years ago

@Maxwell70 you can always use the device with the original eWeLink application, of course.

And like I posted above, I'm working on support for alternative firmwares for the Sonoff devices (however, this means that you have to open up the device, solder some connectors on it, and use a USB-to-serial dongle to flash a new firmware into the device).

Maxwell70 commented 6 years ago

@robertklep It is possible to do downgrade firmware?

robertklep commented 6 years ago

@Maxwell70 AFAIK, not in an official way, no.

Maxwell70 commented 6 years ago

@robertklep Hi! I have made a connection Sonoff Bridge (Tasmota) to Homey. Everything worked fine. But today, after upgrading to r.11 Homey stopped to see the switch.

robertklep commented 6 years ago

@Maxwell70 are you using the Homey MQTT Broker app? If so, can you check to see if that's still working?

I don't install experimental updates on my Homey (mostly because there isn't a non-destructive method to go back to stable) so can't really help.

robertklep commented 6 years ago

Oh, if you know how to sideload Homey apps, try and see if you get any errors.

Maxwell70 commented 6 years ago

@robertklep In the logs of the MQTT Broker information from the Sonoff comes! But Sonoff is not active in your plugin. I removed switch and created it again.

robertklep commented 6 years ago

If you hover over the device icon, you should get a message explaining why the device is offline. What is that message?

Maxwell70 commented 6 years ago

@robertklep Unfortunately not have learned to memorise this message, so as deleted and reinstalled already.

robertklep commented 6 years ago

@Maxwell70 no worries! Perhaps for a next time (which, of course, won't happen 😉)

Maxwell70 commented 6 years ago

@robertklep If you reboot Homey then: "Connection with MQTT Broker failed"

robertklep commented 6 years ago

@Maxwell70 thanks!

I realize now that I never tested for a situation where the broker isn't (yet) running when the app is started. Looks like I need to add some sort of retry procedure.

I'll create a new issue for this.

robertklep commented 6 years ago

@BPC83 I could try and add support for the 4CH device, but only if it runs the Tasmota firmware.

BPC83 commented 6 years ago

That will be great, I have a couple of the laying around, just need to fast them with tasmota and I´am ready....

robertklep commented 6 years ago

@BPC83 great! I'll try and see if I can get support in this weekend and publish a new beta to test.

Do you happen to know how to load apps from Github onto Homey directly?

BPC83 commented 6 years ago

@robertklep Great, then I will flash I 4ch tomorrow.... I do no know how to load apps manually, have never tried it...

robertklep commented 6 years ago

@BPC83 you need to install Node.js and various packages, it's probably easier to just push out a new beta for you to try :)

BPC83 commented 6 years ago

@robertklep if I have a detailed guide, I can do it, buy yes, I think it will be best to publish a new beta, If I brick something in the homey, and there is no light in the home, I can start to chop my now tombstone ;) my wife will kill me...

robertklep commented 6 years ago

@BPC83 haha no problem ;)

robertklep commented 6 years ago

@BPC83 I just submitted v4.0.3 (beta) for approval, once approved by Athom I will publish it. It should support the 4CH devices (fingers crossed!).

BPC83 commented 6 years ago

@robertklep Gerat... but jam still struggling, fashing til 4ch with tasmota, every time I have a error, with the exact same settings I have successfully flashed 4x Sonoff basic that works perfect with tasmota, Iám trying to figure out why this error stops the flashing...

robertklep commented 6 years ago

@BPC83 there's some info here: https://github.com/arendst/Sonoff-Tasmota/wiki/Sonoff-4CH-and-4CH-Pro

There seem to be some issues with both the 4CH and the 4CH Pro devices (where the 4CH Pro looks like a bit of a PITA to flash :()

BPC83 commented 6 years ago

@robertklep Right now I have a whole lot of words, thats really nok appropriate for this site... I visited the link you gave me... read, that I Chinese guy have marked the print wrong, rx and tx swapped, tried it, it loads the new firmeware right away....... I have use 4 hours yesterday, reading guides, watch youtube nothing worked...... and the only failure was really no communication with the board.. have tried both atom and Arduino loader, that came with weird errors....

i will test it tomorrow if the beta is approved by atom then...

robertklep commented 6 years ago

That's my default solution for Sonoff devices: when the flashing software can't connect, swap TX and RX 🙄

BPC83 commented 6 years ago

@robertklep I know now... we will always learn new things every day...

robertklep commented 6 years ago

@BPC83 I just published v4.0.3 (beta), with (hopefully) support for the 4CH.

BPC83 commented 6 years ago

@robertklep Great... and I have just added it, and made a quick test, and I seems like it is working, all 4 relays can be activated form the device in homey....

robertklep commented 6 years ago

@BPC83 cool, thanks for testing so quickly!

robertklep commented 6 years ago

Closing: 4CH is supported now, Touch support is being tracked in #10.