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
0deb1db0ca
commit
d38cfbd615
9
107.md
9
107.md
|
@ -4,7 +4,7 @@ NIP-107
|
||||||
Nostr Internet of Things
|
Nostr Internet of Things
|
||||||
-----------------------------------
|
-----------------------------------
|
||||||
|
|
||||||
`draft` `optional` `author:benarc` `author:blackcoffeebtc`
|
`draft` `optional` `author:benarc` `author:blackcoffeebtc` `author:motorina0`
|
||||||
|
|
||||||
## Rationale
|
## Rationale
|
||||||
|
|
||||||
|
@ -37,16 +37,15 @@ A `user` can publish these event kinds:
|
||||||
|--------|----------|-------------------------------|-----------------------------------------------------------------------------------------|
|
|--------|----------|-------------------------------|-----------------------------------------------------------------------------------------|
|
||||||
| `8000` | `intent` | Trigger an action on a device | [NIP-91 Event Kinds](https://github.com/nostr-protocol/nips/blob/iot/91.md#event-kinds) |
|
| `8000` | `intent` | Trigger an action on a device | [NIP-91 Event Kinds](https://github.com/nostr-protocol/nips/blob/iot/91.md#event-kinds) |
|
||||||
|
|
||||||
|
The content of events can be transmitted in clear text (for public data) or as [NIP-59 Gift Wrap](https://github.com/staab/nips/blob/NIP-59/59.md).
|
||||||
|
|
||||||
### Messages
|
### Intent Events
|
||||||
JSON messages that represent different actions or states can be exchanged between two or more `devices` or between `users` and `devices`.
|
Intent Events represent different actions that can be performed on a device. The content of the event is a JSON.
|
||||||
Each `JSON` message `MUST` have a `type` field indicating the what the JSON represents. Possible types:
|
Each `JSON` message `MUST` have a `type` field indicating the what the JSON represents. Possible types:
|
||||||
|
|
||||||
| Message Type | Sent By | Description |
|
| Message Type | Sent By | Description |
|
||||||
|--------------|----------------|------------------|
|
|--------------|----------------|------------------|
|
||||||
| 0 | User | Configure Device |
|
| 0 | User | Configure Device |
|
||||||
| 1 | User \| Device | Command |
|
|
||||||
| 2 | Device | State Data |
|
|
||||||
|
|
||||||
### Event: Configure `device`
|
### Event: Configure `device`
|
||||||
This message is sent by a `user` to a `device`. The `device` saves the config locally and uses it.
|
This message is sent by a `user` to a `device`. The `device` saves the config locally and uses it.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user