This article describes the basic steps involved in creating device and sensor integrations using the SIB on the sensemetrics platform.
- Power on your sensemetrics Thread to connect to the sensemetrics cloud and add it to your account using the +Connection button
- Create a sensor integration with pairs of metrics and units that represent the data you are collecting from the sensor
- Create a device integration that references the sensor integration(s) created in step 2. See Sensor Mount Types for different ways to reference sensors.
- Update the device integration you created in step 3 to add UI controls to allow instances of the device to be added to a Thread. This can be done by going to the YAML editor and using the Control Templates and clicking controls-array and thread-device.
- Add an instance of the device to your Thread using the +Device button and specifying which port it is currently connected to.
- Go back to the device integration editor page and select the instance you created in step 5 as your Test Device
- Add code to the isDeviceAccessible code hook and click Test to verify connectivity and code feedback.
- Add code to the syncDevice code hook if you need to set device properties that will be stored in the cloud
- Add code to the syncSensor code hook if you need to set sensor properties that will be stored in the cloud
- Add code to the poll code hook to get a reading from the sensor and post an observation to the sensemetrics platform
- Verify that you can graph your observations or they appear in the data tables
- Add any UI controls to your device config or sensor config forms if you need to set instance-specific properties that will be available in your code hooks
- Add a device icon to your device integration by setting the icon key in the YAML file
- Add a sensor icon to your sensor integration by setting the icon key in the YAML file
Please sign in to leave a comment.