diff --git a/107.md b/107.md index 0abac80..02a6572 100644 --- a/107.md +++ b/107.md @@ -82,15 +82,15 @@ This message is sent by an admin `user` to a `device`. The `device` saves the co --- 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` object where for each field: - - the key must correspond to the `name` value of an entry from the [Data Types](https://github.com/arcbtc/nips/blob/107/107.md#data-events-kind-8001) table - - the value represents the actual + - the key must correspond to the `name` of an entry from the [Data Types](https://github.com/arcbtc/nips/blob/107/107.md#data-events-kind-8001) table + - the value represents the value to be set on the device **Event Content**: ```json { "on": , "temperature": , - "watts": + ... } ``` @@ -112,10 +112,22 @@ Example that turns on a device and sets the temperature to `20.9` degrees Celsiu ### Data Events (`kind: 8001`) --- -Data Events represent data published by `device`(s). The `kind` of the event and the `content` must follow ths specification from [NIP-91 Event Kinds](https://github.com/nostr-protocol/nips/blob/iot/91.md#event-kinds). +Data Events represent data published by `device`(s). +The content of the event is a `JSON` object where for each field: + - the key must correspond to the `name` of an entry from the [Data Types](https://github.com/arcbtc/nips/blob/107/107.md#data-events-kind-8001) table + - the value represents the data read from a sensor or other type of input > [!NOTE] -> If a device has more sensors attached (eg: temperature and humidity) then it will publish separate events for each measured value. +> If a device has more sensors attached (eg: temperature and humidity) then it cam publish one unified event for all measured values. + +**Event Content**: +```json +{ + "temperature": , + "humidity": , + ... +} +``` **Event Tags**: ```json