diff --git a/shell-interface.md b/shell-interface.md new file mode 100644 index 0000000..9908bc6 --- /dev/null +++ b/shell-interface.md @@ -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 +``` \ No newline at end of file