Skip to content
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 use join action due to incorrect IP address being fetched #69

Merged
merged 2 commits into from
Dec 9, 2024

Conversation

gpcastro
Copy link
Contributor

@gpcastro gpcastro commented Dec 9, 2024

I haven't been able to use the join action from Home Assistant using the native Linkplay integration. After debugging it, I noticed that it was sending 0.0.0.0 as the address for the main device.

The reason was that the correct address was being returned by eth0, with eth2 being 0.0.0.0. The for loop was supposed to correct it and set the value of 0.0.0.0 addresses to None, but since strings are immutable it wasn't changing the string value referenced by eth2. I've simplified the code to use a sequence of if statements until one with a valid address is found.

@gpcastro
Copy link
Contributor Author

gpcastro commented Dec 9, 2024

@silamon can you please take a look? It builds on your previous change #64, the code there to get eth addresses doesn't handle the case there eth0 has the address.

Copy link
Contributor

@silamon silamon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@silamon silamon merged commit 258546e into Velleman:main Dec 9, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants