-
Notifications
You must be signed in to change notification settings - Fork 2
MQTT
Help wanted from someone who has a better understanding of MQTT!
-
MQTT is on port 1883
-
Runs Mosquitto (https://discuss.ninjablocks.com/t/today-i-learned-about-mqtt/654/6)
-
MQTT used for almost everything?
-
Announcements from drivers that a config page on Labs should be shown
-
Data from waypoints published via MQTT
-
$device/[device uuid]/TEMPPATH/rssi
Sample: $device/B4994C8572A4/TEMPPATH/rssi {"params":[{"device":"B4994C8572A4","waypoint":"B4994C81EEFD","rssi":-86,"isSphere":false}],"jsonrpc":"2.0","time":1431602148064} $device/F7092B39A480/TEMPPATH/rssi {"params":[{"device":"F7092B39A480","waypoint":"84DD206E4EB0","rssi":-77,"isSphere":true}],"jsonrpc":"2.0","time":1431602149626} $device/B4994C8572A4/TEMPPATH/rssi {"params":[{"device":"B4994C8572A4","waypoint":"B4994C81EEFD","rssi":-86,"isSphere":false}],"jsonrpc":"2.0","time":1431602150063} $device/CAE2A544DDE3/TEMPPATH/rssi {"params":[{"device":"CAE2A544DDE3","waypoint":"84DD206E4EB0","rssi":-65,"isSphere":true}],"jsonrpc":"2.0","time":1431602151495} -
$location/waypoints
also exists, but MQTT.lens shows [2] as the data. Seems to show the number of waypoints seen by the Spheramids -
Subscribing to a topic accepts wildcards
-
Use + for single level (e.g.
something/topic/+
would includesomething/topic/1
andsomething/topic/2
) -
Use # for multi-level (e.g.
something/topic/#
would include all of the above, plus levels below, such assomething/topic/1/hello
)
-
node/[sphere serial number]/#
- Stuff going on on your Sphere (e.g. what drivers are doing etc.) -
$thing/[thing ID]/channel/on-off/event/state
- A topic about the state of the on-off channel (?) -
$device/+/TEMPPATH/rssi
- Shows the activity of every waypoint (including the Sphere) and includes info like RSSI
- Install mosquitto, then run
mosquitto_sub -h ninjasphere.local -v -t '#'
- Several GUI tools exist, including mqtt.fx, MQTTLens for Chrome and others