Skip to content

Nanoleaf Aurora panel autodiscovery #1485

@developer79433

Description

@developer79433

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:

https://github.com/developer79433/nanoleaf-controller/blob/master/src/discovery.cpp

Hope this helps!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions