From db70d60fae1f58a0432dc8c166c5bcd1a6480933 Mon Sep 17 00:00:00 2001 From: Thijs Schreijer Date: Sun, 27 Oct 2024 19:32:53 +0100 Subject: [PATCH] change(version): remove 'higher' constraint (#304) This constraint forces the use of persistent storage. By removing it we can simply start with a random number, e.g. 0-65535 and then increment it (with possibly a roll-over). Especially for resource constraint devices (which may not have storage nor be able to do unix timestamps which is 32 bits). --- convention.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/convention.md b/convention.md index ab21e87..530b675 100644 --- a/convention.md +++ b/convention.md @@ -188,7 +188,7 @@ The JSON description document is a JSON object with the following fields; | Field | Type | Required | Default | Nullable | Description | |-----------|--------------|----------|---------|----------|-------------| | `homie` |string | yes | | no | The implemented Homie convention version, without the "patch" level. So the format is `"5.x"`, where the `'x'` is the minor version. | -| `version` | integer | yes | | no | The version of the description document. Whenever the document changes, a new higher version must be assigned. This does not need to be sequential, eg. a timestamp could be used. | +| `version` | integer | yes | | no | The version of the description document. Whenever the document changes, a new version must be assigned. This does not need to be sequential, eg. a timestamp or a random number could be used. | | `nodes` |object | no | `{}` | no | The [Nodes](#nodes) the device exposes. An object containing the [Nodes](#nodes), indexed by their [ID](#topic-ids). Defaults to an empty object.| | `name` |string | no | [device-id] | no | Friendly name of the device. Defaults to the [ID](#topic-ids) of the device. | | `type` |string | no | | no | Type of Device. Please ensure proper namespacing to prevent naming collisions. |