This project converts temperature and humidity sensor messages from the OWServer to MQTT.
This project comes with two docker images, the main project pharndt/owservermqtt
and an optional image pharndt/ds9490r-owfs
containing OWServer and the driver for a DS9490R USB stick.
I recommend using the docker images (see docker examples).
See example configuration for full example.
{
"mqtt": {
"url": "tcp://192.168.2.2:1883",
"username": "myuser",
"password": "mypassword",
"deduplicate": true
},
"owserver": {
"url": "http://192.168.2.1:2121",
"polling-interval": 60,
"sensors": [
{ "uid": "28.AABBCCDDEE01", "topic": "home/temperature/sensor1" },
{ "uid": "28.AABBCCDDEE02", "topic": "home/temperature/sensor2" },
{ "uid": "26.111111111111", "topic": "home/humidity/sensor1" }
]
}
}
- temperature
- temperature_humidity
- counter
"sensors": [
{ "uid": "28.AABBCCDDEE01", "topic": "home/temperature/sensor1", "type": "temperature" },
{ "uid": "28.AABBCCDDEE02", "topic": "home/temperature/sensor2", "type": "temperature_humidity" },
{ "uid": "26.111111111111", "topic": "home/humidity/sensor1", "type": "counter" }
]
parameter | description | default |
---|---|---|
url | MQTT Server | |
username | username for user/password auth | no authentication |
password | password for user/password auth | no authentication |
retain | true |
|
qos | 0, 1, 2 | 1 |
deduplicate | Deduplicate messages | false |
parameter | description | default |
---|---|---|
url | OWServer address | |
polling-interval | in seconds | 60 |
sensors | Array of sensor objects |
owservermqtt:
hostname: owservermqtt
image: pharndt/owservermqtt:2.0.1-b6
volumes:
- ./config/heizung:/var/lib/owserver-to-mqtt-gw:ro
restart: always
depends_on:
- owfs
- mosquitto
owfs:
privileged: true # usb access
hostname: owfs
image: pharndt/ds9490r-owfs:2.0.1-b6
expose:
- "2121"
ports:
- "2121:2121"
volumes:
- /dev/bus/usb:/dev/bus/usb
restart: always