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.
The Homey Community has been moved to https://community.athom.com.
This forum is now read-only for archive purposes.
Comments
FWIW, my initial implementation can be found here: https://github.com/robertklep/name.klep.sonoff
I've only tested this with an S20 device. I can't yet change the device state from Homey (this works now), but any changes that are made from the device itself (button press) are reported to the Homey driver.
After downloading and unzipping the files, I could not find the file "pair.json"
can you indicate, in what folder the file "pair.json" can be found or should be placed?
greeting,
Aaron
I only have two types of devices (S20 and a Basic), hopefully it'll work for other types of devices too. The driver doesn't (yet) support sensors (mainly because my devices don't have any ).
Away at a wedding this weekend but will absolutely check that out next week
I have a sensor device but don't actually use the sensor, so will be interesting to see if it works with that
Got the following message in curl: "curl: (56) Recv failure: Connection was reset". Tried it multiple times. Wil look if I can find some time this weekend to do some more testing.
btw, there is a small type in your Readme. In my curl version there has to be no space between "content-type:" and "application", otherwise it wanted to do a DNS lookup for "application".
>netstat -ano | findstr 10.10.7.1
TCP 10.10.7.2:35116 10.10.7.1:80 ESTABLISHED 12484
Curl to device page, gives me nicely the espected results:
{
"deviceid":"10000xxxx",
"apikey":"xxxx-xxxx-xxxxx-xxx-xxx",
"accept":"post"
}
No luck with other quotes either. Will try it some other time again.
@caros I just realized that this may actually be caused by not including a space in the header. I just checked, and curl will send an invalid header line in that case, which may be why you're getting the Connection was reset error. So the space needs to be there.
Or, you could try leaving out the header entirely:
- Curl under Windows
- Installed Kali within Hyper-V, installed curl on it (so I could use single quoted with space)
- Used two types of Sonoff's
- Used all the possible quotes and even withouth headers
All of this, didn't gave me the right results. I've added a Wireshark capture, where you can see that the Sonoff doesn't response after the initial acknowledgement (I've removed my private information offcourse). First one is the TCP stream in packets, second one is the TCP stream in total. Then after a while the WLAN of the Sonoff disappears and that's the moment when the timeout occurs, which sounds logical to me .
curl --data-ascii @pair.json -XPOST -H "content-type: application/json" http://10.10.7.1/ap
I was thinking why it should be binary, when it is ASCII text.
I have a question - if i set up a Sonoff with your homey app, do I lose the ability to control via the ewelink app from that point, or can they be used in tandem?
If you happen to use iOS: I use the HomeyKit app to control my devices, including the Sonoff's, which works very well.
I'd like to be able to add the ability to determine which type of Sonoff device you are pairing with Homey. For this, I'd like to gather some information about your devices.
When you pair a device with Homey, it's given a rather cryptic name, consisting of "$MODEL_NAME@$DEVICE_ID (ROM $ROMVERSION)".
If you're interested in helping me out, can you post (through a direct message, or on Slack; I'm not sure how privacy sensitive the device id is, so please don't use a public forum to post it):
- the "commercial" name of the device ("S20", "Sonoff Basic", "TH10", ...)
- the cryptic name that the driver initially gives
Hopefully, with more information the driver can better differentiate between devices and show the proper icon for each different type.I'll be happy to help but can you advise when the stable version will be pushed? After issues installing beta apps and having to redo all my flows I'm reluctant to install beta apps...