The Passthrough-Handler Edge App makes it easy to send message through Agora Cloud by converting the message into an IoDataReportPassThroughMsg and sending it to Agora Cloud. The IoDataReportPassThrough is a special type of message that allows messages to go through, untouched, to a webhook registered with Agora Cloud for a particular Agora Group / Gateway ID.
Data passed through Agora Cloud is queued for delivery to the registered webhook, and once delivered the message is removed from Agora Cloud.
IoDataReportPassThroughMsg is a special message type that Passthrough-Handler Edge App uses to construct a Passthrough message.
Currently, any MQTT message can be sent through the Passthrough-Handler, but the following message types are processed to allow filtering and optimization before sending:
- EventMsg
- RequestMsg
- IoDataReportMsg - Device filtering provided via configuration
- FileUpload
The Passthrough-Handler Edge App expects the message sent to it on respective topic for that particular type of message which needs to be sent as a passthrough message. For Ex. for IoDataReport Message originating from an Edge App should be sent on "DataOut" Topic to passthrough handler.
Any message should be sent to the Passthrough-Handler Edge App over these topics depending on the above type of message.
- EventOut -> Event,
- RequestOut -> Request/Response,
- DataOut -> IODataReport,
- File-> FileUpload.
FIle-Upload:- The Sender Edge App is expected to send the content of the file to be wrapped in json. For example:
{
"File": "File Content"
}It is possible to filter IoDataReport messages in the Passthrough app so that only particular device data is passed through Passthrough. If a virtual device is created in Nimbus with a specified slaveId for the passthrough application, the Passthrough App may be set for such devices in its configuration. This configuration can be modified from the outside by uploading an alternate configuration (AEA.json) through OpsAgent & FileManager.
Comma(',')-separated deviceIds can be provided in this parameter for devices that are permitted to send messages via the Passthrough App.
In the Passthrough App's default configuration, no devices are defined, therefore messages will be sent to all devices unless they are set to filter.
{
"App" : {
"Passthrough-Allowed-Devices": "256,258"
}
}After receiving messages over these topics, Passthrough-Handler Edge App converts it to an IoDataReportPassThroughMsg payload.
Message --> This is test passthrough event.
IODataPassThroughTelemetry
IODataReportPassThroughMsg
Such payload is sent to ION as IODataReportPassthrough message type which indicates Nimbus to forward message to Onesite, Onesite can decode the protobuf message and show data.
{ .img-thumbnail }
{ .img-thumbnail }
{ .img-thumbnail }