Update 107.md

This commit is contained in:
Vlad Stan 2023-10-24 15:43:50 +03:00 committed by GitHub
parent 0deb1db0ca
commit d38cfbd615
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

9
107.md
View File

@ -4,7 +4,7 @@ NIP-107
Nostr Internet of Things
-----------------------------------
`draft` `optional` `author:benarc` `author:blackcoffeebtc`
`draft` `optional` `author:benarc` `author:blackcoffeebtc` `author:motorina0`
## 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) |
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
JSON messages that represent different actions or states can be exchanged between two or more `devices` or between `users` and `devices`.
### Intent Events
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:
| Message Type | Sent By | Description |
|--------------|----------------|------------------|
| 0 | User | Configure Device |
| 1 | User \| Device | Command |
| 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.