IOT Central - Reported properties issue

2019-08-17 02:58发布

I'm having an issue getting Reported properties to update/display properly when sending from the device. I'm using the starter code provided in the IOT Central/ IOT Hub docs. Code below. When the function runs it reports back success yet when viewing the properties of the device in IOT Central they are not displayed. I have verified that the property names are configured correctly in the device template but I'm obviously missing something. I also changed the names of the properties in the code below to see if I would receive an error, but it still reported success. Any ideas?

function sendDeviceProperties(twin) { var properties = { serialNumber: '123-ABC', manufacturer: 'Test Manufacturer' }; twin.properties.reported.update(properties, (err) => console.log(Sent device properties; + (err ? error: ${err.toString()} : status: success))); }

1条回答
小情绪 Triste *
2楼-- · 2019-08-17 03:54

Just figured out what I was doing wrong...I set up the Property in the device template as an application property as opposed to a device property.

查看更多
登录 后发表回答