Arduino sketch to send RFlink output to JSON MQTT server
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Common.h Initial commit Oct 20, 2017
LICENSE Initial commit Oct 20, 2017
README.md Added link to the article on my blog Nov 16, 2017
Rflink.cpp Initial commit Oct 20, 2017
Rflink.h Initial commit Oct 20, 2017
RflinkToJsonMqtt.ino Initial commit Oct 20, 2017

README.md

RflinkToJsonMqtt

This arduino sketch allow to build a gateway RFlink serial output and a MQTT server.

The serial message from Rflink is converted on the fly to json payload. This make Rflink output more standard and easier to parse. The sketch also subscribes to a specific MQTT channel and listen to orders to be sent to the Rflink (no json, just plain Rflink text order).

This sketch has been tested during more than 10 days with around 10 messages per minutes on an arduino nano and a mini Wiznet (W5100) ethernet shield. It may support more messages.

Rflink serial output must be connected to pin 8 (rx) and 9 (tx). All other parameters can be changed in file common.h Through, in order to avoid out of memory, it is not advised to modify BUFFER_SIZE, MAX_DATA_LEN nor MAX_CHANNEL_LEN

Known limitations :

  • setting Rlink to debug mode crash this sketch (debug messages are too long for buffer size)
  • not all possible fields / values has been tested, you may want to customize Rflink.h (feel free to make pull request)

Required libraries :

  • SoftwareSerial
  • PubSubClient
  • Ethernet

More detail on how to build the complete shield on my blog : http://www.bluemind.org/custom-arduino-shield-mqtt-rflink