• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login
TRIGGERcmd
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login

Open/Close .exe +Lights on Google Home routines

General Discussion
2
4
356
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.
  • J
    john lagos ramirez
    last edited by john lagos ramirez Aug 21, 2024, 9:55 PM Aug 21, 2024, 9:53 PM

    Hello!
    I have a routine integrated with TriggerCMD but it only works from my phone (google home) and not from my pc.
    What i made successfully is create a Routine on the Google Script editor that whenever i start my command/trigger, it opens steam.exe, this triggers my led strip on or off, depending on the parameter sent (both starters on the same code)

    # Visit g.co/home/script-editor-docs for full documentation.
    # ------------------------------------------------------------------------------------------ #
    
    metadata:
      name: test steam + light rgb escritorio
      description: Scripted automation
    
    automations:
      - starters:
          - type: device.state.OnOff
            state: on
            is: true
            device: Iniciar Steam - Oficina
    
        condition:
          type: device.state.OnOff
          state: on
          is: false
          device: Led escritorio - Oficina
    
        actions:
          - type: device.command.OnOff
            on: true
            devices: Led escritorio - Oficina
    
        # SECOND STARTER #
    
      - starters:
          - type: device.state.OnOff
            state: on
            is: false
            device: Iniciar Steam - Oficina
    
        actions:
          - type: device.command.OnOff
            on: false
            devices: Led escritorio - Oficina
    
    

    19fbe5b8-1b72-4200-b246-7aeab3426a64-image.png

    this is on the .bat file:

    taskkill /F /IM Steam.exe
    

    I added on the triggercmd Command and off command on and off text to the end, i dont know if that sends the parameter but at least is working (maybe if i delete that it works anyway)

    But what is not working is the automation triggering when i open the shortcut from my pc or the .exe, is it possible to make it work like my phone? i want to open Steam from my desktop and this triggers my routine, therefore turning on my strip lights and also when i stop/kill/close the .exe it turns off my light, i cant make it work like that

    thanks!

    R 1 Reply Last reply Aug 22, 2024, 10:32 PM Reply Quote 0
    • R
      Russ @john lagos ramirez
      last edited by Russ Aug 22, 2024, 10:33 PM Aug 22, 2024, 10:32 PM

      @john-lagos-ramirez, if you open and close steam from your PC via TRIGGERcmd it should trigger your Google Home routines that turn your lights on/off.

      Please try this:

      1. Download the tcmd tool

      2. Rename it to tcmd.exe

      3. Move it in your c:\windows folder so it's in your PATH.

      4. Right-click your desktop and create 2 shortcuts that run these two commands:

        tcmd -t "Open/close steam"-c "PC John"-p on

        tcmd -t "Open/close steam"-c "PC John"-p off

      For example:
      050769c0-ed6b-47f6-b65c-8afc6b7e2277-image.png

      I created similar shortcuts to open/close calculator via TRIGGERcmd:
      ac377a6f-a0cf-4c26-b8b4-630e33c30fdd-image.png

      You can customize the shortcut icon if you want.

      Russell VanderMey

      J 1 Reply Last reply Aug 22, 2024, 11:58 PM Reply Quote 1
      • J
        john lagos ramirez @Russ
        last edited by Aug 22, 2024, 11:58 PM

        Hi @Russ
        I followed your instructions and it is working excellent now 👌
        Thank you so much!

        R 1 Reply Last reply Aug 23, 2024, 12:54 AM Reply Quote 1
        • R
          Russ @john lagos ramirez
          last edited by Aug 23, 2024, 12:54 AM

          @john-lagos-ramirez, awesome.

          Russell VanderMey

          1 Reply Last reply Reply Quote 0
          1 out of 4
          • First post
            1/4
            Last post