Skip to content

Support for OTA updates for sensor #18

@zen

Description

@zen

EnviroMonitorSensor has an ability to update firmware over-the-air. For this to work we need support on backend side.
From sensor perspective it's pretty straightforward - it sends GET request to server and downloads firmware binary file.
Sensor will send following request to the server:
sensor_id=XXX&token=XXX&hw_ver=XXX&sw_ver=XXX
Server should analyse this data and decide whether there is a new firmware available. If there is on, it should be send over HTTP.
What is needed on backend side:

  • admin interface to set hw_version and sw_version for every sensor
  • API interface to set hw_version and sw_version - it should be send from sensor with every request and updated on the backend side
  • admin interface to upload new firmwares and set properties: hw_version, sw_version, devel (bool), active (bool)

Additional logic for backend to decide whether there is a new firmware: every hw_version should have separate line of firmware, in each hw_version - compatible sw_versions should use semver naming, availability of new firmware is based on semver versioning.
Sensors can also request devel type of firmware (not stable) with devel=true

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions