Event: message

The message event is emitted whenever a device sends or receives a message. Use the conn.subscribe API to subscribe to message events for a device. In order to receive broadcast from a device, your connection must be authenticated as a device that is in the target device's broadcast.sent whitelist. To receive message sent by a device, your connection must be in the target's message.sent whitelist. To receive messages from other devices, they must be in the authorized device's message.from whitelist. See the Meshblu whitelist documentation for more information.

  • message Message object that was received.
    • devices Array of UUIDs to whom the message was sent. It will contain the string "*", If the message was a broadcast.
    • fromUuid Uuid of the device that sent the message. Is set by Meshblu, so it can be trusted as long as it is verified that the message was received through Meshblu.

Example message

When a device receives a broadcast message it is subscribed to:

  "devices": [
  "foo": "bar",
  "fromUuid": "1f6d9e7b-059b-4c1a-b699-708948ad8e10"