-
-
Notifications
You must be signed in to change notification settings - Fork 28.4k
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
Magic Home Integration cant connect to RGB Controller #77005
Comments
flux_led documentation |
Hey there @icemanch, @bdraco, mind taking a look at this issue as it has been labeled with an integration ( |
Historically all of these have talked over port 5577. Which port is the app using for these devices? Are they using a new firmware version? Where did you purchase the devices? |
From a Wireshark capture it looks like the app is using port 34001. I think I see the failed connection from HA as well. 27 104.368624 192.168.1.125 192.168.1.193 TCP 74 51388 → 5577 [SYN] Seq=0 Win=64240 Len=0 MSS=1460 SACK_PERM=1 TSval=710756492 TSecr=0 WS=128 The exact model I'm using is this one: https://assets.leevalley.com/Original/10090/75284-wi-fi-led-dimmer-lighting-controller-c-01-e.pdf FW versions looks like 25.v2.18.6459-A |
I have a few of those lying around and they all use port 5577z If you send me your mailing details before Monday (traveling for a bit after that), I'll send you out one of them and we can figure out if it's a network issue or a device issue |
Sure, we could try that. I live in Vancouver Canada, is that ok? I have 4 of these devices at home, and they're all giving me this error in HA. I also remembered that I have a brand new one I never used. So I'm going to try that one later today too. |
Yes. Please send your mailing details out to nick@koston.org and I'll ship it out tomorrow. |
You should have received an email from USPS with the tracking. Let me know if it didn't come thorough |
Yes, I got it the other day, thanks. Let me know if there are any special steps you want me to take for debugging. |
I think just setting it up and seeing if Home Assistant can talk to it or not. Then we can rule out if it's a network issue or firmware issue |
OK, sounds good. I just tried the other unit I had still in a box. Looks like its communicating on port 34001 as well. Just to confirm as well, this is the Android App I'm using. I don't think that should matter. |
Can you send full wireshark dumps of the port 34001 traffic? |
Just emailed you the full capture file. |
Can you send debug logs for Maybe the port is in the UDP broadcast somewhere |
The app is hard coded to use the other port Armacost Lighting version uses 34001 smali/com/zengge/wifi/COMM/a/t.smali: const p0, 0x84d1 Magic Home Pro app uses port 5577 smali/com/zengge/wifi/COMM/Protocol/g0.smali: const/16 p0, 0x15c9 |
OK, interesting, thanks for the investigation. I'll try to get the log this weekend. |
I just emailed the debug logs. Hopefully there is something in there you can use. |
That's probably enough to know to switch the port in the lib |
I saw these entries in the log. Are they the contents of the TCP packets from the controllers? So basically, you can use this info from the discovery step, to determine which model of controller/brand it is and have the integration use port 34001 instead of 5577? |
These devices use port 34001 instead of 5577 and its hard coded into the app so we need to detect them in the model info and switch ports changelog: Danielhiversen/flux_led@0.28.30...0.28.31 fixes home-assistant#77005
I can't tell for sure if it will fix it because I don't have one to test with, but #77500 should try the other port |
I tried using the python utility you updated flux_led I think I'm using it right, but I'm still seeing the error on port 5577. ~$ flux_led -s --debug ~$ flux_led 192.168.1.193 --on --debug |
I'm not sure the CLI will work since it doesn't always feed the discovery data into the client. Home Assistant has provisions to do that and restore the discovery from cache if it fails on restart |
I added a test based on your discovery dumps Danielhiversen/flux_led#379 Its setting the port correctly based on the test so you probably have to wait until the PR merges and it comes out in a release or patch the lib manually in the mean time |
Awesome, sounds good! I might try to figure out how to patch the lib myself. Also, to test that the connection works, I changed base_device.py to use Thanks again for your responsiveness and work on this :) |
That’s a really old model, but its similar to the ones we have tests which definitely use port 5577.
Can you run a port scan on the device to see which ports are open?
… On Aug 18, 2022, at 1:52 PM, Buonoster ***@***.***> wrote:
From a Wireshark capture it looks like the app is using port 34001. I think I see the failed connection from HA as well.
192.168.1.125 is HA, 192.168.1.193 is the RGB controller.
27 104.368624 192.168.1.125 192.168.1.193 TCP 74 51388 → 5577 [SYN] Seq=0 Win=64240 Len=0 MSS=1460 SACK_PERM=1 TSval=710756492 TSecr=0 WS=128
28 104.370412 192.168.1.193 192.168.1.125 TCP 60 5577 → 51388 [RST, ACK] Seq=1 Ack=1 Win=5840 Len=0
The exact model I'm using is this one: https://assets.leevalley.com/Original/10090/75284-wi-fi-led-dimmer-lighting-controller-c-01-e.pdf <https://assets.leevalley.com/Original/10090/75284-wi-fi-led-dimmer-lighting-controller-c-01-e.pdf>
FW versions looks like 25.v2.18.6459-A
—
Reply to this email directly, view it on GitHub <#77005 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAFB7CHFAYDQUBDUCIDH3ZDVZ3EFVANCNFSM56626RDQ>.
You are receiving this because you were mentioned.
|
The problem
The integration seems to discover the Wi-Fi controllers, but can never connect.
From the Integration UI "Retrying setup: [Errno 111] Connect call failed ('192.168.1.217', 5577)"
I have 2 controllers, same result with both. Magic Home Android App works fine to control them.
What version of Home Assistant Core has the issue?
2022.8.6
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant OS
Integration causing the issue
Magic Home
Link to integration documentation on our website
https://www.home-assistant.io/integrations/flux_led/
Diagnostics information
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
Additional information
Could the port number (5577) be wrong? It looks like the Magic Home App on my phone is using a different port to communicate with the controllers. If so, is there a way to override the port number?
The text was updated successfully, but these errors were encountered: