Skip to content

Commit

Permalink
Added better log messages for zeroconf
Browse files Browse the repository at this point in the history
  • Loading branch information
Lohrer committed Jan 2, 2024
1 parent 9d18f30 commit b60ed5b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions amplipi/zeroconf.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,12 +120,13 @@ def _advertise_service(port: int, ok: Callable) -> None:
ip_addr, mac_addr, good_iface = _find_best_iface(ok)

if not ip_addr:
log.warning('is this running on AmpliPi?')
# Fallback to any hosted ip on this device.
# This will be resolved to an ip address by the advertisement
ip_addr = '0.0.0.0'
log.warning(f'No valid network interface found, advertising on {ip_addr}.')
else:
log.debug('Found IP address %s on interface %s', ip_addr, good_iface)
log.debug(f'Found IP address {ip_addr} on interface {good_iface}')
log.info(f'Advertising AmpliPi service on {ip_addr}:{port} (interface={good_iface})')
if port != 80:
url += f':{port}'

Expand Down

0 comments on commit b60ed5b

Please sign in to comment.