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

IP addon finder: add support for sending local mac address #4477

Merged
merged 4 commits into from
Dec 8, 2024

Conversation

andrewfg
Copy link
Contributor

@andrewfg andrewfg commented Dec 6, 2024

Adds support for a srcMac substitution token which allows the scan packets to include the source mac address.
The mac address is formatted by the given fmtMac format specifier.

See openhab/openhab-addons#17847

Signed-off-by: Andrew Fiddian-Green [email protected]

@andrewfg andrewfg requested a review from a team as a code owner December 6, 2024 15:49
@andrewfg
Copy link
Contributor Author

andrewfg commented Dec 6, 2024

Ping => @holgerfriedrich / @jlaur / @ccutrer

@andrewfg andrewfg changed the title Add support for sending the local mac address IP addon finder: add support for sending local mac address Dec 6, 2024
@ccutrer
Copy link
Contributor

ccutrer commented Dec 6, 2024

I've been playing with discovery of my wiz bulbs this morning, and I've determined that indeed the Mac and IP address don't matter:

$ echo '{"method":"registration","id":5,"params":{"phoneIp":"127.0.0.1","register":false,"phoneMac":"000000000000"}}' | nc -u -w 1 192.168.84.205 38899
{"method":"registration","id":5,"env":"pro","result":{"mac":"444f8e2df7b8","success":true}}

So if you don't want to deal with the complications of this, you don't have to. I still have to figure out actually doing this in broadcast mode, not unicast, though.

Signed-off-by: Andrew Fiddian-Green <[email protected]>
@andrewfg
Copy link
Contributor Author

andrewfg commented Dec 6, 2024

you don't have to

Umm :(
.. just did it :)

@ccutrer
Copy link
Contributor

ccutrer commented Dec 6, 2024

you don't have to

Umm :( .. just did it :)

Well, then I might as well use it :). I updated openhab/openhab-addons#17856

Signed-off-by: Andrew Fiddian-Green <[email protected]>
@andrewfg andrewfg requested a review from ccutrer December 6, 2024 23:54
Copy link
Member

@holgerfriedrich holgerfriedrich left a comment

Choose a reason for hiding this comment

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

Hi @andrewfg. Thanks for the useful addition.
See my comment below regarding the binary request array.

May I ask you to create a PR in docs repo as well?
https://next.openhab.org/docs/developer/addons/addon.html#discovery-methods

@holgerfriedrich holgerfriedrich added the enhancement An enhancement or new feature of the Core label Dec 8, 2024
@holgerfriedrich holgerfriedrich merged commit 57cf6a5 into openhab:main Dec 8, 2024
5 checks passed
@holgerfriedrich holgerfriedrich added this to the 4.3 milestone Dec 8, 2024
@andrewfg andrewfg deleted the ip-finder-mac branch December 8, 2024 12:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement An enhancement or new feature of the Core
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants