Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
Device.setConfig("key", "value");

Get Old Configuration Value by Name:  (Configuration set for the Device in the Platform at the moment. Returns always the old Value. New Value that will be updated after the parser finished by "setConfig" calls are not considered.)

Code Block
Device.getOldConfigValue("key");

//Returns an Object of the following form: 
{
   "name":"testValue", //Name of the ConfigValue
   "value":"HELLO USER!", //Value set.
   "setValue":"2021-08-30T11:17:54.17557+02:00", //Timestamp when the Config Value was updated.
   "updatedAt":"2021-08-30T11:17:54.17557+02:00" //can be ignored. Timestamp when the ConfigValue was updated in the DB. 
} 

Get Old Configuration:  (Configuration set for the Device in the Platform at the moment. Returns always the old Values. New Values that will be updated after the parser finished by "setConfig" calls are not considered.)

Code Block
Device.getOldConfig();

//Returns an Array of Objects of the following form: 
[
   {
      "name":"testString",  //Name of the ConfigValue 
      "value":"HELLO USER!", //Value set.
      "setValue":"2021-08-30T11:17:54.17557+02:00",
      "updatedAt":"2021-08-30T11:17:54.17557+02:00"
   },
   {
      "name":"testInt",  //Name of the ConfigValue 
      "value":21, //Value set.
      "setValue":"2021-08-30T11:17:54.17557+02:00", //Timestamp when the Config Value was updated.
      "updatedAt":"2021-08-30T11:17:54.17557+02:00"  //can be ignored. Timestamp when the ConfigValue was updated in the DB.  
   }
]

Set an arbitrary device property, displayed on the "Overview" tab of the device

...