Created shell interface (markdown)

Fabio Manganiello 2018-01-03 15:14:16 +01:00
parent c4ee2eecf3
commit 59901f66cb
1 changed files with 44 additions and 0 deletions

44
shell-interface.md Normal file

@ -0,0 +1,44 @@
# Shell interface
`platypush` installs `pusher`, a command-line tool to send PushBullet messages to the connected devices in the format used by platypush.
Some examples:
```shell
pusher --target laptop --action shell.exec --cmd "scp /home/user/photos/*.jpg backup_host:/mnt/hd/photos"
pusher --target raspberrypi --action music.mpd.play
```
The logic to execute is specified by the `--action` option, whose format is `package_name.method_name` (with method_name part of the package main class).
# Sample requests through Pusher
* `platypush.plugins.shell`:
```shell
pusher --target laptop --action shell.exec --cmd "scp /home/user/photos/*.jpg backup_host:/mnt/hd/photos"
```
* `platypush.plugins.music.mpd`:
```shell
pusher --target raspberry --action music.mpd.play
```
* `platypush.plugins.switch.wemo`:
```shell
pusher --target raspberry --action switch.wemo.on
```
* `platypush.plugins.light.hue`:
```shell
pusher --target raspberry --action light.hue.scene --name "Sunset" --group "Living Room"
```
* `procedure`:
```shell
pusher --target raspberry --action procedure.at_home
```