How to trigger Smartthings FROM PC not TO?

Ok, I know how to setup where a “alert” from my PC will send trigger to my phone to change a virtual switch in smartthings via tasker. I’m trying to figure out how to skip the phone part, and have the PC trigger the virtual switch via a script. Everything i’m finding is sending from ST to PC, I want vise versa… Can someone please point me in the right direction?

You could set up a WebCore piston to change the switch and then fire it by creating a link on your desktop with the URL. (Might have to create a local HTML file to make it more seamless.)

thank you! I’ve spent hours looking for a solution and everything seemed overly complicated (like incorporating something like eventghost) for something that i feel should be simple… toggle virtual switch via script… really didn’t feel like that should be something that should take much to do…

All I’m looking to do, if cameras detect motion, run script that includes toggling a virtual switch.

If your camera has an ifttt channel, you can also use that to flip an ST switch on/off.

it does, but i’m looking for more than just this one instance. and with as few moving parts as possible for this and any other similar item. the link firing a piston keeps it pretty simple.

I really wish there was a smartthings desktop app, giving statuses and ability to toggle items, rather than on phone/tablet only.

Give ActionTiles a try if you have not seen it yet, they have a trial version. https://www.actiontiles.com/

1 Like

WebCore Example using camera motion detector (just change the outlet to a virtual switch):

A curl statement can fire a Webcore piston, so you can omit Tasker from this process.
If the pc sees your camera event as a system event, you can drive this directly from windows’ Task Scheduler. Make sure you run as Administrator, regardless of who is logged on.

I would really suggest you look at Action tiles. This is exactly what it is for.

1 Like

can you check the status and toggle switches via VB, cmd line or like with actiontiles?

My vote is for ActionTiles!

1 Like

I feel like there is some context missing here. It sounds like you want your pc to check Smartthings for some activity, and then have it tell Smartthings to do some action. My assumption was simply about controlling Smartthings from your PC. Not about it actually checking status of items on the smartthings side.

If that is what you want, i would really be interested into why this is needed.

You may be able to talk directly to the Smartthings hub with the new API’s and Smartthings CLI SDK. i believe from what i read that it may be direct control from the computer.

1 Like

LOL, that’s why we’re throwing everything and seeing what sticks :smiley:

Actually the piston triggered by a url fits exactly what i’m looking for. Have my PC simply turn on/off a virtual switch via a simple script.

But actiontiles now has my interest… just asking about its capabilities, being i thought it was just a tablet “panel” interface…

I use smarttiles, which is the predecessor to actiontiles. It’s a great tool, and I recommend it highly.

But as you’ve stated, it’s likely unnecessary for what you seek to do. I would do the following:

A. Load eventghost on the pc. It’s a great tool for observing/tracking system events.
B. Simply observe in eventghost the system events that occur when your camera detects motion, and reports it to your PC.
C. Find those corresponding events in Task Scheduler, and send your curl statements when those events occur.

1 Like

Not at this time… But we’re considering it.

I certainly wouldn’t suggest waiting.

I have two-way communication between my PC and SmartThings using EventGhost. It’s pretty easy to use. I wrote a complete tutorial on setting it up here. You may skip to the part where you only need to send to ST via the EventGhost Scheduler.

The python script to turn on/off Virtual Switch from the PC is:
import urllib; urllib.urlopen(‘http://some smartthings address’)

Good Luck!

2 Likes