An advanced feature of the SIB and the sensemetrics Platform itself allows the sensors associated with a device to be dynamically determined. This can be done either by user-defined input (using a UI control) or intelligently figured out based on sending a command to the device and setting a PropertyType in the integration code.
Sensor Map Definition
The PropertyType SETTINGS_LOCAL is the PropertyType (see PropertyTypes Reference) that drives what sensors will show up underneath a device. This is a Map whose key is an Integer string, and whose value is a string representing the sensor integration ID. This is best explained showing an example Map:
The above Map has 2 sensors. The order does matter, so the sensor mapped to "1" will show up before "2" in the ordered list of sensors that show up underneath a device on the main Connectivity view. This PropertyType should be set in the syncDevice code hook. See Code Hooks
In order to enable this dynamic functionality, just add the following YAML to the device integration definition at the root level:
- id: GENERIC
Please sign in to leave a comment.