feat: subscription to properties
This commit is contained in:
parent
e386efc5ae
commit
be4425aff9
1 changed files with 19 additions and 6 deletions
23
doc/proto.md
23
doc/proto.md
|
@ -170,11 +170,10 @@ Get a properties value
|
|||
|
||||
#### Command data
|
||||
|
||||
| offset | size | name | description | reserved | example |
|
||||
|--------|-------------------------|-----------------|---------------------------------------------|----------|---------|
|
||||
| `0x14` | 32 bytes | `property_name` | The name of the property as a UTF-8 string. | no | "Power" |
|
||||
| `0x34` | 1 byte | `data_type` | The type of the data. | response | `0x01` |
|
||||
| `0x35` | determined by data type | `data` | The actual data. | response | |
|
||||
| offset | size | name | description | reserved | example |
|
||||
|--------|----------|-----------------|---------------------------------------------|----------|----------|
|
||||
| `0x14` | 32 bytes | `property_name` | The name of the property as a UTF-8 string. | no | "Power" |
|
||||
| `0x34` | 1 byte | `dynamic_data` | Dynamic data snippet | response | `0x0100` |
|
||||
|
||||
### `0x11` - Set property
|
||||
|
||||
|
@ -192,3 +191,17 @@ Get a properties value
|
|||
| offset | size | name | description | reserved | example |
|
||||
|--------|----------|-----------------|---------------------------------------------|----------|---------|
|
||||
| `0x14` | 32 bytes | `property_name` | The name of the property as a UTF-8 string. | no | "Power" |
|
||||
|
||||
### `0x1A` - Subscribe to property
|
||||
|
||||
| offset | size | name | description | reserved | example |
|
||||
|--------|----------|-----------------|---------------------------------------------|----------|--------------|
|
||||
| `0x14` | 4 bytes | `device_id` | Who's property? | no | `0x00000000` |
|
||||
| `0x18` | 32 bytes | `property_name` | The name of the property as a UTF-8 string. | no | "Power" |
|
||||
|
||||
### `0x1A` - Unsubscribe to property
|
||||
|
||||
| offset | size | name | description | reserved | example |
|
||||
|--------|----------|-----------------|---------------------------------------------|----------|--------------|
|
||||
| `0x14` | 4 bytes | `device_id` | Who's property? | no | `0x00000000` |
|
||||
| `0x18` | 32 bytes | `property_name` | The name of the property as a UTF-8 string. | no | "Power" |
|
||||
|
|
Loading…
Reference in a new issue