This is the web service powering semi-automatic firmware updates in Z-Wave JS.
Firmware upgrades are defined in the files in the firmware
directory. This information is parsed by the web service and used to respond to requests.
Z-Wave JS will query the web service on demand, providing the device identification of the device to be updated. If an update is available, the web service will respond with the necessary information to display to the user.
When desired, Z-Wave JS will download the update(s) from the provided URL, verify their integrity and install them.
We kindly ask you to open a PR for any changes to firmware updates. This way they can automatically be checked for errors.
See the documentation for more information on how to author these files.
All requests to the API require an API key, provided using the X-API-Key
HTTP header. API keys are free for open source projects. Commercial projects will be charged to cover the server costs.
To request an API key, please reach out and provide the following information:
- Project/Company name
- Open source / Commercial
- Repository URL (open source only)
- Approximate no. of requests/hour
Once you have your API key, you can use it to make HTTP requests to the API endpoints. Currently these are defined:
POST https://firmware.zwave-js.io/api/v1/updates
Content-Type: application/json
X-API-Key: <Your API Key>
{
"manufacturerId": "0x1234",
"productType": "0xabcd",
"productId": "0xcafe",
"firmwareVersion": "1.6"
}
The firmwareVersion
field may also contain a patch version, e.g. 1.6.1
. When no patch version is provided, it will be assumed to be 0
, so 1.6
is equivalent to 1.6.0
.
Example response:
[
{
"version": "1.7",
"changelog": "* Fixed some bugs\n*Added more bugs",
"files": [
{
"target": 0,
"integrity": "sha256:cd19da525f20096a817197bf263f3fdbe6485f00ec7354b691171358ebb9f1a1",
"url": "https://example.com/firmware/1.7.otz"
}
]
}
]
Response type definition:
type APIv1_Response = {
version: string;
changelog: string;
files: {
target: number;
url: string;
integrity: string;
}[];
}[];