Install a new firmware sent from Things5.
| Topic | Direction |
|---|---|
things5-production/v1/devices/{device_id}/cmd/update_firmware_req | Things5 → device |
things5-production/v1/devices/{device_id}/cmd/update_firmware_progress | Device → Things5 |
things5-production/v1/devices/{device_id}/cmd/update_firmware_res | Device → Things5 |
Things5 → device: cmd/update_firmware_req
cmd/update_firmware_reqSubscribe to this topic to get notified of update firmware requests.
After the update has been handled by the device publish the result on this topic: update response
things5-production/v1/devices/<device-id>/cmd/update_firmware_req
Payload
{
"request_id": "35947161-7afb-4aba-8eb0-aacec9f3fa48",
"firmware_url": "https://assets.things5.digital/firmwares/64ca02a3-6fd1-47c2-9a9d-8645552bdbee/0231_Informativa_IT.DOCX?Expires=1625652705&Signature=Te73tEN1N5KLaAncvHEeWl6hvxSkoSkFaVGIpYSDeg2HeiHAI1t7brNL~~b9OJe5qJlVRJgC4JR~bL-99NazmYy0wxViDNRLdqYvHxvEfTvo~hQimJXSXGI7eGpmXxJTZq-1Ut1ly9cC~Ubri20C5lmNJL78yqQCXPwGieYGU8Gp8iH-KTLMh4vlCR6Q1-PcLna5B1cjzIJ0L8ySWX6ziR3DW6N8if2ShstjnVhYSxAxy0TL624Z9KXELf1DjHt53TieJ7Sc5XEJW2GWz3BPqK7AcP90o4VV42Uf3sgBsJlBn3rq~yfCsSiCs3EcL84b5BsZFtj7t7jgX8SgVEqo9g__&Key-Pair-Id=KITSOBDSIRWBO",
"insecure_firmware_url": "http://assets.things5.digital/firmwares/64ca02a3-6fd1-47c2-9a9d-8645552bdbee/0231_Informativa_IT.DOCX?Expires=1625652705&Signature=Te73tEN1N5KLaAncvHEeWl6hvxSkoSkFaVGIpYSDeg2HeiHAI1t7brNL~~b9OJe5qJlVRJgC4JR~bL-99NazmYy0wxViDNRLdqYvHxvEfTvo~hQimJXSXGI7eGpmXxJTZq-1Ut1ly9cC~Ubri20C5lmNJL78yqQCXPwGieYGU8Gp8iH-KTLMh4vlCR6Q1-PcLna5B1cjzIJ0L8ySWX6ziR3DW6N8if2ShstjnVhYSxAxy0TL624Z9KXELf1DjHt53TieJ7Sc5XEJW2GWz3BPqK7AcP90o4VV42Uf3sgBsJlBn3rq~yfCsSiCs3EcL84b5BsZFtj7t7jgX8SgVEqo9g__&Key-Pair-Id=KITSOBDSIRWBO",
"md5": "88801fe439d38846eeb74efeaf865657",
"version": "0.1.0",
"size": 8445952,
"machine_firmware_id": "4f8e671f-b874-43b4-815e-794ac611fb49"
}
| name | type | description |
|---|---|---|
| size | integer | file size in bytes |
| md5 | string | result of md5 algorithm applied to file. Can be used to check file integrity |
| firmware_url | string | download url. Valid for 1 hour |
| insecure_firmware_url | string | same as firmware_url but using http instead of https |
| version | string | uses SEMVER https://semver.org/ |
Device → Things5: cmd/update_firmware_progress
cmd/update_firmware_progressOptional.
Publish to this topic to update progress
things5-production/v1/devices/<device-id>/cmd/update_firmware_progress
Payload
{
"request_id": "UUID sent in the firmwaer update request",
"progress_percentage": 35
}
Device → Things5: cmd/update_firmware_res
cmd/update_firmware_resPublish on this topic to send a response for a previous update firmware request.
things5-production/v1/devices/<device-id>/cmd/update_firmware_res
Payload
{
"request_id": "UUID sent in the request",
"success": true
}
{
"request_id": "UUID sent in the request",
"success": false,
"errors": [
"error description"
]
}
