Receive Meshblu Messages

Meshblu XMPP uses a special link in order to send the device its Meshblu messages. By connecting to the XMPP server, the device is automatically connected to the Firehose.

When a message is received, it looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<message 
  xmlns:stream="http://etherx.jabber.org/streams" 
  to="[email protected]" 
  from="meshblu.octoblu.com"
  type="normal">
  <metadata>
    <route>
      <hop 
        to="2710c086-bccd-4cfa-bcc0-1a21b655d34c"
        from="c58b8033-8281-4e1d-af3e-a4ecbf09b369"
        type="broadcast.sent" />
      <hop 
        to="2710c086-bccd-4cfa-bcc0-1a21b655d34c"
        from="c58b8033-8281-4e1d-af3e-a4ecbf09b369"
        type="broadcast.received" />
      <hop 
        to="2710c086-bccd-4cfa-bcc0-1a21b655d34c"
        from="2710c086-bccd-4cfa-bcc0-1a21b655d34c"
        type="broadcast.received" />
    </route>
  </metadata>
  <raw-data>{"devices":["*"],"payload":"howdy"}</raw-data>
</message>

See the Firehose documentation for more information on what the metadata means.