-
Notifications
You must be signed in to change notification settings - Fork 221
Description
Nanoleaf panels can get different IP addresses, at times that are difficult (potentially even impossible) for humans or code to predict. For example, when the Nanoleaf controller's DHCP lease gets renewed, it is possible for the new lease to assign a different IP address to the old lease. This could result in unpredictable and sudden inability to control the Nanoleaf device via OLA, until the user performs a manual rediscovery of the Nanoleaf device(s) and manual reconfiguration of OLA.
As a result, I don't think it's a good idea to require the user to specify the panel's IP address in a configuration file (I understand OLA currently requires this).
In my opinion, it would be better to automatically discover all Nanoleaf panel(s) on the same broadcast domain as the machine running OLA, and automagically make them available via OLA.
Here is my implementation of auto-discovery of Nanoleaf "Aurora" panels using the Avahi library - please feel free to copy'n'paste parts of it, integrate it wholesale into OLA, use it as inspiration, or whatever else you deem appropriate:
Hope this helps!