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.

    Google Assistant Recipe to turn on the lights

    Scheduled Pinned Locked Moved Development
    5 Posts 3 Posters 1.5k Views 3 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.
    • A Offline
      Alexjons
      last edited by sdetweil

      I have this recipe that is executed once I say, I’m back home, Its already working,

      recently I add it the model TuyaSL, SmartLife app, and Also It worked perfectly with GA,

      I wanted to edit this recipe to turn on the light alongside the video playing, Can you please help me

      var recipe = {
          transcriptionHooks: {
              "imBackHome": {
                  pattern: "I am back home",
                  command: "playVideoAndTurnOnLights"
              }
          },
      
          commands: {
              "playVideoAndTurnOnLights": {
                  shellExec: {
                      exec: [
                          // Command to play the video using VLC
                          "vlc --play-and-exit --volume 512 -f /home/---recipe/home.mp4",
                     
      **(( What Can I add here to excuste the command to turn on the lights simultaneously.))**
                  }
              }
          }
      };
      
      exports.recipe = recipe;
      
      

      Thank you

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

        @Alexjons said in Recipe to turn on the lights:

        recently I add it the model TuyaSL, SmartLife app, and Also It worked perfectly with GA,

        what does that mean?

        ‘app’ sounds like on phone, and maybe GA on phone?

        what do you say to GA on phone?

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        A 1 Reply Last reply Reply Quote 0
        • A Offline
          Alexjons @sdetweil
          last edited by

          @sdetweil The SmartLife app is like Tuya App to control a bunch of smart home devices, I installed the model, “MMM-TuyaSL” and now I say, Jarvis, turn off the bed-room and voila.

          I wish to add a command to this recipe ( that plays nice music once I’m back home, ) also to turn on the light simultaneously, but no luck so far,

          I hope I was able to explain better

          thank you so much

          S M 2 Replies Last reply Reply Quote 0
          • S Offline
            sdetweil @Alexjons
            last edited by

            @Alexjons yes I understand quite well. i have a similar automation in my home assistant.
            but it knows the light entities and an HA integration provides access to the device.

            when I enter my home zone, it unlocks the front door, turns on the lights(if it’s after sunset) and can play music if I want.

            using the new HA voice support I can ask it to turn on any lights

            I am sure that the tuya app provides the device identities to Google home, so they are accessible thru Google assistant (non MagicMirror)

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            1 Reply Last reply Reply Quote 0
            • M Offline
              MMRIZE @Alexjons
              last edited by MMRIZE

              @Alexjons
              I’m not experienced with MMM-TuyaSL, but that module looks like READ-AND-SHOW-ONLY type. I couldn’t find any code for sending some commands or instructions outside. It means you cannot control your home devices with that module.
              If you get some success with GA, it might not be related to MMM-TuyaSL, but the reason would be your HA devices are connected to GA.

              1 Reply Last reply Reply Quote 0
              • 1 / 1
              • 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