I created a separate app for triggering commands called TRIGGERcmd Misson Control.

I created a separate app for triggering commands called TRIGGERcmd Misson Control.

@Guilherme-Matos, I tried it. When I ran the TRIGGERcmd Agent in the other user account on my computer, the token prompt did show up, but I had to click the agent's icon at the bottom of the screen because it was behind my browser. I had to bring it to the front.
If you don't get an icon at the bottom, let me know, and please tell me whether you're using the latest version. I'm running version 1.0.56 which I'm about to release. I added an emoji icon picker for commands.
Download and add this to your Claude skills to list and run commands from Claude:
@Rodney-Mathee, I'm glad you told me it's wifi, not wired ethernet. That changes things. For one, that WakeMeOnLan.exe tool from Nirsoft won't work because it doesn't support wireless networks.
I've never tried "wake-on-wlan" but in theory it's possible with the right hardware.
https://documentation.ubuntu.com/core/explanation/system-snaps/network-manager/how-to-guides/configure-the-snap/wake-on-wlan/
@Rodney-Mathee, you'll need to use a separate computer on your network to turn it on via "Wake On Lan" and you'll probably need to enable it in the BIOS of the computer you want to turn on.
This tool could send the "magic packet" to turn on the other computer on your network:
https://www.nirsoft.net/utils/wake_on_lan.html
The following is from the documentation page I linked to above:
Turn On a Computer From Command-Line
WakeMeOnLan allows you to wake up a computer on your network without displaying any user interface, by using the /wakeup command-line option. You can specify the computer name, IP address, or the free user text that you typed in the properties window, as long as the computer information is stored inside the .cfg file. You can also specify the MAC address of the remote network card, even if the computer is not stored in the .cfg file.
Optionally, you can specify the port number in the second parameter, and broadcast address in the third parameter.
Examples:
WakeMeOnLan.exe /wakeup 192.168.1.25
WakeMeOnLan.exe /wakeup Comp01
WakeMeOnLan.exe /wakeup Comp02
WakeMeOnLan.exe /wakeup 40-65-81-A7-16-23
WakeMeOnLan.exe /wakeup 406581A71623
WakeMeOnLan.exe /wakeup Comp02 30000 192.168.0.255
WakeMeOnLan.exe /wakeup 192.168.1.25 20000 192.168.1.255
You can also wake up all computers in the list by using /wakeupall command-line option. Like in the /wakeup command-line option, you can optionally specify broadcast address and port number.
Examples:
WakeMeOnLan.exe /wakeupall
WakeMeOnLan.exe /wakeupall 20000 192.168.2.255 If you want to wake up all computers in specific IP addresses range, you can use /wakeupiprange command-line option
Examples:
WakeMeOnLan.exe /wakeupiprange 192.168.0.25 192.168.0.100
WakeMeOnLan.exe /wakeupiprange 192.168.0.11 192.168.0.20 20000 192.168.0.255
If you want to wakeup multiple computers, you can use /wakeupmulti command-line option.
Examples:
WakeMeOnLan.exe /wakeupmulti 192.168.1.19 192.168.1.55 192.168.1.82
WakeMeOnLan.exe /wakeupmulti Comp01 Comp02
@Andru, thanks for the idea. I'll look into it.
@Lokilator nice, I've used the shutdown command in the past. I haven't seen that one.
@Lokilator, you could run a command to put the PC to sleep, but once it's sleeping, the computer can't run commands, so you can't wake it up from the computer itself. You'd need to run a command on a second PC that would send the magic packet to wakeup the first PC that's sleeping. Is that clear?
If you have 2 PC's, they could wake each other up as long as one of them is not sleeping at the time.
@Pepe-Tops , good to know. I'll test and fix that if I can reproduce it.
@Matt-Packwood, I thought I did produce an Apple Silicon version. Are you saying this version isn't an Apple Silicon version?
@Pepe-Tops, no, you don't need a subscription to add more commands. You can have as many commands as you want. You might need to restart your agent if it stopped sync'ing.
One thing to keep in mind - your agent is either running in foreground or background mode, and when it's in foreground mode it will only add/remove/run foreground commands, and vice-versa.
If you installed the background agent, make sure your commands are background commands if you want it to use them.
I just followed this guy's tutorial:
https://towardsdatascience.com/run-claude-code-for-free-with-local-and-cloud-models-from-ollama/
I'm using claude code with ollama running gpt-oss:20b on my PC with my Nvidia GPU to speed it up.
I found this CLAUDE.md file works well. It tells the gpt-oss model how to use the Write tool to write to files:
My CLAUDE.md file:
## Important rules
- If the user wants you to write a file, do it. Use your Write tool to create the file. The Write tool has a required parameter called "file_path".
My interactive claude session:
▐▛███▜▌ Claude Code v2.1.29
▝▜█████▛▘ gpt-oss:20b · API Usage Billing
▘▘ ▝▝ ~/appdev/raspi
/model to try Opus 4.5
❯ create a python script called hello.py in the current directory that prints "Hello World".
● Write(hello.py)
⎿ Wrote 2 lines to hello.py
1 print("Hello World")
This is a command that runs a non-interactive claude session. You could run it via the TRIGGERcmd agent
claude -p -d --model gpt-oss:20b --permission-mode acceptEdits "create a python script called hello.py in the current directory that prints Hello World"
I created a this myclaude.bat file:
set ANTHROPIC_BASE_URL=http://127.0.0.1:11434
set ANTHROPIC_AUTH_TOKEN=ollama
cd c:\myfolder
claude -p -d --model gpt-oss:20b --permission-mode acceptEdits %1
My Command field in the GUI editor looks like this:
start /w c:\myfolder\myclaude.bat
My commands.json entry looks like this:
{
"trigger": "claude code",
"command": "start /w c:\\myfolder\\myclaude.bat",
"offCommand": "",
"ground": "foreground",
"voice": "",
"voiceReply": "",
"allowParams": "true",
"quoteParams": "true",
"mcpToolDescription": ""
}
@Brad-Magri-Olson, thank you for reporting the issue.
I'm on version 1.0.54 and so far I'm not able to reproduce the issue.
Can you try upgrading to 1.0.54? I tried downgrading my agent and I still couldn't reproduce it.
Also, can you tell me what background command you're running?
Also, what antivirus software do you use? I wonder if that's killing the service.
@David-Coulson, I fixed it. Now you won't get these "TRIGGERcmd - Your command didn't run" emails if the trigger was from Home Assistant.

