To deploy in docker:
-
Ensure that you have configured the MQTT integration in Home Assistant.
-
Set up a
.env
file. Here's a skeleton file; you will need to populate the values with things that make sense in your environment. See CONFIG.md for more details.
# Optional, but strongly recommended
[email protected]
GOVEE_PASSWORD=secret
# Optional, but recommended
GOVEE_API_KEY=UUID
GOVEE_MQTT_HOST=mqtt
GOVEE_MQTT_PORT=1883
# Uncomment if your mqtt broker requires authentication
#GOVEE_MQTT_USER=user
#GOVEE_MQTT_PASSWORD=password
# Specify the temperature scale to use, either C for Celsius
# or F for Farenheit
GOVEE_TEMPERATURE_SCALE=C
# Always use colorized output
RUST_LOG_STYLE=always
# If you are asked to set the debug level, uncomment the next line
#RUST_LOG=govee=trace
# Set the timezone for timestamps in the log
TZ=America/Phoenix
- Set up your
docker-compose.yml
:
version: '3.8'
services:
pv2mqtt:
image: ghcr.io/wez/govee2mqtt:latest
container_name: govee2mqtt
restart: unless-stopped
env_file:
- .env
# Host networking is required
network_mode: host
- Launch it:
$ docker compose up -d
- If you need to review the logs:
$ docker logs govee2mqtt --follow