hassio-addons / addon-airsonos

AirSonos - Home Assistant Community Add-ons
https://addons.community
MIT License
86 stars 11 forks source link

Airsonos Addon set different DNS names and overwrites sometimes "homeassistant" #106

Closed tnaumann71 closed 2 years ago

tnaumann71 commented 2 years ago

Problem/Motivation

I'm running homeassistant with HassOS 7.1 as a VM on proxmox. Im Using AirSonos Add-On. Now it turns out that AirSonso iss overwriting and changing his DNS hostname over time. My DNS server is a FritzBox 7590 with newest OS on it.

Using nslookup within some minutes showed the following. An even worse sometimes the "homeassistant" hostname für that ip-adress disapears completly from DNS.

> 192.168.242.245
Server:     192.168.242.1
Address:    192.168.242.1#53

245.242.168.192.in-addr.arpa    name = homeassistant.fritz.box.
245.242.168.192.in-addr.arpa    name = a0d7b954-airsonos.fritz.box.
> 192.168.242.245
Server:     192.168.242.1
Address:    192.168.242.1#53

245.242.168.192.in-addr.arpa    name = homeassistant.fritz.box.
245.242.168.192.in-addr.arpa    name = d687790cc3a54210b0149872011a97b1.fritz.box.

Expected behavior

The "homeassistant" VM should stay with his primary hostname in DNS. An AddOn in a container should not have the ability to change the external hostname. It can add an DNS Alias and/or add an additional in-addr.arpa record.

Actual behavior

External hostname of homeassistant VM is changing

Steps to reproduce

Install HassOS 7.1 with Airsonos AddOn 3.2.0. Set hostname to homeassistant. Airsonos runs with default configuration.

Proposed changes

Reboot / Restart HA and/or AirSonos AddOn. But the behaviour istn't deterministic.

frenck commented 2 years ago

This is caused by mDNS smartness/logic in your router. This is not an issue with the add-on.

tnaumann71 commented 2 years ago

Hi Frenck, thanks for you quick answer. Do you know a solution to make sure homeassistant hostname stays as primary hostname with this ip adress. I had some trouble because DNS / mDNS "forgot" or "AirSnos" overwrites the primary hostname and therefore the hostname couldn't be resolved and all my components bound to this hostname failed. Thanks in advance, Torsten

frenck commented 2 years ago

I have no solution for router behaviors, nor do I care. There are tons of routers out there all doing weird stuff. I'm not interested in those cases.