Registration using token
IMPACT will authenticate the device from the topic in the token.
IMPACT will take the Serial Number from the topic and use this to register the device. Optionally a device can enrich the registration by publishing details about itself in the initial PUBLISH. It can do this by using the following topic and value:
Topic is "${token}/${serialNumber}/device"
Value is a compounded JSON value made up of the following:
manufacturer, model, firmwareVersion
The following definitions apply:
- ${token}, This is the token of the device provided ahead of time, see the security section.
- ${serialNumber}, This is the actual serial number of the device.
- manufacturer, This is the manufacturer name that can be used for the device in IMPACT. This is known as the announced Make on the UI. This is used by the application to filter and can be omitted.
- model, This is the model name that can be used for the device in IMPACT. This is known as the announced Model on the UI. This can only be used if the Make is provided. This is used by the application to filter.
- firmwareVersion, This is the firmware version name that the device is currently using. This can only be used if the Model is provided. This is used by the application filter.
The following examples applies for registering a device with the manufacturer and model as "Generic" and "Sensor".
Topic = t8cwp2uneipj/8800002400000/device Value = {"manufacturer":"Generic","model":"Sensor", “firmwareVersion”:”V213.4” }
Steps to connect client (MQTT device) to vernamq broker
- Create a token for the user.
- Get the secret and username from the response of the created token.
- Provide broker address, username (uppercase), and secret from the client to connect to the broker.