-
Notifications
You must be signed in to change notification settings - Fork 107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No connection with Eneco Toon (Quby) #23
Comments
UPnP response(s) from Hue: -> Note: aren't these just broadcasts? -> No, these are responses!
HTTP description.xml response:
These are broadcasts, groups of 6 (3 doubles of different UPnP devices), with an interval of approx. 1 minute:
When simulating the above, Toon will actually pick up our Hue Bridge simulation!! |
Hi, Will be really hard for me to fix this issue without the device, but i can provide you the needed information in order to fix it. The registration process is made from 2 steps, one is ssdp discovery of the hue bridge, second one is the http POST message to receive the username from hue bridge, but from what i understand we don't go to second step. This can be saw if you execute HueEmulator.py manually in shell to see entire output. SSDP reply is this line in the code: |
Hi again. Today i spent a few minutes to check again what can be the issue with SSDP message response and i saw there is a small difference from original hue bridge ssdp reply found on If still don't work, then you must setup the mac address manually on you raspberry to start with "00:17:88:xx:xx:xx". This is the prefix used by all Hue Bridge devices. |
Hi mariusmotea. Thank you for your reply, diving in and your time. I have replaced the line but unfortunately it still didn't work with the Eneco Toon. Now what do you mean by manually setup the mac address. Where do i do this?
So i don't expect it to be in the MAC address. But i could be wrong... contents of the description.xml
|
Temporary change of mac address can be done with command:
I need to know exactly on what step it fail. Please don't open Hue Application because will populate the log with big number of requests that are not important for us. |
Hi there, I have changed line 69 as above and changed the mac address of the pi as above. Restarted HueEmulator in shell and all i get is:
Even when pressing search on the Toon has no effect. After this i opened up the Hue App on my android and voila... it connects to the hue app. But no way i get a response from Toon... |
Ok, so we are stuck on device discovery. Afraid you need some tools to sniff ssdp data, i recommend this: https://github.com/lianwutech/ssdp . Bridge emulator will reply only to M-SEARCH messages that contain "ssdp:all", so i possible that there are some extra space in the request from Toon. I read the links that you provide, did you try to reboot Toon? It seems that only after reboot it perform an M-SEARCH
|
Hi, Yesterday i made some tests and it seams official Hue app will not pair with the new change. Please revert |
Hi there, I was also trying out some stuff. The above I have tried with a couple of reboots with the Toon but no hue bridge can be found. All i can see with wireshark that it indeed NBBS itself a few times after reboot but i dont see any M-SEARCH
Maybe if ewjmulder will help us... i'll try to contact him |
Found something that may help : https://github.com/sagen/hue-upnp. See if Toon is able to detect this. Also to sniff ssdp you can use this: https://github.com/ganeshpr/ssdp. Script ssdp.py don't have any execution points, so just append at the end of the script
|
Hmmmm... nothing on the Toon while executing hueUpnp.py and after exit i get:
|
I can see broadcasts from hueUpnp.py script with wireshark: But when running your script i don't get any broadcasts. ewjmulder has responded to my question: https://github.com/ewjmulder/hue-bridge-simulator/issues/2#issuecomment-318017441
So basiclly, we need your script to broadcast (like the hueUpnp.py script) 6 messages to connect to the Toon...
|
Please check the develop branch, i add a new service for ssdp broadcast. This is experimental, i did not perform any tests. |
I will give it a try! |
We can do improvements if is still not working. Be aware that Toon may not listen permanently for ssdp broadcast messages, maybe it need a few minutes to detect the bridge emulator. |
Script is running fine. I can see the broadcasts every 10 seconds. But still nothing on the Toon's side... as expected. Waited a few minutes, rebooted then waited a few minutes again. I believe it needs the other two messages in the same order as i posted this afternoon. |
Check again the develop branch, i made a new commit. Now theoretically it broadcast this:
|
Nice... I haven't try it yet. Will do this evening. Can't wait to get back home... I'm not sure about this but isn't it better to simulate the messages the exact same way as those 6 messages above? I will report back as soon as i find out. |
very likely Toon is not so strict regarding ssdp messages and just one of that 3 formats must be the one that Toon is looking in order to trigger Hue Discovery. |
Well just tried it... still not connecting. So i guess it needs all six in the exact order like ewjmulder presented. |
Ok, i update again to have the same order. Problem is that we cannot be sure the correct delay is one message on every 10 seconds. Maybe these must be sent two by two with 20 seconds delay. |
I execute a ssdp sniffer and i use split diff to check the differences from ewjmulder output with hue emulator and i found one that can be a problem:
|
Setup same mac address as ewjmulder on rpi interface and you will have identical ssdp notify requests. The only thing that we still not know is the delay between request, 6 request every minute has lot of possible options. |
Will change the mac address again and report back. |
hi there, I have been trying this weekend. I can't get any response from the Toon. I have tried different delay times and changed my Mac address to same as ewjmulder... nothing! Some how i messed up somewhere and couldn't even connect with the official hue app. Hue app said that the hue bridge needed an update and there was no way i could control the lights. So i started all over, i had a backup of the config files while it was working before and put those back. After this i got back the connection with hue app but... it still says that i need to update the hue bridge... just reporting |
Hi, If you update Hue app then is possible to force you to update also the bridge to latest version, it happened once #11 , but now i don't see any recent update on my phone. Please check if there are differences in your config.json => config key and the one from the repo. I suspect differences can be at api or swversion keys. If is still not working check if will ask for update with default config.json. |
Yes it was indeed because of differences in config.json... somehow it was one i downloaded from develop branche... |
Alright... for the sake of this project, i bought myself a Hue bridge v2 secondhand and started to sniff the network once it was installed. I can confirm that, as we know now, that there are 3 different ssdp broadcast messages sent. They look like this from the real bridge: Message0:
Message1:
Message2:
I can see that we are missing one line: TIMING As for the timing... with wireshark i can see that each message is indeed broadcasted twice and all six messages rapidly after each other within 1 second. See image below This also goes for the ssdp search messages. Here we also have three different search messages: Search 0:
Search 1:
Search 2:
These three ssdp searches are sent rapidly after each other within 1 second for 8 times (8 seconds). In visual: and here's an excel export from this afternoon I will also be trying HA-Bridge https://github.com/bwssytems/ha-bridge which also simulates Hue bridge. From what i can read is that some say HA-Bridge connects with Toon, but some don't..... |
Cool, in a few hours i will be home and i will perform a new commit |
I check your traffic sniffer and i come to following conclusion: |
Tried yesterday evening... no luck... Also performed a factory reset because Toon kept finding the real hue bridge, even if it was powerless! Somehow it saves it somewhere, didn't even paired with it, just did a search, so i had to reconfigure the Toon, took some time. After that i still couldn't connect with HueEmulator. I'm clueless... but i will keep trying. |
o and i didn't even get any response from Toon on the emulator output. I did from other devices. I didn't snif the Toon yesterday, maybe this evening. |
this is strange because ssdp broadcast messages must be identical now. I suggest you to change the mac address on RPI because maybe Toon is filtering for ssdp messages that are coming just from some know devices. This is done by appending in /boot/cmdline.txt the following text "smsc95xx.macaddr=00-17-88-2f-c8-65". Here i increase with 1 the mac from your original bridge. If there are other differences then wireshark must find them. You can also play by putting the same mac address on RPI as original bridge and after toon detect it just made the switch on network with rpi so the pair will be done with emulator. |
still no luck... changed mac address as you advised (1 up), will do the exact mac address as the real bridge tonight. And maybe do the swap... but that's not a good solution imho (if it works). Nice way to change the mac address btw with cmdline.txt. It has to be done with " : " instead of " - ". o and occasionally i do get an exception, the ip address is from my router... |
Here we can have a problem that can be very hard to fix. I start to read about that url and it seems this is a service provided by Philips on their servers. Is know that there is available also a second api (the remote api) used by hue bridge to connect to Philips servers and this is not public. Toon is possible to use this service because is very easy to implement (just a curl to that url will return the private ip and mac address of the local bridge). Chrome don't cache anything here, information is cached on remote servers and cleared after connection to real bridge is lost with in few minutes. When there is a request to that url that come from same public ip like the one that bridge was using to register to online services then the output will be that json. |
Easy way to test if Toon use this method and don't perform ssl check: generate the self signed certificate with the command provided and replace if you will see any requests from Toon after adding the static dns record then this can be hacked, if not then maybe Toon don't use this method to discover the bridge or Toon perform ssl check and it fail. |
Hi there, |
No problem. For now i prepare the integration with Raspbee module for raspberry pi that will control the zigbee lights directly, and will work will work with zigbee switches and sensors. |
Hi @kurniawan77 Can you test ESP826Emulator with Toon? One user is saying that all Toon devices must work with it Marius. |
Hi there @mariusmotea Sure, will do and report back. |
Bad news... not working |
Ok, I'm going to close this as it has clearly been put on hold by everyone. Also it looks like it is the remote API that is preventing this from moving forward. So until we have a solution for the remote API it looks like Toon will not work. Feel free to reopen this @kurniawan77 if you wan't to work on it again. |
Fix Ikea Tradfri lights not updating
Update from mainstream
Hi,
I have got your diyHue emulator working fine with the official phillips hue apps together with a wemos d1 mini and a neopixel ring. Thanks a lot!
I also have a Quby (dutch Toon Eneco) which serves as a thermostat, zwave and Hue controller but it simply could'nt find the Hue bridge emulator. It seems that the Toon listens to others broadcasts then your simulator does.
It would be great to have your simulator working with the Toon. I have found some info over here: https://github.com/ewjmulder/hue-bridge-simulator/issues and especially here: https://raw.githubusercontent.com/ewjmulder/program-your-home/master/eneco-toon/IDEAS.txt which explains the broadcast of this emulator.
I am not a dev but i certainly would love to help with testing if you would have a dive in this.
regards kurniawan77
The text was updated successfully, but these errors were encountered: