From 59901f66cb7baf206da2f725b08db6ba4d5111b1 Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Wed, 3 Jan 2018 15:14:16 +0100 Subject: [PATCH] Created shell interface (markdown) --- shell-interface.md | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 shell-interface.md 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