Versions Compared

Key

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

...

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

Get 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
// value is null if if the value is not set. 
// value type is string, number or bool. 
// Byte arrays are encoded as Base64 strings.
var value = Device.getConfig("key");


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

...

Set the Sensor time of the current data record. Used for display, filter, sorting

The Timestamp must be in JS style and thus in milli seconds

Code Block
Record.setTime(new Date(timestamp_ms));


Note

When the parser output has a field called "time" on top level, it will be used like Record.setTime() was called

We might remove this in future. So always call Record.setTime() explicitly.



Get the time when the data was received by the server in ms, compatible with new Date(...).

...