@superhuynh, generally, you'd want to make one triggercmd entry with parameters enabled that runs a batch file like this:
if "%1"=="on" curl http://.....%%22A6%%20on%%22
if "%1"=="off" curl http://.....%%22A6%%20off%%22
It takes a single parameter of ether on or off and runs the respective command. %1 gets replaced by the on or off parameter SmartThings will send if you enable parameters on that command.
That will give you this:
"i would want a virtual switch to be able to toggle on and off."
But it won't give you this:
"More importantly I would want the switch to have discrete on and off buttons."
Those two seem to be in conflict. If you really want the discrete on and off buttons, then you could make an on command and an off command (with parameters disabled), and have two separate ST switches. By default those switches will look like they're toggling on and off when you press them. If you want the switches to always show as "off", then you could use this solution.
@willie8, what operating system are you using? Are you using CTRL-V to paste? Or I think it's Command-V on a mac.
I think you might be trying to choose the Paste option from the Edit pulldown. I just tested that and I see it doesn't work. Thanks for pointing that out (assuming that menu option is what you're trying to use).
@pico, that's interesting. I'll experiment with that. I hope it works. Thanks for the suggestion.
EDIT: I worked on it for a while and didn't get it working. I couldn't get it to add the Login item while it's quarantined. I think that's a mac security feature for apps downloaded outside of the app store.
@web-desk, what OS are you running on the two servers? I just tested on one of my Win2012 R2 servers with recent updates and had a problem - it just didn't install the service. Can you please try this?
Close the TRIGGERcmd tray icon
Right-click the TRIGGERcmd Agent icon and click "Run as administrator".
Right-click TRIGGERcmd tray icon, click Background Service - Install Background Service
Run Services.msc and see if you have a TRIGGERcmdAgent service
It has to show up on the webpage before you can trigger the command with the API, and background commands don't show up until you install the background service. That background service feature is often misunderstood. I almost wish I didn't include it. It's meant to allow you to trigger commands in the context of a Windows service or a Linux daemon so you don't have to be logged in for the commands to run.