Update 107.md

This commit is contained in:
Vlad Stan 2023-10-24 16:28:19 +03:00 committed by GitHub
parent 0984355d91
commit 80b56485a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

8
107.md
View File

@ -53,19 +53,21 @@ This message is sent by a `user` to a `device`. The `device` saves the config lo
```json
{
"type": 0,
"admin_pubkeys": [ [<String (optional), admin user public-key>]],
"name": <String (optional), set a name for the device>,
"description": <String (optional), device description>,
"categories":[ <String (optional), device category, such as 'boiler'>],
"send_to_pubkeys":[ [<String (optional), user public-key>]],
"admin_pubkeys": [ [<String (optional), admin user public-key>]],
"publish_to_pubkeys":[ [<String (optional), user public-key>]],
"intents_from_pubkeys":[ [<String (optional), user public-key>]],
"publish_on_change": <Boolean (optional, default `true`), publish event each time a sensor value changes>,
"publish_interval": <Integer (optional), publish the sensor value at regular intervals (regardless the value changes or not). The value is in `millisecods`.>
}
```
| Field | Description |
|---|---|
| `admin_pubkeys` | List of public keys that are allowed to configure this device.<br>A fresh/blank device will not have this value, so the first received `"type: 0"` should set it.<br/> The `admin_pubkeys` implicitly have the `actions_from_pubkeys` permissions. |
| `send_to_pubkeys` | List of public keys to which events are published. |
| `publish_to_pubkeys` | List of public keys to which events are published. |
| `actions_from_pubkeys` | List of public keys that are allowed to trigger an action on this device.<br/> The `admin_pubkeys` implicitly have the `actions_from_pubkeys` permissions. |
### Event: Update a `device`