mirror of
https://github.com/nostr-protocol/nips.git
synced 2024-12-23 00:45:53 -05:00
Update 107.md
This commit is contained in:
parent
c8de5d7847
commit
15fc9f1ebe
14
107.md
14
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": <String, UUID generated by the user.Sequential IDs (`0`, `1`, `2`...) are discouraged>,
|
||||
"device_id": <String, UUID of the device>,
|
||||
"name": <String, device name>,
|
||||
"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'>],
|
||||
"users":[ [<String (optional), user public-key>]],
|
||||
"send_to_pubkeys":[ [<String (optional), user public-key>]],
|
||||
"commands_from_pubkeys":[ [<String (optional), user public-key>]],
|
||||
}
|
||||
```
|
||||
|
||||
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`
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user