Sigfox or Lora devices with Azure-Digital-Twins

193 Views Asked by At

I have a couple of questions for the setup of digital twin with Lora and Sigfox devices which data are encoded:

  1. how do we get the iothubowner string to create the callback to Lora or Sigfox backend ?
  2. how do we deal with mandatory properties especially with HardwareId?
  3. what is the best practice to decode message and then compute the message? Knowing that we have to cascade the processing : decoding then normalization then telemetry analytics (monitor room condition for example)
1

There are 1 best solutions below

0
On

Here are the answers: 1. IoT Hub connection string (iothubowner) will be exposed in the API in couple of months 2. For device the unique identifier from client side is HardwareId. We recommend adding the MacAddress of the device. For SensorId.HardwareId, you have multiple options that we recommend: either Device.HardwareId + SensorName or just SensorName if unique per device or just a GUID. SensorId.HardwareId is important to be set because this value must match the telemetry message header property DigitalTwins-SensorHardwareId in order for the UDF to kick off. See https://learn.microsoft.com/en-us/azure/digital-twins/concepts-device-ingress#device-to-cloud-message 3. You'd have to create a matcher that associates the right UDF with the code to decode the byte array to a certain type of sensors. For example, if you have sensors of Type: LoRa, and then various DataTypes: you'd create a matcher against the Type to match "LoRa" and then various datatypes. For now, you would have to handle all of that in one UDF. In the future, we might support chaining and you could have a UDF for each step separately, but until then, all in one.