Closed billimek closed 4 years ago
Got the basics working:
docker.zwave2mqtt.sh
:
IMAGE=robertslando/zwave2mqtt:arm32v7-latest
NAME=zwave2mqtt
if ! docker pull $IMAGE | tee /dev/stderr | grep -q "Image is up to date"
then
echo "removing old $NAME for $IMAGE"
docker stop $NAME
docker rm -f $NAME
fi
if ! docker ps --filter=name="$NAME" --filter=status="running" | grep $NAME
then
echo "running $NAME"
docker run \
-d \
--name $NAME \
--restart always \
-p 8091:8091 \
--device=/dev/ttyACM0 \
-v $(pwd)/zwave2mqtt:/usr/src/app/store \
$IMAGE
fi
zwave2mqtt/settings.json
:
{"mqtt":{"name":"rabbitmq","host":"10.2.0.102","reconnectPeriod":10000,"prefix":"zwave","qos":0,"port":1883,"allowSelfsigned":true},"gateway":{"values":[],"type":0},"zwave":{"port":"/dev/ttyACM0","saveConfig":true,"pollInterval":10000,"logging":true}}
it's working great.
See https://github.com/OpenZWave/Zwave2Mqtt
This should allow for a zwave USB device to be 'shared' over the network via MQTT. Benefit of this approach is to have the physical Zwave USB device plugged-into a pi somewhere in the house and the home-assistant stuff consume it via a yet-to-be-created integration. See https://github.com/OpenZWave/Zwave2Mqtt/issues/27 for some more context.