Azure / iot-edge-modbus

Modbus protocol module for use with the Azure IoT Edge
Other
90 stars 71 forks source link

IoT Central Device template for iot-edge-modbus module #97

Closed HinrichF closed 2 years ago

HinrichF commented 2 years ago

Hi

I do not really know if I have an issue on the IoT central side or the json messages from the iot-edge-modbus module are incompatible with IoT central.

I Receive the below message in IoT central and struggle to model as needed. Would be great if somebody can shed some light on this?

{ "_unmodeleddata": { "Modbus": { "__t": "m", "PublishTimestamp": "2021-12-08T08:43:30.0000000Z", "Content": [ { "HwId": "CerboGX", "Data": [ { "CorrelationId": "DefaultCorrelationId", "SourceTimestamp": "2021-12-08T08:43:22.0000000Z", "Values": [ { "DisplayName": "Power supplied by system to loads.", "Address": "300818", "Value": "2230" }, { "DisplayName": "Power supplied by Grid to system.", "Address": "300821", "Value": "35" } ] }, { "CorrelationId": "DefaultCorrelationId", "SourceTimestamp": "2021-12-08T08:43:27.0000000Z", "Values": [ { "DisplayName": "Power supplied by system to loads.", "Address": "300818", "Value": "2220" }, { "DisplayName": "Power supplied by Grid to system.", "Address": "300821", "Value": "68" } ] } ] } ] } }, "_eventtype": "Telemetry", "_timestamp": "2021-12-08T08:43:30.451Z" }

Regards

Hinrich

yphuangms commented 2 years ago

The message payload from iot-edge-modbus module is not compatible to IoT Central. You must implement another iotedge module to parse/process the raw iot-edge-modbus message into the message format that's friendly to IoT Central.

Please refer to IoT Central documentation for the acceptable message payload format.