Let the device change its own device model.
| Topic | Direction |
|---|---|
things5-production/v1/devices/{device_id}/req/model_change_req | Device → Things5 |
things5-production/v1/devices/{device_id}/req/model_change_res | Things5 → device |
Device → Things5: req/model_change_req
req/model_change_reqThis topic can be used to request a device model change to Things5.
The model_change topic allows the device to reassign to a new device model through the MQTT protocol.
This is suitable when a generic device/gateway is manufactured and needs to be assigned later (i.e. in the assembly line) to the final machine model using the provided serial number.
Note that:
- the new machine model requires that a firmware version is set to "Main" in Things5;
- you can only reassign devices within the same tenant/organization. Cross-organization linking is not allowed.
- There is a map of allowed model change request. The machine model must be communicated to VISUP before using this request. In the future the admin will be able to update the map by himself.
things5-production/v1/devices/<device-id>/req/model_change_req
Payload
{
"request_id": "random UUID generated by device",
"machine_model_id": "95f5a8fd-6a2d-42e8-b425-bc9a0c403719"
}
| name | description | example |
|---|---|---|
| request_id | a random UUID created by the device | |
| machine_model_id | the machine model id the device is going to be associated with | |
| machine_model_customer_id | optional. This provides an alternative option to machine_model_id in order to specify the model identifier notation being used by the customer. Warning: this needs to be associated in Things5 with the corresponding T5 model. |
Things5 → device: req/model_change_res
req/model_change_resThings5 sends a response back to device with errors if any
things5-production/v1/devices/<device-id>/req/model_change_res
Payload
If no errors are present errors array is empty
{
"request_id": "UUID sent in the request",
"errors": ["model id does not exist"]
}
