MQTT: verschil tussen versies
Uit RevSpace
Geen bewerkingssamenvatting |
Geen bewerkingssamenvatting |
||
| Regel 1: | Regel 1: | ||
Revspace currently pushes some MQTT/Moquitto messages to a mosquitto (mqtt) server running on gateway. The messages are also bridged to the public test.mosquitto.org server | Revspace currently pushes some MQTT/Moquitto messages to a mosquitto (mqtt) server running on gateway. The messages are also bridged to the public test.mosquitto.org server. | ||
Since mosquitto also runs on IPv6, you can subscribe to the internal server (if you have ipv6) | |||
We are currently using the namespace '/revspace/' | We are currently using the namespace '/revspace/' | ||
| Regel 16: | Regel 17: | ||
For mosquitto-clients, use: | For mosquitto-clients, use: | ||
(public server) | |||
mosquitto_sub -h test.mosquitto.org -t "/revspace/#" -v | mosquitto_sub -h test.mosquitto.org -t "/revspace/#" -v | ||
or: | or: | ||
mosquitto_sub -h | (revspace internal or ipv6 server) | ||
mosquitto_sub -h bar.space.revspace.nl -t "/revspace/#" -v | |||
Versie van 19 apr 2014 22:55
Revspace currently pushes some MQTT/Moquitto messages to a mosquitto (mqtt) server running on gateway. The messages are also bridged to the public test.mosquitto.org server. Since mosquitto also runs on IPv6, you can subscribe to the internal server (if you have ipv6)
We are currently using the namespace '/revspace/'
Under this namespace we currently send messages for:
- /revspace/sensors/co2 -- The current value on the co2 meter
- /revspace/button/skip - skip button for the music
- /revspace/button/stop - stop button for the music
- /revspace/button/shuffle - shuffle-play for the music
- /revspace/button/nomz - NOMZ button pressed
To receive/subscribe to these messages, download mosquitto-clients, or a MQTT library and write your own client.
For mosquitto-clients, use:
(public server) mosquitto_sub -h test.mosquitto.org -t "/revspace/#" -v
or:
(revspace internal or ipv6 server) mosquitto_sub -h bar.space.revspace.nl -t "/revspace/#" -v