Details
-
Type: Monitor
-
Status: Closed
-
Priority: Major
-
Resolution: Done
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: FIWARE-TECH-HELP
-
Labels:
Description
Created question in FIWARE Q/A platform on 10-08-2022 at 12:08
Please, ANSWER this question AT https://stackoverflow.com/questions/73306361/fiware-iotagent-json-over-mqtt
Question:
FIWARE: IotAgent-json over MQTT
Description:
I'm working on connecting sensors to a FIWARE system.
The sensor can report the monitoring data with MQTT in json payload.
With a public mqtt broker(hivemq), I can get the monitoring data payload as below:
{
"src":"shellyplus1pm-7c87ce64d540",
"dst":"shellyplus1pm-7c87ce64d540/events",
"method":"NotifyStatus",
"params":{
"ts":1659606613.35,
"switch:0":{
"id":0,
"apower":38.04
}
}
}.
my questions are:
(1) the sensor can only publish data on topic DeviceId/events/rpc, but if I use FIWARE IotAgent-json, the IotAgent-json expects subscribing data on topic /json/api-key/device-id/attrs (according https://github.com/yanpengwuIoT/tutorials.IoT-over-MQTT), how can I let the IotAgent-json subscribe data on topic DeviceId/events/rpc, which is sensor firmware defined and can't be changed.
(2) the sensor publishs monitoring payload as a nested multi-level json object as showed above, but the IotAgent-json can only support a single level json object (like '
' as described in https://github.com/telefonicaid/iotagent-json/blob/master/docs/usermanual.md), how can I parse the multi-level json object in IotAgent-json?
Any comment, sample or documentation for this are very appreciated! Thank you very much.
Activity
Transition | Time In Source Status | Execution Times | Last Executer | Last Execution Date | |||||
---|---|---|---|---|---|---|---|---|---|
|
4d 5h 21m | 1 | Jason Fox | 15/Aug/22 12:53 PM | |||||
|
18h 38m | 1 | Backlog Manager | 16/Aug/22 7:31 AM | |||||
|
6d 1h 37m | 1 | Jason Fox | 22/Aug/22 9:08 AM |