Fine-tuning with the Node.js SDK – property value management
In this section, we will look at how we can set/get cloud variable values using the SDK. This is very useful for performing bulk operations; for example, if you have 100 lights connected to the Arduino IoT Cloud, it will be difficult to control them all manually from a dashboard. Suppose switching one device on/off takes 3 seconds from the dashboard – with 100 devices this will require 300 seconds, a total of 5 minutes, along with the chance of human error (maybe the user misses one device due to bulk processing). But with the help of the SDK, we can perform bulk operations on Things, saving time and improving confidence in our ability to reach zero-error operations.
Get a property value
Let’s first see how to get the last value of the cloud variable. To do this, we need the Thing ID and cloud variable ID. More precisely, we will get the complete properties of the cloud variable in JSON format here...