I can't figure out how to report telemetry to IOTCentral.
I created a Device Template, added a Telemetry measurement, Field Name "freeDiskSpace", Maximum Value 999999999999. Got a device associated with the template. Fired up the device code, but looking at the device in Device Explorer of IOTCentral it only says "Missing Data".
First I tried:
const upd = {};
upd.freeDiskSpace = info.available;
deviceTwin.properties.reported.update(upd, function (err) {
and in the debugger I could see the twin received the data
Got device twin
{ reported:
{ update: [Function: update],
freeDiskSpace: 468716691456,
'$version': 4 },
But nothing in IOTCentral.
Then I noticed how they were sending down desired properties:
desired:
{ setCurrent: { value: 0 },
so I tried
const upd = {};
upd.freeDiskSpace = { value: info.available };
deviceTwin.properties.reported.update(upd, function (err) {
but still nothing in IOTCentral.