Skip to content

Commit 4952755

Browse files
committed
Update README.md
Signed-off-by: Eddy Babetto <eddy.babetto@secomind.com>
1 parent 020439c commit 4952755

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,3 +55,29 @@ key and all necessary information are provided.
5555
## Usage
5656

5757
Run `astartectl` to see available commands.
58+
59+
### Send or set data to devices
60+
61+
For server-owned interfaces, it is possible to send or set data via astartectl.
62+
To do so, you can use:
63+
- astartectl appengine devices send-data (deprecated)
64+
- astartectl appengine devices publish-datastream
65+
- astartectl appengine devices set-property
66+
- astartectl appengine devices unset-property
67+
68+
Run the appropriate command to see a short description, command suggestions and flags.
69+
Generally speaking, one of those could be written like
70+
```
71+
astartectl appengine devices publish-datastream 2TBn-jNESuuHamE2Zo1anA com.my.interface /my/path "value"
72+
```
73+
or, for aggregated interfaces, like a json object:
74+
```
75+
astartectl appengine devices publish-datastream 2TBn-jNESuuHamE2Zo1anA com.my.interface.aggregated /my/path '{"path1": "value2","path2":"value2"}'
76+
```
77+
78+
Please note, "value" is whatever your raw value is, no encapsulation whatsoever is required by astarte or astartectl (but you can provide your own, if you need it).
79+
Exceptions follow:
80+
- arrays are written like ["value", "anothervalue"] (depending on your shell, this can also be "['value', 'anothervalue']", please check before using in a production env)
81+
- aggregates values could be anything accepted by astarte, in case of arrays they follow the above rule
82+
- binaryblobs must be base64 encoded
83+
- datetime is based on an external library that is flexible enough to translate a fairly high number of different formats, further documentation and supported formats can be found [here](https://github.com/araddon/dateparse)

0 commit comments

Comments
 (0)