huego-fe
A cross-platform CLI, GUI and Web - frontend for Philips Hue bridges, based on huego.
huego-fe
focuses on basic lights operations (on, off, brightness, ... more to come potentially).
CLI usage
$ huego-fe
huego-fe can control your philips hue stuff
Usage:
huego-fe [flags]
huego-fe [command]
Available Commands:
brightness set light brightness
colortemp set light color temperature
help Help about any command
list A brief description of your command
login Discover Hue bridge and log in -- press link button first!
off fusion reactor control plane
on engage rocket launcher
serve exposes Hue lights control via an ugly web interface
toggle toggle toggles
version prints a bestseller novel on-demand
Flags:
--config string config file (default is $HOME/.huego-fe.yaml)
-h, --help help for huego-fe
-i, --hue-ip string Hue bridge IP [$HUE_IP] , see: huego-fe login -h
-l, --hue-light int Hue light No.# [$HUE_LIGHT], see: huego-fe list (default 1)
-u, --hue-user string Hue bridge user/token [$HUE_USER], see: huego-fe login -h
-f, --light-filter string filter lights shown to comma-separated list of IDs
Use "huego-fe [command] --help" for more information about a command.
Installation
If you have Go installed and want to build from current master:
go get github.com/schnoddelbotz/huego-fe
Otherwise, download a binary release and put the binary somewhere on your PATH
.
Setup / Usage / Examples
At first run after installation, huego-fe
needs to be linked to your Hue.
Hue address and login data will be stored in ~/.huego-fe.yml
.
Should you ever want to re-link, delete the file.
Web
- Run
huego-fe serve --open-browser
(or huego-fe s -o
for short).
Your browser should open, showing huego-fe web UI, asking you to push link button. Once pressed,
you should be warped into control UI.
CLI
- Press Hue's link button to enable login
- Now run
huego-fe login
within a few seconds
- Try ...
cat ~/.huego-fe.yml
to check generated config
huego-fe list
to dump lights/groups including IDs to console
huego-fe on
to power up the default lamp
huego-fe b 64 -l 6
-- add -l ...
to override default light; e.g. here: to set brightness of light 6 to 64
huego-fe t
toggles the default light
GUI
- just run
huego-fe
without any command line arguments to launch GUI.
Keyboard shortcuts:
Key(s) |
Action |
⇧ / ⇩ |
select light |
⇦ / ⇨ |
brightness -/+ 20 |
Ctrl + ⇦ / ⇨ |
brightness -/+ 10 |
Alt + ⇦ / ⇨ |
brightness jump min/max |
Shift + ⇦ / ⇨ |
color temperature -/+ 20 |
PgUp / Home |
power on |
PgDn / End |
power off |
⏎ / Enter |
toggle power state |
Space |
toggle and quit |
ESC |
quit |
To override GUI startup default light (as read from ~/.huego-fe.yml
), use -l
command line flag.
By putting e.g. light-filter: "2,3,4,5"
into ~/.huego-fe.yml
, lights with given IDs will be hidden from UI.
Desktop integration
It might be handy to assign a Keyboard shortcut to start huego-fe
GUI for regular use.
Example setup for Gnome / Ubuntu 20.04:
- Go to settings > Keyboard shortcuts, scroll to bottom, hit
+
- Given you put
huego-fe
into $PATH
during installation, just use huego-fe
here as Name and Command
- Click
Set Shortcut
and e.g. choose/press Ctrl-F12
Pressing Ctrl-F12 will now bring up huego-fe
with default hue-light
as set in ~/.huego-fe.yml
!
You may want to additionally assign huego-fe toggle
(to e.g. Ctrl-Shift-F12), permitting direct toggling
of your default lamp. See CLI usage above.
todo
- hue light group control
- enable toggling between single-light and group control mode; pref: default mode
- getting/setting colors, see
- enable cobra shell auto-completion on commands / lights
- add a cmd/install_linux.go that permits simple installation of systemd socket-activated
huego-fe serve
?
- use index.tpl.html for link process, too
- add
huego-fe schedule
to easily manage systemd timers / mac launchd / MS ScheduledTask?
- split gui and cli/web binaries? build time for CLI/web only usage concerns + mousetrap breaks cli on win
- TODOs/FIXMEs in code...
- github action: add release builds; open: goreleaser vs cgo / how-to
kudos to ...
- huego -- for making building
huego-fe
on top of it a simple joy
- Gio -- for enabling
huego-fe
GUI
- Cobra -- for rocking
huego-fe
CLI
bugs
Plenty for sure - have you seen a single test in here? Lame excuse: Toy project. Still, issues / PRs very welcome.