Bugsounet Coding

    • Register
    • Login
    • Search
    This Forum is now reserved to registred users!

    Solved Hook not activating GAv4

    Recipes
    1
    3
    42
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • A
      Aaaxel last edited by

      Hey!

      Could somebody quickly revise this recipe I wrote for testing on my installation of GA? It is based on the Reboot-Restart-Shutdown recipe. I wanted to create my own recipe for music so I started off with this one with the goal to modify it step by step until it can control music.
      The strange thing is, when both Reboot-Restart-Shutdown.js and recipe-deezer.js (my recipe) are activated in config.js, google reacts correctly to Reboot-Restart-Shutdown and completely ignore my recipe (No arrow icon/ tries to search my sentence on the internet).
      So I think it’s probably just a syntax problem, though I can’t find what exactly…
      Could you check it please??

      Here it is

      var recipe = {
        transcriptionHooks: {
          "PLAY": {
            pattern: "mets de la musique",
            command: "PLAY"
          },
          "PAUSE": {
            pattern: "test test test",
            command: "PAUSE"
          }
        },
        
        commands: {
          "PLAY": {
            soundExec: {
              chime: "close",
            },
            shellExec: {
              exec: "sudo reboot now"
            }
          },
          "PAUSE": {
            soundExec: {
              chime: "close",
            },
            shellExec: {
              exec: "pm2 restart 0"
            }
          }
        }
      }
      
      
      exports.recipe = recipe // Don't remove this line.
      
      
      

      Thanks a lot!

      1 Reply Last reply Reply Quote 0
      • A
        Aaaxel last edited by

        for now the recipe is just supposed to reboot/restart, but with different hooks

        1 Reply Last reply Reply Quote 0
        • A
          Aaaxel last edited by

          right so I just retried the program today and now it works! (even though I didn’t change anything)
          I’ll just consider yesterday was a bad day, problem solved 😉

          1 Reply Last reply Reply Quote 0
          • Topic has been marked as solved  A Aaaxel 
          • Moved from Issues by  bugsounet bugsounet 
          • First post
            Last post
          Powered by NodeBB | @bugsounet ©2022