Skip to content
eschava edited this page Sep 7, 2014 · 1 revision

Overview

Library has simple MQTT listener and publisher implemented. And it could be started as standalone app. See examples below

MQTT listener

Listens for commands and sends them using RF channel In default configuration topic names are rf/send/<protocol name> and all commands received for topic are sent using appropriate protocol sender

MQTT publisher

Publishes all data recevied from RF channel to MQTT topic

In default configuration topic names are rf/<protocol name>/<field> and data sent to topic is just plain value for the field. E.g. for message (Temperature=23.5, Humidity=54) from Oregon SL109H device:

value 23.5 is sent by topic rf/OregonSL109/Temperature

and value 54 is sent by topic rf/OregonSL109/Humidity

How to start MQTT client

See example configuration at mqtt.properties

Bash command line should be something like

sudo java -cp bulldog.cubieboard.jar:mqtt-client-0.4.0.jar:ST4-4.0.8.jar:rf-protocols-0.1-SNAPSHOT.jar:antlr-runtime-3.5.2.jar -DpropertiesFile=mqtt.properties rf.protocols.external.paho.MqttMain

Clone this wiki locally