|
@@ -65,7 +65,8 @@
|
|
|
|
|
|
- name: "Close rolling shutter"
|
|
|
neurons:
|
|
|
- - command: "curl http://192.168.0.22:5000/fermeture -d \"password=monpass\" -X POST"
|
|
|
+ - shell:
|
|
|
+ cmd: "curl http://192.168.0.22:5000/fermeture -d \"password=monpass\" -X POST"
|
|
|
- say:
|
|
|
message: "Fermeture en cours, monsieur"
|
|
|
signals:
|
|
@@ -73,7 +74,8 @@
|
|
|
|
|
|
- name: "Open rolling shutter"
|
|
|
neurons:
|
|
|
- - command: "curl http://192.168.0.22:5000/ouverture -d \"password=monpass\" -X POST"
|
|
|
+ - shell:
|
|
|
+ cmd: "curl http://192.168.0.22:5000/ouverture -d \"password=monpass\" -X POST"
|
|
|
- say:
|
|
|
message: "Ouverture en cours, monsieur"
|
|
|
signals:
|
|
@@ -81,8 +83,10 @@
|
|
|
|
|
|
- name: "Start steam"
|
|
|
neurons:
|
|
|
- - command: "curl -i --user admin:secret -H \"Content-Type: application/json\" -X POST -d '{\"app_name\":\"kodi\",\"state\":\"stop\"}' http://192.168.0.17:8000/app"
|
|
|
- - command: "curl -i --user admin:secret -H \"Content-Type: application/json\" -X POST -d '{\"app_name\":\"steam\",\"state\":\"start\"}' http://192.168.0.17:8000/app"
|
|
|
+ - shell:
|
|
|
+ cmd: "curl -i --user admin:secret -H \"Content-Type: application/json\" -X POST -d '{\"app_name\":\"kodi\",\"state\":\"stop\"}' http://192.168.0.17:8000/app"
|
|
|
+ - shell:
|
|
|
+ cmd: "curl -i --user admin:secret -H \"Content-Type: application/json\" -X POST -d '{\"app_name\":\"steam\",\"state\":\"start\"}' http://192.168.0.17:8000/app"
|
|
|
- say:
|
|
|
message: "Lancement en cours, monsieur"
|
|
|
signals:
|
|
@@ -90,8 +94,10 @@
|
|
|
|
|
|
- name: "Start Kodi"
|
|
|
neurons:
|
|
|
- - command: "curl -i --user admin:secret -H \"Content-Type: application/json\" -X POST -d '{\"app_name\":\"steam\",\"state\":\"stop\"}' http://192.168.0.17:8000/app"
|
|
|
- - command: "curl -i --user admin:secret -H \"Content-Type: application/json\" -X POST -d '{\"app_name\":\"kodi\",\"state\":\"start\"}' http://192.168.0.17:8000/app"
|
|
|
+ - shell:
|
|
|
+ cmd: "curl -i --user admin:secret -H \"Content-Type: application/json\" -X POST -d '{\"app_name\":\"steam\",\"state\":\"stop\"}' http://192.168.0.17:8000/app"
|
|
|
+ - shell:
|
|
|
+ cmd: "curl -i --user admin:secret -H \"Content-Type: application/json\" -X POST -d '{\"app_name\":\"kodi\",\"state\":\"start\"}' http://192.168.0.17:8000/app"
|
|
|
- say:
|
|
|
message: "Lancement en cours, monsieur"
|
|
|
signals:
|
|
@@ -99,16 +105,18 @@
|
|
|
|
|
|
- name: "Start music"
|
|
|
neurons:
|
|
|
- - command: "curl -i --user admin:secret -H \"Content-Type: application/json\" -X POST -d '{\"app_name\":\"music\",\"state\":\"start\"}' http://192.168.0.17:8000/app"
|
|
|
+ - shell:
|
|
|
+ cmd: "curl -i --user admin:secret -H \"Content-Type: application/json\" -X POST -d '{\"app_name\":\"music\",\"state\":\"start\"}' http://192.168.0.17:8000/app"
|
|
|
- say:
|
|
|
- message: "Musique lance, monsieur"
|
|
|
+ message: "Musique lancé, monsieur"
|
|
|
signals:
|
|
|
- order: "mais nous de la musique"
|
|
|
- order: "musique rock"
|
|
|
|
|
|
- name: "Stop music"
|
|
|
neurons:
|
|
|
- - command: "curl -i --user admin:secret -H \"Content-Type: application/json\" -X POST -d '{\"app_name\":\"music\",\"state\":\"stop\"}' http://192.168.0.17:8000/app"
|
|
|
+ - shell:
|
|
|
+ cmd: "curl -i --user admin:secret -H \"Content-Type: application/json\" -X POST -d '{\"app_name\":\"music\",\"state\":\"stop\"}' http://192.168.0.17:8000/app"
|
|
|
- say:
|
|
|
message: "musique stoppé, monsieur"
|
|
|
signals:
|
|
@@ -162,3 +170,30 @@
|
|
|
message: "lost"
|
|
|
signals:
|
|
|
- order: "où est mon téléphone"
|
|
|
+
|
|
|
+ - name: "test command"
|
|
|
+ neurons:
|
|
|
+ - shell:
|
|
|
+ cmd: "mplayer http://192.99.17.12:6410/"
|
|
|
+ async: True
|
|
|
+ - say:
|
|
|
+ message: "lancé"
|
|
|
+ signals:
|
|
|
+ - order: "test commande"
|
|
|
+
|
|
|
+ - name: "test stop"
|
|
|
+ neurons:
|
|
|
+ - shell:
|
|
|
+ cmd: "pkill mplayer"
|
|
|
+ - say:
|
|
|
+ message: "stopé"
|
|
|
+ signals:
|
|
|
+ - order: "test stop"
|
|
|
+
|
|
|
+ - name: "remove a file"
|
|
|
+ neurons:
|
|
|
+ - shell:
|
|
|
+ cmd: "rm ~/test.txt"
|
|
|
+ file_template: remove_file.j2
|
|
|
+ signals:
|
|
|
+ - order: "rm file"
|