Skip to Content
0

"actions" array seems to be ignored in gateway REST schema file

6 days ago

37

avatar image

Hi everyone,

Came up with this issue recently, where mapping a property like this:

"device_data": { "type": "object", "mapTo": "value", "actions": [{ "type": "ADD", "mapTo": "capability_alternate_id", "value": "HR003" }, { "type": "ADD", "mapTo": "sensor_type_alternate_id", "value": 123123123 }, { "type": "ADD", "mapTo": "sensor_alternate_id", "value": "hrsens01" }], "properties": { "*": { "mapKeyTo": "property_name", "mapTo": "value" } } }

Makes "actions" array seems to be ignored, which does not happen with a single-measurament capability like this:

"user_uuid": { "type": "integer", "mapTo": "value", "actions": [{ "type": "ADD", "mapTo": "capability_alternate_id", "value": "HR001" }, { "type": "ADD", "mapTo": "sensor_type_alternate_id", "value": 123123123 }, { "type": "ADD", "mapTo": "sensor_alternate_id", "value": "hrsens01" }] }

Could you please indicate if I am doing something wrong?

Thanks,

Federico

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Andrea Bisogno
4 days ago
0

Hi Federico,

we would need some further details to help you.

What is your goal? Can you provide an example of the message and how you want to map the fields of the message into IoTServices Capability/Sensor/SensorType?

Kind regards,

Andrea

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Hi Andrea,

I am attaching JSON files so that they are more readable. The capability I am considering is that of capability.txt. I am able to do it by sending a file like format1.txt, but what I'd like to do is send it in the format of format2.txt. I have tried with the mappings in schema1.txt and schema2.txt. In the first case, no error is reported but measurements are not received by IoTS. In the second case, I attach gatewaylog.txt, but it basically seems to see them as single capabilities and not as a multimeasure capability.

Best regards,

Federico

capability.txt (891 B)
format1.txt (277 B)
format2.txt (168 B)
schema2.txt (491 B)
schema1.txt (490 B)
gatewaylog.txt (7.0 kB)
0