TRIGGERcmd
    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    1. Home
    2. Popular
    Log in to post
    • All categories
    • All Topics
    • New Topics
    • Watched Topics
    • Unreplied Topics
    • All Time
    • Day
    • Week
    • Month
    • Antonio Francisco S.Santos

      Tentando Executar um Script python no terminal LX com o TriggerCMD mas não estou conseguindo
      Raspberry Pi • • Antonio Francisco S.Santos

      80
      0
      Votes
      80
      Posts
      266
      Views

      Antonio Francisco S.Santos

      @Antonio-Francisco-S-Santos Desculpe, O Código que me refiro é esse aqui:

      #!/usr/bin/python3

      coding=utf8

      import sys
      import time
      import math
      import hiwonder.Mpu6050 as Mpu6050
      import hiwonder.ActionGroupControl as AGC
      import hiwonder.Board as Board

      mpu = Mpu6050.mpu6050(0x68)#启动Mpu6050
      mpu.set_gyro_range(mpu.GYRO_RANGE_2000DEG)#设置Mpu6050的陀螺仪的工作范围
      mpu.set_accel_range(mpu.ACCEL_RANGE_2G)#设置Mpu6050的加速度计的工作范围

      count1 = 0
      count2 = 0

      def standup():
      global count1, count2

      try: accel_date = mpu.get_accel_data(g=True) #获取传感器值 angle_y = int(math.degrees(math.atan2(accel_date['y'], accel_date['z']))) #将获得的数据转化为角度值 if abs(angle_y) > 105: #y轴角度大于160,count1加1,否则清零 count1 += 1 else: count1 = 0 if abs(angle_y) < 85: #y轴角度小于10,count2加1,否则清零 count2 += 1 else: count2 = 0 time.sleep(0.1) if count1 >= 1: #往前倒了一定时间后起来 count1 = 0 print("equilibrio_1!")#打印执行的动作名 AGC.runActionGroup('equilibrio_1')#执行动作 Board.setPWMServoPulse(1, 1300, 700) Board.setPWMServoPulse(2, 1500, 700) time.sleep(0.8) AGC.runActionGroup('stand') elif count2 >= 1: #往后倒了一定时间后起来 count2 = 0 print("equilibrio_2!")#打印执行的动作名 AGC.runActionGroup('equilibrio_2')#执行动作 Board.setPWMServoPulse(1, 1500, 700) Board.setPWMServoPulse(2, 1500, 700) time.sleep(0.8) AGC.runActionGroup('stand') except BaseException as e: print(e)

      if name == 'main':
      print("Fall_and_Stand Init")
      print("Fall_and_Stand Start")
      while True : #循环检测机器人的状态
      standup()
      key = time.sleep(0.1)
      if key == 27:
      break

    • Russ

      Raspberry Pi setup
      Raspberry Pi • raspberry pi • • Russ

      40
      0
      Votes
      40
      Posts
      12913
      Views

      Jorge Fuentes

      That's brilliant, thank you for the information.

    • Russ

      Press the Down Arrow key (or any other key)
      Windows • • Russ

      40
      1
      Votes
      40
      Posts
      7288
      Views

      A

      @marcos-ibarra
      I'm not into AU3 that much (while knowing AHK better), what about triggering OBS's Control(s) directly, instead of Send(ing) a key in a less reliable way?

      https://www.autoitscript.com/autoit3/docs/functions/ControlCommand.htm

      That way the window wouldn't even have to be active, only existing!

    • D

      Open Specific Netflix Movie with Alexa
      Windows • • dlaugh14

      40
      0
      Votes
      40
      Posts
      6051
      Views

      Russ

      @Nico-Ramirez, Google Translate translated what you said to this:
      Question, I use python, when I make sure that the argument is empty, could you help me with what serious or problem, please

      I'm not sure what the problem is. Please clarify.

    • ?

      Google home and TriggerCMD stop working when Google home is set to French
      General Discussion • • A Former User

      39
      0
      Votes
      39
      Posts
      8970
      Views

      Russ

      @buaamm, so far I've added Japanese support for TRIGGERcmd Smart Home - both Alexa and Google Assistant.

      Would you mind testing? Please tell me if I got anything wrong.

    • Russ

      SmartThings integration - flip a virtual switch to run a command
      Instructions • • Russ

      38
      0
      Votes
      38
      Posts
      14432
      Views

      JT

      @Russ thanks for coming up with a solution so quickly. I followed your instructions and I am up and running again! 👍

    • ?

      TRIGGERcmd not starting at boot
      General Discussion • • A Former User

      38
      1
      Votes
      38
      Posts
      873
      Views

      Mark Hollis

      @Russ i already have uac disable, and ticked administrator to that shortcut in that folder, but this way don't start when windows 10 start

    • B

      Alexa doesn't find the commands
      General Discussion • • buzz

      36
      0
      Votes
      36
      Posts
      3373
      Views

      Russ

      @Eduardo-Henrique, I tried all of those characters and I could not get it to break.

      So maybe that was not the problem. Can you send me the computer name you were using when it wasn't working?

    • Matt Packwood

      Freezing in Monterey
      Mac • • Matt Packwood

      35
      0
      Votes
      35
      Posts
      680
      Views

      Matt Packwood

      @russ I saw that, many thanks!

    • Russ

      Autohotkey script for Play, Pause, Volume Up/Down, Next/Previous
      Windows • • Russ

      34
      2
      Votes
      34
      Posts
      17372
      Views

      Russ

      @William-Santiago-Ortiz-Trejos, for some reason your files with a .ahk extension aren't associated with AutoHotkey. That's supposed to happen when you install it, but maybe an antivirus program blocked it?

      To fix it you could try running the batch file in this article from your C:\Program Files\AutoHotkey folder:
      https://www.autohotkey.com/board/topic/13627-no-ahk-file-association/

    • J

      Linux VM - TriggerCMD shows messages like it's working, but commands don't actually execute
      General Discussion • • Joe

      33
      0
      Votes
      33
      Posts
      1231
      Views

      Russ

      @Joe,

      1 - Only Foreground Triggers work in a user's regular account - because the background service only runs as root and uses /root/.TRIGGERcmdData.

      2 - Root can support both Foreground and Background Triggers - because you can install the background service (see #1), and because you can login as root and run the agent in foreground mode.

      3 - But running Triggers as Root will mask/override all the Triggers in your regular account - I wouldn't say mask/override, it's just separate as you covered in #4. Running the agent as root will create another separate computer entry in your account associated with /root/.TRIGGERcmdData. That computer will be named the same initially, but you could rename it.

      4 - The exception to (3) is if you can instantiate two "Computers" -- one pointing to Root for the "Background", and a separate "Computer" pointing to your normal Linux account to support the "Foreground" - correct, although as you pointed out in #2, you could also run the foreground agent as root.

      You create a separate computer just by running the agent as the other user. If the ~/.TRIGGERcmdData directory doesn't exist, the agent will prompt you for a token, create a computer record in your account, and store the ID for that computer in the computerid.cfg file.

      Different Linux accounts could setup different computer records, or you could give everyone sudo access to be able to edit /root/.TRIGGERcmdData/commands.json to run background command via the background agent.

      The agent stores the .TRIGGERcmdData directory in the home folder of the user running the agent. The files in that directory are the key point of connection to the mother ship.

      Good questions @Joe.

    • Steve Porter

      Command format on Raspi
      Raspberry Pi • • Steve Porter

      32
      0
      Votes
      32
      Posts
      432
      Views

      tuicemen

      @steve-porter yep that will mess things up. I remember reading another post about that so that isn't something that you alone have experienced. I found a couple times the file didn't update for me for different errors in command lines.
      I've gotten into the habit of double checking if it saves.

    • F

      No puedo conectar a triggercmd desde google homa
      General Discussion • • Fernando Mateos

      29
      0
      Votes
      29
      Posts
      5056
      Views

      Roberto Otero

      @Russ Thank u Ross.

    • N

      ahcmd.exe problem
      General Discussion • • newstuffoldstuff

      28
      0
      Votes
      28
      Posts
      328
      Views

      Russ

      @newstuffoldstuff, I see. If you want to avoid reducing your User Access Control setting, you could try installing the background service and running it as a background command. It will run as Local System.

    • Tiago Mártires

      Boot on Arch
      General Discussion • • Tiago Mártires

      27
      0
      Votes
      27
      Posts
      874
      Views

      Gustavo Soares

      @Russ, very good. I think applying a decode('utf-8') should solve this problem. I really hadn't tried using special characters yet.

    • Luiz Henrique Dela Giustina

      Problem: Run Call Of Duty Warzone
      Windows • • Luiz Henrique Dela Giustina

      27
      0
      Votes
      27
      Posts
      235
      Views

      Russ

      @Arthur-Oscar, awesome. I'm glad you got it working! Thanks for sharing your method and your files too.

    • Russ

      How to use IFTTT with TRIGGERcmd
      Instructions • • Russ

      25
      0
      Votes
      25
      Posts
      20850
      Views

      Russ

      @Mittal-Makwana, nice, what command does that?

    • Russ

      No-GUI TRIGGERcmd agent that works on 32bit Windows
      Announcements • • Russ

      25
      0
      Votes
      25
      Posts
      6389
      Views

      Russ

      @prik-m said in No-GUI TRIGGERcmd agent that works on 32bit Windows:

      @prik-m
      I tried log out of the site to login with a diffrent google user but it automatically login with the previous one without giving me the possibility to change: can I do something about it?

      Thx.

      If you use Chrome, you could use a different profile logged in as the other user.

      https://support.google.com/chrome/answer/2364824?hl=en&co=GENIE.Platform%3DDesktop

    • N

      Google Home
      General Discussion • feature request • • nathan7

      25
      0
      Votes
      25
      Posts
      4836
      Views

      P

      @Russ Thanks for the clarification. That was my understanding as well - to share TRIGGERcmd for all, either everybody has to use Voice Match or nobody can use it. Unfortunately, the children really want to use the Voice Match (required to teach Google Home important things such as names of our cats etc) while both me and my wife are strictly against Voice Match for us. That means that the children could share TriggerCMD but no solution for the adults. And we'd need TriggerCNS exactly mainly for the adults...

      I understand it's a relatively specific situation though, so probably no solution will be available. I was hoping for something similar to Spotify (that works also for non-VoiceMatch members of the household) but I understand it may be difficult to achieve. Thanks for your efforts anyway!

    • Xander

      Never used parameters before...
      Windows • • Xander

      25
      0
      Votes
      25
      Posts
      1121
      Views

      Royher Figuera

      @Russ said in Never used parameters before...:

      @Royher-Figuera, in a .bat file, the syntax for a parameter is %1 for the first parameter, and %2 for the second parameter, etc.

      So you could make a simple batch file that google's something like this:

      start https://www.google.com/search?q=%1

      @Russ Yes, my mistake.

      I have a error in my .bat file with a "$" and "%". I compare with my google.bat and this is ok and modified the another files.

      Thank You