-
Notifications
You must be signed in to change notification settings - Fork 11
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
Suggestion: Use device name as UID instead of IP address #14
Comments
This is defined by hifiberry you would have to ask over there and @schnabel would have to help implement in audiocontrol2sio |
@salsabeard if you are still interested ... let me know. But I do not have a lot of time at the moment :-(. |
Oh man, it’s been a long time since I even looked at this. I got things working and sort of just forgot all about it. In short, I do think there is room for improvement here, but I can totally understand lack of time to work on it.As I see it, there is just some room for improvement. Due to the integration relying on specific addresses of devices, DHCP is really more of an enemy unless using static reservations. If the device address changes, it breaks.This also poses a challenge for using both the wired and wireless interfaces on the devices. I’ve got three of these things floating around my house and I do wired when possible. But because the interfaces have different MACs, I can’t rely on using the same IP address and so I end up having to have six “devices” added to HASS.Again, it works fine, but could be improved.On Apr 12, 2024, at 6:12 AM, schnabel ***@***.***> wrote:
@salsabeard if you are still interested ... let me know. But I do not have a lot of time at the moment :-(.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Hi @salsabeard, |
Definitely not a misunderstanding. I am a network engineer and I know how hostname and address resolution work, but a fair number do not, nor do they know how to setup a local DNS server.This also still doesn’t really solve the issue as the name server should only be returning one address per hostname, and the HiFiBerry will technically have two if both wired and wireless interfaces are enabled and connected. Technically this should be up to logic in the HFB to disable wireless if wired is connected (and it may be there but I haven’t checked in a long while).-In the HASS integration, the idea would be that some other property would be used as the unique identifier for the devices, and the list of current associated IP addresses would be more of a transient property. But again, there really isn’t a good way to update it if it changes, short of leveraging a discovery protocol such as SSDP.-NickOn Apr 14, 2024, at 5:46 AM, schnabel ***@***.***> wrote:
Hi @salsabeard,
I think your problem might just be a small misunderstanding. If I understand correctly you want to abstract away from the physical connection used to communicate from HASS with the hifiberry API.
You could use the name of the hifiberry devices instead of fixed IPs (in the HASS config). This name should be used by your router for your LAN (for DNS). You can configure the name in main view of the hifiberry os (the three dots). In case you want to disable wifi ... you can do that in the network settings.
Hope that solves your problem :-).
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: ***@***.***>
|
HI @salsabeard. I did not mean offend you or question your knowledge about networking. I assumed from your first post that you might think you have to use an IP to configure the HFB in HASS. That is why I pointed out that you could use DNS if your router supports it. |
Oh, I am sorry if I seemed offended. I was simply trying to convey my understanding. Using the hostname and DNS is a perfectly viable option, though I do think static IP addressing or DHCP reservations would be easier.But I do also agree. The issue is not really worth the time it would take to improve it as it stands currently. It really is working well enough for 95% of use cases. Honestly, I think this can just get closed out fully. There isn’t really much else to do with it.-NickOn Apr 14, 2024, at 1:09 PM, schnabel ***@***.***> wrote:
HI @salsabeard. I did not mean offend you or question your knowledge about networking. I assumed from your first post that you might think you have to use an IP to configure the HFB in HASS. That is why I pointed out that you could use DNS if your router supports it.
I also think it is a valid assumption that many user do use a router with DNS and in that case it would solve the problem. Since it is possible to turn off the wifi on the hifiberry I do not really see much need for action.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: ***@***.***>
|
I just migrated my 3 devices from Balena-Sound to HiFiBerry OS. I can't believe I held out as long as I did as this platform is exactly what I've wanted.
My suggestion is based around two different use-case scenarios. One would be for users that are simply using DHCP for addressing of the HFB. Given that the address is subject to change, it isn't a viable UID.
The second use-case is the one I fall into. I have static addresses assigned for my devices, but I also utilize both wired and wireless. In both Balena-Sound and HiFiBerry OS, the devices seem to connect to wireless even when the wired is connected. This results in the device pulling two IP addresses.
As such, I end up having 6 different devices with single entities for 3 physical units. It would be nice if each unit was tracked as a single device with a data table consisting of the relevant MAC addresses. IP would be populated dynamically via ARP. Then we'd just need the media player entity to track whichever MAC is actively in use for the device.
The text was updated successfully, but these errors were encountered: