Hi all.

TRIGGERcmd, is a PC utility which allows you to expose commands/programs created on a PC to the smart world.

Almost anything which can be executed on a PC, can now be executed from HE and virtual switches created by the TRIGGERcmd app, and driver below.

Start your mail program, run that batch-file you created, reboot your PC remotely, or shut it down for the day, even run HueDynamic to the camera, and set your lights going to the movie playing on Plex (or any other program). These are just a few examples, you can achieve.

I can think of lot of use cases, if you have a PC media server connected to the TV, or work from home, this could be a perfect companion!! For me, I can fire up mail by my Dash, or perform a reboot, or shutdown etc at the push of a Dashboard switch. Or if you leave the house and forgot to shut the PC down, the possibilities are endless. There's a few other ways to integrate it here

Russ from TRIGGERcmd, created the ST version of the app and driver, which I've ported and enhanced in a few areas.

I can now share with all. I hope you find some use for it

You can download the application for free here and can be installed on Windows, Linux or Mac, you can also run it as a service. Full instructions are in the link. There are more examples on Russ's Youtube

For one PC/Mac/Linux machine its free, and you can execute one command per minute.

If you'd like it on many PCs there is a charge of $15 per year to TRIGGERcmd (not me).

Installing TRIGGERcmd.

First, sign up for a TRIGGERcmd account here

Then download the PC installation required.

Windows

Linux Agent RPM

Linux Agent DEB

Linux Agent DEB with no GUI (good for Raspberry Pi)

Mac Agent

For HE, Install the app.

github.com rvmey/HubitatTRIGGERcmd/blob/master/TRIGGERcmd.groovy /** * TRIGGERcmd V2 * * Copyright 2017 VanderMey Consulting, LLC * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at: * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License * for the specific language governing permissions and limitations under the License. * */ import java.security.MessageDigest; private apiUrl() { "https://www.triggercmd.com" } This file has been truncated. show original

And the driver

github.com rvmey/HubitatTRIGGERcmd/blob/master/TRIGGERcmdSwitch.groovy /** * TRIGGERcmdSwitch.groovy * * Author: vanmeyconsulting@gmail.com * Date: 2017-04-22 * * */ // for the UI metadata { definition (name: "TRIGGERcmd Switch", namespace: "vandermeyconsulting", author: "Russell VanderMey") { capability "Switch" } preferences { // input "stepsize", "number", title: "Step Size", description: "Dimmer Step Size", defaultValue: 5 } } This file has been truncated. show original

When installing the App, the second page will allow you to choose which TRIGGERcmd commands you'd like to install as Switches. Once installed, there is an option to toggle how the switch behaves.

When set On, it behaves like a momentary switch, and will turn the switch off shortly after switching on. Useful for launching a program or batch-file just once, without closing.

When set Off, it will behave as a normal switch. You could open an application, when switched on, and close it again when switching off.

Example of a command for Notepad++

In TRIGGERcmd you would configure as such:-



And the "Notepad.bat" :-

if "%1"=="on" "C:\Program Files\Notepad++

otepad++.exe" if "%1"=="off" taskkill /im notepad++.exe

When the switch is switched on, Notepad++ will launch, when switched off, it will be closed.

Enjoy!

Special thanks to @cobra for reuse of code snippets, and @april.brandt for prompting the thoughts