Firmware update

Install a new firmware sent from Things5.

TopicDirection
things5-production/v1/devices/{device_id}/cmd/update_firmware_reqThings5 → device
things5-production/v1/devices/{device_id}/cmd/update_firmware_progressDevice → Things5
things5-production/v1/devices/{device_id}/cmd/update_firmware_resDevice → Things5

Things5 → device: cmd/update_firmware_req

Subscribe 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"
}
nametypedescription
sizeintegerfile size in bytes
md5stringresult of md5 algorithm applied to file. Can be used to check file integrity
firmware_urlstringdownload url. Valid for 1 hour
insecure_firmware_urlstringsame as firmware_url but using http instead of https
versionstringuses SEMVER https://semver.org/

Device → Things5: cmd/update_firmware_progress

Optional.
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

Publish 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"
  ]
}