hue-cli is a command-line tool for controlling Philips Hue smart lighting systems. With hue-cli, you can discover your Hue Bridge, register your app with it, and perform various operations.
Use the discover command to find your Philips Hue Bridge on the local network. This command will automatically save the Bridge's IP address in the configuration file for future use.
hue-cli discover
Before you can control your lights, you need to register your app with the Hue Bridge. Use the register command.
Press the link button on your Hue Bridge before you try to register.
hue-cli register
Once registered, you can list all devices connected to the Hue Bridge.
hue-cli list
More options such as controlling etc. will follow in the future!
The config file is in yaml format. Its created and filled with credentials (and info) automatically. It looks like that:
hue_application_key: <hue_application-key>
hue_bridge_id: <hue_bridge_id>
hue_bridge_ip: <hue_bridge_ip>
hue_client_key: <hue_client_key>Basically, you don't need to touch this file. (And you shouldn't)
I'm currently working on a proper way to release this application.
So in the future this app will probably be available on AUR and directly here on GitHub.
hue-cli uses mDNS (Multicast DNS) to discover Philips Hue Bridges on the local network. mDNS allows devices to announce and discover services within a local network without relying on a centralized DNS server.
When you run the discover command, hue-cli sends mDNS queries to locate Philips Hue Bridges available on your local network. This process is automatic and helps you find and configure your Hue Bridge seamlessly.
If a Hue Bridge is discovered, its IP address is automatically saved in the configuration file, eliminating the need for manual configuration. This simplifies the setup and makes it convenient to control your Hue lights through the CLI.