MQTT: Difference between revisions

From RevSpace
Jump to navigation Jump to search
No edit summary
No edit summary
Line 7: Line 7:
<ul>
<ul>
<li>/revspace/sensors/co2  -- The current value on the co2 meter
<li>/revspace/sensors/co2  -- The current value on the co2 meter
<li>/revspace/sensors/#-t#  -- Temperature sensor
<li>/revspace/button/skip - skip button for the music
<li>/revspace/button/skip - skip button for the music
<li>/revspace/button/stop - stop button for the music
<li>/revspace/button/stop - stop button for the music
<li>/revspace/button/shuffle - shuffle-play for the music
<li>/revspace/button/shuffle - shuffle-play for the music
<li>/revspace/button/nomz - NOMZ button pressed
<li>/revspace/button/nomz - NOMZ button pressed
<li>/revspace/state -- Space state (open|closed)
<li>/revspace/music/klusbunker/volume -- Music volume (0-100)
<li>/revspace/music/klusbunker/mode  -- Music mode (play|stopped)
<li>/revspace/music/klusbunker/np  -- Music: Now playing (artist/title)
</ul>
</ul>



Revision as of 21:58, 21 April 2014

Revspace currently pushes some MQTT/Moquitto messages to a mosquitto (mqtt) server running on mosquitto.revspace.nl. 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/sensors/#-t# -- Temperature sensor
  • /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
  • /revspace/state -- Space state (open|closed)
  • /revspace/music/klusbunker/volume -- Music volume (0-100)
  • /revspace/music/klusbunker/mode -- Music mode (play|stopped)
  • /revspace/music/klusbunker/np -- Music: Now playing (artist/title)


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 mosquitto.revspace.nl -t "/revspace/#" -v


For debian users... please use the following repository, as the packages in debian are ancient:

 http://mosquitto.org/2013/01/mosquitto-debian-repository/
 deb http://repo.mosquitto.org/debian wheezy main