I’m not sure if this is the correct place but I’m using sparkplug-payload library in node.js. I have a question regarding sending properties on DBIRTH msg. The specification calls for two arrays I found the following example
"properties": {
"keys": [
"documentation"
],
"values": [
{
"type": 12,
"string_value": "my documentation"
}
]
Using the above causes “TypeError: Cannot read properties of undefined (reading ‘toUpperCase’)”
But sparkplug-payload library seems more than happy with the following. Can I assume this is the correct way to pass properties? Thanks
{
"timestamp": 1465577611580,
"seq": 0,
"metrics": [
{
"name": "outdoor_pallet_area/externalTemperature",
"value": 14.1,
"type": "Float",
"properties": {
"engUnits": {
"type": "String",
"value": "C"
},
"devEUI" : {
"type": "String",
"value": "A81758FFFE03757F"
}
}
},
{
"name": "outdoor_pallet_area/humidity",
"value": 88,
"type": "UInt16",
"properties": {
"engUnits": {
"type": "String",
"value": "%RH"
},
"devEUI" : {
"type": "String",
"value": "A81758FFFE03757F"
}
}
}
]
}