Telemetry State Schema
Neuko builds its ecosystem from the device’s SDK and the client’s API with a point of view based on the telemetry state.
The JSON representation of the telemetry state is called Telemetry State Schema. A telemetry state schema also tells what type of device that is going to associate with it later.
Before a device can connect to the Neuko IoT Cloud Platform, its telemetry state schema and a few information about the device have to be defined first. Once the schema has been registered, a device can be associated with it.
Steps to create telemetry state schema
The procedures in this section describe how to create a Telemetry State Schema for a new device type.
As an example, the following parameters is assumed:
- Device name: Smart Plug
- Model Number: 123-XY
- Device Tier: M1
- Telemetry state with state name: device_state
{ "electricity": { "power": 0.0, "voltage": 0.0 }, "switch": { "power": false } }
Info
The example assumes to define a Smart Plug that measure the consumed electricity usage of Power and Voltage for every 1 minute. It also has the capability to turn On and Off.
Take note the value of all attributes in the schema are the default value when a device is registered with the schema.
- Sign in to the Neuko Web application.
- On the left navigation pane, under Device section, choose Schemas.
- On the main page, click button “+ New Schema“.
- Fill in the following form as parameters above.
- To enter the telemetry state schema, click Add new state in Telemetry state definitions.
- On the opened slide panel, enter State name and the JSON schema for Schema editor.
- Click Save button.
- Click Create button on the main form.
Wait for a few seconds for the system to register the schema.