Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pgaxatte/go-rflink
Publish RFlink output to MQTT in golang
https://github.com/pgaxatte/go-rflink
Last synced: about 2 months ago
JSON representation
Publish RFlink output to MQTT in golang
- Host: GitHub
- URL: https://github.com/pgaxatte/go-rflink
- Owner: pgaxatte
- License: mit
- Created: 2018-07-03T05:42:48.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-07-24T13:00:18.000Z (over 5 years ago)
- Last Synced: 2024-08-06T12:09:13.469Z (5 months ago)
- Language: Go
- Size: 940 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![Godoc](https://godoc.org/github.com/pgaxatte/go-rflinki/rflink?status.svg)](https://godoc.org/github.com/pgaxatte/go-rflink/rflink)
# go-rflink
Publish rflink temperature and humidity measurement to an MQTT topic.## Installation
```bash
go get -u github.com/pgaxatte/go-rflink
```## Usage
Optionnal environment variable can be used to override the default configuration, for example:
```bash
PUBLISH_HOST=192.168.0.1:1883 SERIAL_DEVICE=/dev/ttyACM0 go run main.go
```See the [Options struct definition](https://godoc.org/github.com/pgaxatte/go-rflink/rflink#Options) for a complete list of supported options.
### Within a docker container
It is possible to build go-rflink as a container and run it:
```bash
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
```# TODO
- [ ] Try to reconnect (indefinetly or a limited number of times) when MQTT or USB connection fails
- [ ] Add tests