-
-
Notifications
You must be signed in to change notification settings - Fork 561
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
Unable to discover Xiaomi Philips LED Bulb #106
Comments
It means the device is not answering to the handshake, which could be caused by your network setup among other things, so there is no simple solution for this. |
For some reason the Xiaomi Philips LED Ball (firmware 1.3.0__0032) doesn't respond to the initial helo request. I have a Xiaomi vacuum on the same subnet which does respond. I've used some prototype code (from https://notes.jmsinfor.com/blog/post/admin/Xiaomi-Hub) to simply send the helo packet and wait for a response. Xiaomi Philips LED Ball:
Vacuum:
Is anyone running into a similar issue? |
I believe the protocol has changed in the latest firmware. It seems that the bulb only responds to the host sending the packet on UDP 8053 during the discover process. I modified device.py to bind to port 8053 during the discover process and I was able to get the bulb to respond:
However, I'm now running into some errors. Here is the output from miceil:
|
I believe I resolved the timeout error by binding to port 8053 during the send command in device.py
Now, I'm running into the following error:
|
Why did you pick port 8053? |
I was capturing packets between the bulb and Xiaomi's servers and the bulb was sending data to 8053 so I gave it a shot and it worked. |
Could you try some more ports? I assume we cannot use your fix because a single static port would prevent the execution of two parallel miio calls. The port can be only bound once. |
You could try to change the exception handler in https://github.com/rytilahti/python-miio/blob/master/miio/protocol.py#L139 to print out the exception:
to see what exception is being thrown out. |
@syssi - It seems as though the bulb always initiates a connection to Xiaomi's servers on 8053. I'll write a script to see if it ends up responding on other ports. @rytilahti: The exception is invalid padding bytes
|
Can you tell me the firmware version of your light bulb? Please try to use the mihome app for a firmware update. I'm unable to reproduce your behavior. This is my firmware version: 1.3.0_0032. |
That's interesting. My bulbs are on firmware 1.3.0_0032 as well. I'm unsure why mine are not working. The only thing I can think of is that I have them on a separate vlan with my other IOT devices including yeelight bulbs and mi vacuum, which are working. Any ideas? |
Has your bulb internet access? Could you setup a small and standard WiFi network (AP + Bulb + miio host) for testing? |
I can comment on that... I've tested quite a but with the bulb on separate
vlan. For my device I was unable to get any response from it while the
requesting device was in another.
I tested with wireshark etc to confirm that packages arrived, but the bulb
just didn't respond.
When you try on the same network segment there is no problem.
I concluded that the device can't be controlled that way (which is pitty as
I can't use it in my desired setup).
I
… |
@marcelrv Thanks a lot for that info! I managed to get the bulb working by NAT'ing traffic to the bulb from my VLAN which has my homeassistant server. You may want to give that a go to see if it works for you. |
@syssi and @rytilahti - Thanks a lot for your help with this as well! I believe the bulb was responding when I sent a packet from UDP 8053 because it thought it was talking to Xiaomi's servers, which would not be on the same network. However, it seems the protocol which Xiaomi's servers use is different from the LAN protocol. |
Is the issue solved and can we close the issue? |
Yes, it's resolved. Thanks!
…On 1 Dec. 2017 8:00 pm, "Sebastian Muszynski" ***@***.***> wrote:
Is the issue solved and can we close the issue?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#106 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AFGORYWVbzWhLKl0fEgfUO3WErThJB8Hks5s78AZgaJpZM4QKNoD>
.
|
I'm unable to connect to my Xiaomi Philips LED bulb using home-assistant 0.56.2 with python-miio 0.3.0. I'm running into the following error:
2017-10-29 17:16:11 INFO (MainThread) [homeassistant.components.light.xiaomi_miio] Initializing with host 192.168.4.14 (token ddd6b...) 2017-10-29 17:16:16 ERROR (MainThread) [miio.device] Unable to discover a device at address 192.168.4.14
I've tried to use python-miio directly to connect to the device and I'm getting the following error:
Please let me know if I can provide any further information. Thanks!
The text was updated successfully, but these errors were encountered: