mielke queries your unifi api and presents whitelisted clients' online state. clients whitelist themselves by opting-in to have their device's mac address stored and their online state shown.
a use case could be a website presenting a list of (whitelisted) colleagues currently present in the office.
- install via
go get -u -v github.com/elseym/mielke
- test with
$GOPATH/bin/mielke --help
- execute
mielke --help
to see which options are available - supply at least
api
,user
, andpass
- make sure that
whitelist
is read/writeable; the file will be created if it does not exist - access the webinterface via your nic's ip
- use the .env.dist as template to create a
.env
file that contains the secretsMIELKE_API
set to the unifi api. example: http://unifi.local:8443/MIELKE_USER
set to the unifi api userMIELKE_PASS
set to the unifi api password
- run nix-shell to get a shell with all dependencies
nix-shell
or
- build the web-client frontend
- install dependency
go get -u -v github.com/jteeuwen/go-bindata/...
- install dependency
go get -u -v github.com/mdlayher/unifi
- generate assets with
go-bindata -debug -o assets.go -prefix web-client/public web-client/public/mielke.html
; run without the-debug
switch before committing assets - start mielke with
go run *.go
see whitelist.go