Publish rflink temperature and humidity measurement to an MQTT topic.
go get -u github.com/pgaxatte/go-rflink
Optionnal environment variable can be used to override the default configuration, for example:
PUBLISH_HOST=192.168.0.1:1883 SERIAL_DEVICE=/dev/ttyACM0 go run main.go
See the Options struct definition for a complete list of supported options.
It is possible to build go-rflink as a container and run it:
docker build -t go-rflink .
docker run \
--device=/dev/ttyACM0 \
--env PUBLISH_HOST="192.168.0.1:1883" \
--env PUBLISH_TOPIC="myrflink" \
go-rflink:latest
- Try to reconnect (indefinetly or a limited number of times) when MQTT or USB connection fails
- Add tests