{"__v":3,"_id":"57214bbbb3c26e0e00acf3c9","category":{"project":"570587cb5c43780e003e57f8","version":"570587cb5c43780e003e57fb","_id":"57213ff4e5c07d0e008bf3bf","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2016-04-27T22:40:52.130Z","from_sync":false,"order":9999,"slug":"messages","title":"Messages"},"project":"570587cb5c43780e003e57f8","user":"5564f227f0f70f0d00a9ab20","version":{"__v":3,"_id":"570587cb5c43780e003e57fb","hasDoc":true,"hasReference":true,"project":"570587cb5c43780e003e57f8","createdAt":"2016-04-06T22:03:55.859Z","releaseDate":"2016-04-06T22:03:55.859Z","categories":["570587cc5c43780e003e57fc","570587fdcaeb1c0e00ce8149","57213ff4e5c07d0e008bf3bf"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-04-27T23:31:07.026Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":999,"body":"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](https://meshblu.readme.io/docs/firehose).\n\nWhen a message is received, it looks like this:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\\n<message \\n  xmlns:stream=\\\"http://etherx.jabber.org/streams\\\" \\n  to=\\\"2710c086-bccd-4cfa-bcc0-1a21b655d34c:::at:::meshblu.octoblu.com\\\" \\n  from=\\\"meshblu.octoblu.com\\\"\\n  type=\\\"normal\\\">\\n  <metadata>\\n    <route>\\n      <hop \\n        to=\\\"2710c086-bccd-4cfa-bcc0-1a21b655d34c\\\"\\n        from=\\\"c58b8033-8281-4e1d-af3e-a4ecbf09b369\\\"\\n        type=\\\"broadcast.sent\\\" />\\n      <hop \\n        to=\\\"2710c086-bccd-4cfa-bcc0-1a21b655d34c\\\"\\n        from=\\\"c58b8033-8281-4e1d-af3e-a4ecbf09b369\\\"\\n        type=\\\"broadcast.received\\\" />\\n      <hop \\n        to=\\\"2710c086-bccd-4cfa-bcc0-1a21b655d34c\\\"\\n        from=\\\"2710c086-bccd-4cfa-bcc0-1a21b655d34c\\\"\\n        type=\\\"broadcast.received\\\" />\\n    </route>\\n  </metadata>\\n  <raw-data>{\\\"devices\\\":[\\\"*\\\"],\\\"payload\\\":\\\"howdy\\\"}</raw-data>\\n</message>\",\n      \"language\": \"xml\",\n      \"name\": \"sample-message.xml\"\n    }\n  ]\n}\n[/block]\nSee the [Firehose](https://meshblu.readme.io/docs/firehose) documentation for more information on what the metadata means.","excerpt":"","slug":"receive-meshblu-messages","type":"basic","title":"Receive Meshblu Messages"}

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](https://meshblu.readme.io/docs/firehose). When a message is received, it looks like this: [block:code] { "codes": [ { "code": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<message \n xmlns:stream=\"http://etherx.jabber.org/streams\" \n to=\"2710c086-bccd-4cfa-bcc0-1a21b655d34c@meshblu.octoblu.com\" \n from=\"meshblu.octoblu.com\"\n type=\"normal\">\n <metadata>\n <route>\n <hop \n to=\"2710c086-bccd-4cfa-bcc0-1a21b655d34c\"\n from=\"c58b8033-8281-4e1d-af3e-a4ecbf09b369\"\n type=\"broadcast.sent\" />\n <hop \n to=\"2710c086-bccd-4cfa-bcc0-1a21b655d34c\"\n from=\"c58b8033-8281-4e1d-af3e-a4ecbf09b369\"\n type=\"broadcast.received\" />\n <hop \n to=\"2710c086-bccd-4cfa-bcc0-1a21b655d34c\"\n from=\"2710c086-bccd-4cfa-bcc0-1a21b655d34c\"\n type=\"broadcast.received\" />\n </route>\n </metadata>\n <raw-data>{\"devices\":[\"*\"],\"payload\":\"howdy\"}</raw-data>\n</message>", "language": "xml", "name": "sample-message.xml" } ] } [/block] See the [Firehose](https://meshblu.readme.io/docs/firehose) documentation for more information on what the metadata means.