From 15fc9f1ebe797bdf0cb5f1290e99fc778ea99054 Mon Sep 17 00:00:00 2001 From: Vlad Stan Date: Tue, 24 Oct 2023 09:29:59 +0300 Subject: [PATCH] Update 107.md --- 107.md | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/107.md b/107.md index 030d56d4..3c814b6c 100644 --- a/107.md +++ b/107.md @@ -47,22 +47,26 @@ Each `JSON` message `MUST` have a `type` field indicating the what the JSON repr | 2 | Device | State Data | ### Event: Configure `device` +This message is sent by a `user` to a `device`. The `device` saves the config locally and uses it. **Event Content**: ```json { - "type": , - "device_id": , - "name": , + "type": 0, + "admin_pubkeys": [ []], + "name": , "description": , "categories":[ ], - "users":[ []], + "send_to_pubkeys":[ []], + "commands_from_pubkeys":[ []], } ``` Note: + - `admin_pubkeys`: + - list of public keys that are allowed to configure this device. A fresh/blank device will not have this value, so the first received `"type: 0"` should set it. - `users`: - - A list that can restrict access to public-keys, `device`(s) also has keys and can be a `user`. + - a list that can restrict access to public-keys, `device`(s) also has keys and can be a `user`. ### Event: Update a `device`