Thanks again for reporting the problem.
@Nuno-Gomes, thanks for telling me. Please try again. It should work now.
@Asit-Mishra, thanks for telling me. Please try again. It should work now.
@Yoni, thanks for letting me know. I'll make it case-insensitive in the next version.
@Matt-Lodder, what OS are you running? I just tried echo on my Windows laptop and it did not pop up a window.
@David-Coulson, I'll look into it.
One thing you can check in the meantime make sure this checkbox is unchecked in your profile:

Can you show me one of the emails? I wonder if it's reminding you to subscribe because you're running more than 1 command per minute. I'll add an option to disable those emails too.
Also, did you enable "Home Assistant Offline Configuration"?
EDIT: I added this checkbox that you can uncheck to stop the subscription reminder emails:

My PC talks to my wifi light bulb directly, not via Tuya's cloud API.
I can say, "Alexa, bulb 1 red" or "Alexa bulb 1 off" etc.
I can also say, "Use @TRIGGERcmd to turn bulb 1 blue" using the MCP tool with ChatGPT.
Example commands:
Turn the bulb on:
python3 c:\tools\tuyabulb.py --id abcdefghijklmnop123456 --key "123456!@ABCcdefh" --ip 192.168.86.25 on
Set the color to red:
python3 c:\tools\tuyabulb.py --id abcdefghijklmnop123456 --key "123456!@ABCcdefh" --ip 192.168.86.25 red
Set the brightness to 60 percent:
python3 c:\tools\tuyabulb.py --id abcdefghijklmnop123456 --key "123456!@ABCcdefh" --ip 192.168.86.25 60
Here's the script:
#!/usr/bin/env python3
import argparse
import ipaddress
import platform
import subprocess
import sys
import tinytuya
# Predefined color presets (RGB values)
COLOR_PRESETS = {
"red": (255, 0, 0),
"green": (0, 255, 0),
"blue": (0, 0, 255),
"white": (255, 255, 255),
"yellow": (255, 255, 0),
"cyan": (0, 255, 255),
"magenta": (255, 0, 255),
"orange": (255, 165, 0),
"purple": (128, 0, 128),
"pink": (255, 192, 203),
}
def ping_host(ip: str, timeout: int = 1) -> bool:
"""Ping a host to check if it's reachable. Returns True if ping succeeds."""
param = "-n" if platform.system().lower() == "windows" else "-c"
timeout_param = "-w" if platform.system().lower() == "windows" else "-W"
timeout_value = str(timeout * 1000) if platform.system().lower() == "windows" else str(timeout)
command = ["ping", param, "1", timeout_param, timeout_value, ip]
try:
result = subprocess.run(command, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL, timeout=timeout + 1)
return result.returncode == 0
except (subprocess.TimeoutExpired, Exception):
return False
def make_device(device_id: str, ip: str, local_key: str, version: str | None):
# BulbDevice works for most Tuya bulbs. If yours isn't a "bulb" type, use Device instead.
d = tinytuya.BulbDevice(device_id, ip, local_key)
d.set_socketPersistent(True) # keep socket open for reliability
d.set_socketTimeout(5) # seconds
# Many Tuya WiFi bulbs are 3.3. Some are 3.1. If you're unsure, try 3.3 first.
if version:
d.set_version(float(version))
else:
d.set_version(3.3)
return d
def main():
p = argparse.ArgumentParser(description="Local control of a Tuya bulb via tinytuya (no cloud).")
p.add_argument("--id", required=True, help="Tuya device id")
p.add_argument("--ip", help="Bulb IP address on your LAN")
p.add_argument("--subnet", help="Subnet to scan (e.g. 192.168.1.0/24)")
p.add_argument("--start-from", help="IP address to start scanning from (only with --subnet)")
p.add_argument("--key", required=True, help="Tuya localKey (16+ chars)")
p.add_argument("--ver", default=None, help="Protocol version (e.g. 3.3 or 3.1). Default: 3.3")
p.add_argument("cmd", help="Command: off, on, status, color name (red, green, etc.), or brightness 0-100")
args = p.parse_args()
# Determine command type
cmd_lower = args.cmd.lower()
if cmd_lower in ["off", "on", "status"]:
cmd_type = cmd_lower
elif cmd_lower in COLOR_PRESETS:
cmd_type = "color"
preset_color = cmd_lower
elif args.cmd.isdigit():
brightness_val = int(args.cmd)
if 0 <= brightness_val <= 100:
cmd_type = "brightness"
else:
p.error("Brightness must be between 0-100")
else:
p.error(f"Invalid command: {args.cmd}. Use: off, on, status, color name, or brightness (0-100)")
# Validate that either --ip or --subnet is provided
if not args.ip and not args.subnet:
p.error("Either --ip or --subnet must be specified")
if args.ip and args.subnet:
p.error("Cannot specify both --ip and --subnet")
if args.start_from and not args.subnet:
p.error("--start-from can only be used with --subnet")
# Determine which IPs to try
if args.subnet:
try:
network = ipaddress.ip_network(args.subnet, strict=False)
all_ips = [str(ip) for ip in network.hosts()]
# Filter to start from specified IP if provided
if args.start_from:
start_ip = ipaddress.ip_address(args.start_from)
# Verify start IP is in the subnet
if start_ip not in network:
print(f"ERROR: Start IP {args.start_from} is not in subnet {args.subnet}", file=sys.stderr)
return 1
# Filter to IPs >= start_from
ips_to_try = [ip for ip in all_ips if ipaddress.ip_address(ip) >= start_ip]
print(f"Scanning subnet {args.subnet} from {args.start_from} ({len(ips_to_try)} hosts)...", file=sys.stderr)
else:
ips_to_try = all_ips
print(f"Scanning subnet {args.subnet} ({len(ips_to_try)} hosts)...", file=sys.stderr)
except ValueError as e:
print(f"ERROR: Invalid subnet or IP format: {e}", file=sys.stderr)
return 1
else:
ips_to_try = [args.ip]
# Try each IP until one works
last_error = None
for ip in ips_to_try:
if args.subnet:
print(f"Trying {ip}...", file=sys.stderr)
# Quick ping check to skip unreachable hosts
if not ping_host(ip):
continue
dev = make_device(args.id, ip, args.key, args.ver)
dev = make_device(args.id, ip, args.key, args.ver)
try:
if cmd_type == "off":
r = dev.turn_off()
elif cmd_type == "on":
r = dev.turn_on()
elif cmd_type == "brightness":
r = dev.set_brightness_percentage(brightness_val)
elif cmd_type == "color":
# Get RGB values from preset
rgb = COLOR_PRESETS[preset_color]
# Set the color
r = dev.set_colour(rgb[0], rgb[1], rgb[2])
else:
r = dev.status()
# Check if the device responded with an errora
if isinstance(r, dict) and r.get("Error"):
if args.subnet:
# During subnet scan, continue to next IP on error
last_error = r.get("Error")
continue
else:
# For direct IP, print error and exit
print(r)
return 2
# Success! Print result and exit
if args.subnet:
print(f"SUCCESS: Device found at {ip}", file=sys.stderr)
print(r)
return 0
except Exception as e:
last_error = e
if not args.subnet:
print(f"ERROR: {e}", file=sys.stderr)
return 1
# For subnet scan, continue to next IP
continue
finally:
try:
dev.set_socketPersistent(False)
except Exception:
pass
# If we get here with subnet scan, none of the IPs worked
if args.subnet:
print(f"ERROR: Device not found in subnet {args.subnet}. Last error: {last_error}", file=sys.stderr)
return 1
if __name__ == "__main__":
raise SystemExit(main())
This is my commands.json entry:
{
"trigger": "Tuya Bulb 1",
"command": "python3 c:\\tools\\tuyabulb.py --id abcdefghijklmnop123456 --key \"123456!@ABCcdefh\" --ip 192.168.86.25",
"offCommand": "",
"ground": "foreground",
"voice": "bulb 1",
"voiceReply": "",
"allowParams": "true",
"mcpToolDescription": "Controls the state of light bulb 1. Parameters are: on, off, red, green, blue, white, yellow, cyan, magenta, orange, purple, pink, or brightness percentage from 0 to 100"
}