Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:

# Load artifacts obtained with the most recent version of Go
- name: Upload build artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: matrix.go == '1.20.x'
with:
path: astartectl*
Expand Down
26 changes: 26 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,29 @@ key and all necessary information are provided.
## Usage

Run `astartectl` to see available commands.

### Send or set data to devices

For server-owned interfaces, it is possible to send or set data via astartectl.
To do so, you can use:
- astartectl appengine devices send-data (deprecated)
- astartectl appengine devices publish-datastream
- astartectl appengine devices set-property
- astartectl appengine devices unset-property

Run the appropriate command to see a short description, command suggestions and flags.
Generally speaking, one of those could be written like
```
astartectl appengine devices publish-datastream 2TBn-jNESuuHamE2Zo1anA com.my.interface /my/path "value"
```
or, for aggregated interfaces, like a json object:
```
astartectl appengine devices publish-datastream 2TBn-jNESuuHamE2Zo1anA com.my.interface.aggregated /my/path '{"path1":"value1","path2":"value2"}'
```

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).
Exceptions follow:
- arrays are written like ["value", "anothervalue"] (depending on your shell, this can also be "['value', 'anothervalue']", please check before using in a production env)
- aggregates values could be anything accepted by astarte, in case of arrays they follow the above rule
- binaryblobs must be base64 encoded
- 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)
Loading