MQTT client which connects to nearby GVM 800D smart lights and homeassistant.
Run GVM lights server on a device capable to communicate with the devices. For example, a USB Bluetooth dongle could be attached to your server in proximity to the GVM lights.
Configuration of server is done through environment variables
APP_CLIENTS
(optional) - Pass a list of (comma separated) MAC addresses of the GVM Lights, e.g.APP_CLIENTS="A4:C1:38:EE:EE:EE,A4:C1:38:EE:EE:EE"
. If not set, will automatically search for GVM lightsAPP_HOST
- IP address of the MQTT broker, default value:0.0.0.0
APP_PORT
- Port of the MQTT broker, default value:1883
MQTT_NODE_ID
(optional) - A string that identifies the server for homeassistantMQTT_USER
(optional) - The username to connect with the MQTT brokerMQTT_PASSWORD
(optional) - Password required with username to connect with the MQTT broker
$ APP_HOST="10.43.30.115" MQTT_USER="gvm" MQTT_PASSWORD="pass" MQTT_NODE_ID="office" cargo run --manifest-path=gvm_server/Cargo.toml
For docker, privileged mode and host mode networking will be required.
$ docker pull rahela/gvm_lights:latest
$ docker run --rm --net=host --privileged rahela/gvm_lights:latest
You may have to add -v /run/dbus:/run/dbus:ro
or -v /var/run:/run/dbus:ro
to the docker run command if the server reports: No Bluetooth adapters found
.
$ docker build -t rahela/gvm_lights:latest . -f Dockerfile.server
$ docker buildx build --platform linux/arm64/v8 -t rahela/gvm_lights:latest_arm . -f Dockerfile.server.arm64 --push