Device types
Last updated
Last updated
This shows an overview of all the device types that are available in your environment. For each device you can edit the event handler.
Event handlers are written in TypeScript and can parse incoming payloads into measurement reports, return instructions to devices (including FOTA) and monitor device health.
For more information see the separate device type event handler documentation.
A tab in the connectivity environment was created to store the credentials encrypted for authenticated requests made in the device-type event handler or report parser.
A new credential can be created by adding a name and a secret. The secret is saved and encrypted in the database. A credential can be edited, but you can’t see the previous secret. The x button reverts the secret to the previous value.
Credentials can be used by retrieving the secret in the device-type event handler or the report parser by calling a newly added function with the matching hashId.
The operations made over the credentials tab can be later viewed in the audit-log.
Each device type can have multiple device channels where measurements are pushed. An example of a device channel is Internal Sensor. A user can define which measurements will be stored in this channel e.g. for temperature and humidity sensor, these could be the quantities stored in the channel.
When parsing a payload, users can choose which quantities are pushed to which channels from the corresponding Report type.
The channel index in Report types corresponds to the order of the channel in the device type.
Device tokens are used to assign devices to monitoring environments.
The owner of the connectivity environment does not need to have access to monitoring environments to which devices will be assigned.
When a device is linked for the first time, the instance of the device is created in the platform. This can be found in Devices. The corresponding device will have a unique hashID (e.g. dwgj6d), Identifier (e.g. IMEI number), and will be of device type (e.g. Controller for Amstel rectifier). Device tokens are the link between the connectivity and monitoring environments. Owners of connectivity environments can easily distribute said device tokens. These can then be placed in any monitoring environment, therefore allowing users to claim and install the device.
Claiming of tokens can be easily done by following these steps:
Select all device you want to move
Click claim token(s)
Click request and copy everything
Move to monitoring environment and navigate to devices
Click +
Paste copied tokens and click add
The following how how-to movie demonstrates how to move devices from connectivity environment to a monitoring environment.
Connectivity environment users can define custom graphs and their structure which will be displayed on a location in the monitoring environment.
As long as no charts are added, one will automatically be shown for each quantity.
Connectivity environment users can define a placeholder in graph titles. The possible placeholders at this point are {{port}}
and {{quantity}}
where e.g. {{port}}
is replaced by the name of the port of the first time-series in the graph.
The Withthegrid platform uses hash IDs as the device identifiers. You can now select a custom form field for each device type which will replace the hash ID in the UI of the monitoring environment. This way, users can now select from a list of e.g. IMEIs, DevEUIs, or any other user-defined form field when connecting a device to a location.
Hash ID remains the default fallback identifier if form field is undefined.
When using alternative identifiers, it is responsibility of the device type owner to pick unique identifiers.