mirror of
https://github.com/nostr-protocol/nips.git
synced 2025-01-08 15:22:08 -05:00
Update 107.md
This commit is contained in:
parent
0b2bc68313
commit
c629819c72
12
107.md
12
107.md
|
@ -79,8 +79,14 @@ This message is sent by an admin `user` to a `device`. The `device` saves the co
|
|||
|
||||
### Intent Events (`kind: 8000`)
|
||||
Intent Events represent different actions that can be performed on a device. These actions can be triggered by a `user` or by another `device`.
|
||||
The content of the event is a `JSON` array
|
||||
The content of the event is a `JSON` array representing the data type and the data value as specified in [NIP-91 Event Kinds](https://github.com/nostr-protocol/nips/blob/iot/91.md#event-kinds)
|
||||
|
||||
**Event Content**:
|
||||
```json
|
||||
[[<Integer, Iot kind>, <Any, value> ]]
|
||||
```
|
||||
|
||||
Example that turns on a device and sets the temperature to `20.9` degrees Celsius:
|
||||
```json
|
||||
[[8001, true], [8003, 20.9]]
|
||||
```
|
||||
|
@ -88,8 +94,8 @@ The content of the event is a `JSON` array
|
|||
|
||||
**Event Tags**:
|
||||
```json
|
||||
"tags": [["d", <String, pubkey of the configured device]]
|
||||
"tags": [["p", <String, pubkey of the targeted device]]
|
||||
```
|
||||
- the `d` tag is required, its value MUST be the same as the pubkey of the `device`.
|
||||
- the `p` tag is required, its value MUST be the same as the pubkey of the `device`.
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user