Do you like flow charts? Because we made two for you.
Data forwarders provide the ability to forward messages and configuration events from Meshblu into any other service via a combination of Subscriptions 2.0 and Forwarding 2.0 Webhooks. Below is a brief description of how this works.
Setting Up the Data Forwarder
A data forwarder is simply a device that:
- Subscribes to other devices (generally their message.received and broadcast.sent messages), and
- Has forwarding configured, usually as a webhook, that points to a service that collects the data.
- Generally has some configuration information for the service in it's device data in Meshblu
In the above diagram the forwarder is subscribed to 2 devices: Blink1 and Endoskeleton. When either of these two devices receives a message, the forwarder device will also receive it, and post the results to the forwarding webhook that points to the service.
Permissions
In order for a forwarder to subscribe to a device's received messages, it needs to be in the receiving device's message.received whitelist
In the above example, both the Blink1 and Endoskeleton devices need to have the forwarder in their message.received whitelist.
Forwarding Messages
Once the forwarder is set up, it will forward any messages received by the devices it is subscribed to.
In this example, the Doorbell device sends a message to the Endoskeleton device. Since the Forwarder device is subscribed to the Endoskeleton's received messages, it receives a copy of the message.
Finally, the Forwarder's copy of the message is posted up to the service via the webhook.