Docker Configuration (config/config.json):
{
"broker_url": "mqtt://username:password@your-broker-url",
"inverse_forwarding": false,
"devices": [
{
"device_id": "your-device-id",
"mac": "your-mac-address",
"type": "your-device-type",
"version": 0
}
]
}
Copy Docker Config
Optional: Monitor Your Device with hm2mqtt
After setting up Hame Relay, you can also install hm2mqtt to get detailed monitoring data in Home Assistant.
Home Assistant Add-on (Recommended):
pollingInterval: 60
responseTimeout: 30
topicPrefix: hm2mqtt
devices:
- deviceType: "your-device-type"
deviceId: "your-device-mac"
Copy hm2mqtt Config
Docker:
docker run -d --name hm2mqtt \
-e MQTT_BROKER_URL=mqtt://192.168.1.100:1883 \
-e MQTT_USERNAME=your-username \
-e MQTT_PASSWORD=your-password \
-e DEVICE_0=your-device-type:your-device-mac \
--restart=unless-stopped \
ghcr.io/tomquist/hm2mqtt:latest
Copy Docker Command
Note: hm2mqtt provides detailed battery monitoring data like cell voltages, temperature, and power flow - perfect for comprehensive energy management in Home Assistant.