MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.

    MMM-GoogleAssistant and LED Lights

    Scheduled Pinned Locked Moved Troubleshooting
    14 Posts 6 Posters 3.0k Views 6 Watching
    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.
    • B Offline
      banbutcher
      last edited by

      @Bugsounet @sdetweil

      Thanks guys

      1 Reply Last reply Reply Quote 0
      • ? Offline
        A Former User
        last edited by A Former User

        @banbutcher @Pyroson

        I have write a special recipe for you, with the latested version of MMM-GoogleAssistant :)

        the recipe name is with-status.js (locating: with the latest version of GA in recipes directory)

        • How it’s works ?
          GA will send the status (stand-by, listen, …) to your wanted file
        
        /**  with-status.js **/
        /**  send the status of assistant to a python script **/
        /** For LED Strip for example **/
        /**     @bugsounet       **/
        
        var recipe = {
          commands: {
            "Status": {
              shellExec: {
                exec: (param) => {
                    return "python /home/pi/myscript.py " + param.status.actual
                }
              }
            }
          },
          plugins: {
            onStatus: "Status"
          },
        }
        
        exports.recipe = recipe
        

        I have defined in the with-status.js sample
        to run this command : python /home/pi/myscript.py Status_of_GA

        • Status_of_GA can be :
          • listen
          • standby
          • confirmation
          • reply
          • error
          • hook
        • You can change the name and the path of the script (I don’t force it) and can be and bash script or other
        • How load this recipe ?

        in GA configuration, you have an recipe field

        just add it :)

        samples :

        • recipes: [ "with-status.js" ],

        • recipes: [ "with-status.js", "with-MMM-TelegramBot.js" ], for some other recipe needed

        @bugsounet

        C 1 Reply Last reply Reply Quote 0
        • B Offline
          banbutcher
          last edited by

          cool, thanks a lot for this, im looking forward to trying some stuff out! :)

          1 Reply Last reply Reply Quote 0
          • C Offline
            CallanPiper @Guest
            last edited by

            @Bugsounet
            Hi guys, i’m new to python and i’m not sure how I would create a script that would turn on different GPIO pins depending on the GA staus. If someone could point me in the right direction that would be awesome!

            S 1 Reply Last reply Reply Quote 0
            • S Offline
              Sihtodstel @CallanPiper
              last edited by

              @CallanPiper i have the same request.

              1 Reply Last reply Reply Quote 0
              • S Offline
                sdetweil
                last edited by

                see the top of this topic. you will have to construct some of it

                Sam

                How to add modules

                learning how to use browser developers window for css changes

                S 1 Reply Last reply Reply Quote 0
                • S Offline
                  Sihtodstel @sdetweil
                  last edited by

                  @sdetweil yes i am using the recipe “with-status.js” but my question is how to use the status of GA in my python script or use different scripts on different status whichever is possible.

                  S 1 Reply Last reply Reply Quote 0
                  • S Offline
                    sdetweil @Sihtodstel
                    last edited by

                    @Sihtodstel i dont know. as i said u will have to construct some of this.

                    Sam

                    How to add modules

                    learning how to use browser developers window for css changes

                    1 Reply Last reply Reply Quote 0
                    • 1
                    • 2
                    • 2 / 2
                    • First post
                      Last post
                    Enjoying MagicMirror? Please consider a donation!
                    MagicMirror created by Michael Teeuw.
                    Forum managed by Sam, technical setup by Karsten.
                    This forum is using NodeBB as its core | Contributors
                    Contact | Privacy Policy