Typed Parameters

Sometimes devices connected to Lhings may need to convey some information or receive it. This information is usually sent using typed parameters. A typed parameter is characterized by its name and type. The name can be any UTF-8 encoded string up to 50 characters long. The type can be any of these five choices:

  • integer, when the parameter is an integer number.
  • float, when the parameter is a decimal number.
  • string, when the parameter is a string of characters. They must be UTF-8 encoded.
  • boolean, when the parameter is either true or false.
  • timestamp, when the parameter is a date and time. Values for timestamps are treated internally as integers that represent the UNIX timestamp of the desired date and time combination.

Typed parameters are useful because they provide Lhings more information about the way your devices behave, allowing for customization of the user interface, like in the case of the control panel.

Typed parameters are currently used in Lhings for these purposes:

  • Defining the set of parameters of an action, in the device descriptor.
  • Defining the components of the status of the device, also in the device descriptor.
Back to top