Connect to Azure IoT Hub

Setup Thingsee Azure IoT Hub Connection

Azure is one of the most common data integration points to where Thingsee data is forwarded. To get the data forwarded to an Azure IoT hub, the following information is required

  • Hostname
  • DeviceId
  • SharedAccessKey

Note that the Thingsee Operations behaves as a single device towards Azure IoT Hub so that you need to define a static DeviceId e.g. “thingsee” that is used by every Thingsee gateway and sensor device. The actual device identifier comes within every Thingsee Message (JSON) in a tsmTuid-property.

It is possible to make the integration so that tsmTuid is mapped to an unique DeviceId, but that would require pre-population of all sensor devices to Azure and would make bundled Thingsee Messages a bit trickier to handle. This can be done if that makes your Azure development easier.

What we need from you to make the integration happen

Just let us know your Azure IoT Hub connection string

HostName=xxxxxxxx.azure-devices.net;DeviceId=xxxxxxxxxxx;SharedAccessKey=xxxxxxxxxxxxxxx

After that is done, you should start receiving following JSON arrays (example) to you Azure IoT Hub. Please be aware that the messages come always as JSON arrays, and you need to parse the objects preferably by tsmId-field so that you know what properties to expect.

[
  {
    tsmId: 12101,
    tsmEv: 10,
    hall: 0,
    hallCount: 0,
    tsmTs: 1520416221,
    tsmTuid: "XXXX03X2Z80562557", // unique sensor device id
    tsmGw: "XXXX00EFS80560445" // unique gateway device id
  },
  {
    tsmId: 1110,
    tsmEv: 10,
    batl: 100,
    tsmTs: 1520416221,
    tsmTuid: "XXXX03X2Z80562557",
    tsmGw: "XXXX00EFS80560445"
  },
  {
    tsmId: 12100,
    tsmEv: 10,
    airp: 101364.599,
    lght: 6,
    temp: 21.3,
    humd: 21.7,
    tsmTs: 1520416221,
    tsmTuid: "XXXX03X2Z80562557",
    tsmGw: "XXXX00EFS80560445"
  },
  {
    tsmId: 1111,
    tsmEv: 10,
    accx: -1024,
    accy: 64,
    accz: -192,
    tsmTs: 1520416221,
    tsmTuid: "XXXX03X2Z80562557",
    tsmGw: "XXXX00EFS80560445"
  }
];
Previous