0.1.1 • Published 7 years ago
gateway-topics v0.1.1
Gateway to MQTT Topics
Send the global stream gateway-data to individual
MQTT topics:
device/<device type>/<device id>For example:
device/BLEES/c098e5300099List Topics
You can see all valid device topics by listening to:
gateway-topicsCommand:
$ mosquitto_sub -h <mqtt broker ip address> -t gateway-topicsGet all data for a type of sensor
$ mosquitto_sub -h <mqtt broker ip address> -t device/<device type>/+Usage
var GatewayTopics = require('gateway-topics');
var obj = {
device: 'DeviceName',
<other fields>: <other values>
};
GatewayTopics.publish(obj);