diff options
Diffstat (limited to 'doc/api/future.md')
-rw-r--r-- | doc/api/future.md | 70 |
1 files changed, 46 insertions, 24 deletions
diff --git a/doc/api/future.md b/doc/api/future.md index ad5e43d..bc870b8 100644 --- a/doc/api/future.md +++ b/doc/api/future.md @@ -22,35 +22,46 @@ accessed directly with its link-local address. # HTTP Server -- `GET /device/type` `text/plain` -- `GET /device/type/uuid` `text/plain` -- `GET /device/hardware/version` `text/plain` -- `GET /device/mac-address/eui-48` `text/plain` -- `POST /device/reboot` +- `GET /` `application/json` (returns device info, see below) - `GET /settings` `application/json` - `PUT /settings` `application/json` -- `GET /firmware/bootloader/version` `text/plain` -- `GET /firmware/bootloader` `application/octet-stream` +# Device Info -- `GET /firmware/application/active/version` `text/plain` -- `GET /firmware/application/active` `application/octet-stream` -- `GET /firmware/application/active/confirmed-flag` `text/plain` -- `PUT /firmware/application/active/confirmed-flag` `text/plain` - -- `GET /firmware/application/inactive/version` `text/plain` -- `GET /firmware/application/inactive` `application/octet-stream` -- `PUT /firmware/application/inactive` `application/octet-stream` -- `DELETE /firmware/application/inactive` -- `GET /firmware/application/inactive/test-boot-flag` `text/plain` -- `PUT /firmware/application/inactive/test-boot-flag` `text/plain` +``` +{ + "hostname": "mydevice", + "type": { + "text": "iot-contact", + "uuid": "eeb58c52-8e25-489c-9a1a-c4662fc9318a" + }, + "version": { + "hardware": "v1.2.3", + "firmware": "v4.5.6" + }, + "address": { + "mac": { + "eui-48": "00:00:5e:00:53:01" + } + } +} +``` # Settings ``` { "hostname": "mydevice", + "update": { + "url": "https://deploy.xengineering.eu/git/iot-contact/latest/", + "automation": { + "enable": false, + "hour": null, + "minute": null, + "second": null + } + }, "mqtt": { "broker": "mqtt://...", "prefix": "com/example/" @@ -88,9 +99,20 @@ receiving entity. The `<api-path>` is fixed by the firmware implementation. This is the only part noted down explicitly in the following MQTT API documentation. -- read-only `heartbeat` (period in milliseconds, "on-time" in milliseconds) -- read-only `contact/state` (`open`, `closed`) -- read-only `blind/closure` (`0`, `1`, ... `100`) -- write-only `request/blind/closure` (`0`, `1`, ... `100`) -- read-only `blind/motion` (`up`, `down`, `stopped`) -- write-only `request/blind/motion` (`up`, `down`, `stopped`) +These are the topics to which the device publishes. Users should not publish to +these and only subscribe. + +- `heartbeat` QoS 0 not retained (period in milliseconds, "on-time" in milliseconds) +- `update/required` QoS 2 not retained (`true`, `false`) +- `contact/state` QoS 1 retained (`open`, `closed`) +- `blind/closure` QoS 1 retained (`0`, `1`, ... `100`) +- `blind/motion` QoS 1 retained (`up`, `down`, `stopped`) + +These are the topics the device subscribes to. Users can publish there and +optionally subscribe to them to see messages from other users if required. The +annotations according Quality of Service (QoS) and the retained flag should be +followed. + +- `update/trigger` QoS 2 not retained +- `request/blind/motion` QoS 2 not retained (`up`, `down`, `stopped`) +- `request/blind/closure` QoS 2 not retained (`0`, `1`, ... `100`) |