shell.yml 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. ---
  2. - name: "close-rolling-shutter"
  3. signals:
  4. - order: "ferme les volets"
  5. neurons:
  6. - shell:
  7. cmd: "curl http://192.168.0.22:5000/fermeture -d \"password=monpass\" -X POST"
  8. - say:
  9. message: "Fermeture en cours, monsieur"
  10. - name: "open-rolling-shutter"
  11. signals:
  12. - order: "ouvre les volets"
  13. neurons:
  14. - shell:
  15. cmd: "curl http://192.168.0.22:5000/ouverture -d \"password=monpass\" -X POST"
  16. - say:
  17. message: "Ouverture en cours, monsieur"
  18. - name: "start-steam"
  19. signals:
  20. - order: "lance Steam"
  21. neurons:
  22. - shell:
  23. 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"
  24. - shell:
  25. 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"
  26. - say:
  27. message: "Lancement en cours, monsieur"
  28. - name: "start-Kodi"
  29. signals:
  30. - order: "lance Cody"
  31. neurons:
  32. - shell:
  33. 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"
  34. - shell:
  35. 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"
  36. - say:
  37. message: "Lancement en cours, monsieur"
  38. - name: "start-music"
  39. signals:
  40. - order: "mais nous de la musique"
  41. - order: "musique rock"
  42. neurons:
  43. - shell:
  44. 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"
  45. - say:
  46. message: "Musique lance, monsieur"
  47. - name: "stop-music"
  48. signals:
  49. - order: "arrête la musique"
  50. - order: "stop la musique"
  51. - order: "éteins la musique"
  52. neurons:
  53. - shell:
  54. 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"
  55. - say:
  56. message: "musique stoppé, monsieur"