diff options
-rw-r--r-- | doc/api/future.md | 49 | ||||
-rwxr-xr-x | fw/simulate-network.sh | 5 |
2 files changed, 36 insertions, 18 deletions
diff --git a/doc/api/future.md b/doc/api/future.md index ad5e43d..7530704 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/" @@ -94,3 +105,5 @@ noted down explicitly in the following MQTT API documentation. - write-only `request/blind/closure` (`0`, `1`, ... `100`) - read-only `blind/motion` (`up`, `down`, `stopped`) - write-only `request/blind/motion` (`up`, `down`, `stopped`) +- write-only `update/trigger` +- read-only `update/required` (`true`, `false`) diff --git a/fw/simulate-network.sh b/fw/simulate-network.sh index 1f28a03..880a5f9 100755 --- a/fw/simulate-network.sh +++ b/fw/simulate-network.sh @@ -17,6 +17,11 @@ # escalation program to call this script like this: # # sudo ./simulate-network.sh +# +# The creation of a TAP interface can be done persistently with NetworkManager +# too: +# +# nmcli connection add type tun con-name zeth ifname zeth mode tap set -euf |