---

  - name: "close-rolling-shutter"
    signals:
      - order: "ferme les volets"
    neurons:
      - shell:
          cmd: "curl http://192.168.0.22:5000/fermeture -d \"password=monpass\" -X POST"
      - say:
          message: "Fermeture en cours, monsieur"

  - name: "open-rolling-shutter"
    signals:
      - order: "ouvre les volets"
    neurons:
      - shell:
          cmd: "curl http://192.168.0.22:5000/ouverture -d \"password=monpass\" -X POST"
      - say:
          message: "Ouverture en cours, monsieur"

  - name: "start-steam"
    signals:
      - order: "lance Steam"
    neurons:
      - 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"


  - name: "start-Kodi"
    signals:
      - order: "lance Cody"
    neurons:
      - 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"


  - name: "start-music"
    signals:
      - order: "mais nous de la musique"
      - order: "musique rock"
    neurons:
      - 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"

  - name: "stop-music"
    signals:
      - order: "arrête la musique"
      - order: "stop la musique"
      - order: "éteins la musique"
    neurons:
      - 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"
