Skip to content
This repository has been archived by the owner on Dec 7, 2021. It is now read-only.

Latest commit

 

History

History
22 lines (16 loc) · 800 Bytes

docker.md

File metadata and controls

22 lines (16 loc) · 800 Bytes

Docker support instructions

  1. Build docker container as follows. The SENSORS is required and is the unique id of your sensors in the form sensor_id pulses_per_kwh. The various MQTT_args are optional (but highly recommended to enable communication to your mqtt_broker).
docker build -t sparsnas --build-arg SENSORS="1234 1000" \
  --build-arg MQTT_HOST=192.168.x.x --build-arg MQTT_PORT=1883 \
  --build-arg MQTT_USERNAME=username --build-arg MQTT_PASSWORD=password \
  https://github.com/tubalainen/sparsnas_decoder.git
  1. Run the container (it is possible to set the arguments above at runtime as -e MQTT_HOST=192.168.1.2 if you like).
docker run -it --device=/dev/bus/usb --name=sparsnas --restart=always sparsnas:latest
  1. Sit back and enjoy 😄.