IOT Central - Reported properties issue

喜欢而已 提交于 2019-12-24 20:46:53

问题


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:


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.



来源:https://stackoverflow.com/questions/53207787/iot-central-reported-properties-issue

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!