Sending data to Senfi
From Senfi Docs
Senfi monitors and stores time series data from your existing systems. At the moment, Senfi provides a MQTT interface for receiving data from your systems. To start sending data to Senfi, you need to do the following:
- Create an integration key in the CMS
- Design and create a measurement in the CMS
- Write a program to read from your system and send it to Senfi's MQTT endpoint
Create integration key
- Login to the CMS
- Go to the Integration tab
- Click the + button to add a new integration key/secret pair
- Note down the values of the Key (your integration key) and Secret (your integration secret)
Design/create measurement
The key to a successful integration is to have a well-designed measurement. So if you are not familiar with the concept of measurement/metric/tag, please read this section first.
- When you are designing a measurement to represent your system, note down the metrics you want to capture.
- Decide on a set of tags to use. Make sure that there is a combination of tags that will uniquely identify the unit/device/equipment that outputs those metrics.
- Login to the CMS
- Go to the Measurement tab
- Click the + button to add a new measurement
- Give the measurement a descriptive name. This will be shown to users of the dashboard.
- Specify a measurement code. A measurement code is a unique identifier of this measurement. You can use a combination of lowercase alphanumeric characters and underscore.
- The naming convention of a measurement code is as follows: <vendor>_<system>_<version>
- For example: nest_thermostat_v1. If you make changes to the measurement (eg. adding or removing metrics), you should increment the version, eg. nest_thermostat_v2.
- Add tags
- Add metrics and specify the type of each metric
- Save when done
Publish to MQTT
MQTT Endpoint
- Host
- mqtt.senfi.io
- Port
- 1883
- Username
- <Your integration key>
- Password
- <Your integration secret>
- MQTT topic
- ingestor/1/0/live/text/array/ems/<your integration key>/<your measurement code>
You can take a look at this GitHub repository for a sample application to send data to Senfi's MQTT endpoint.
Publishing strategy: regular, upon change,