(Tutorial) PC on/off and Activity Monitor with SmartThings

Well, let’s get things hooked up like you want it. So, you want to create a Virtual Button to Restart the PC? Let me simulate on my end BRB. I use a cool little app call Switch Mania where it is really easy and quick to create virtual devices.

I do have 1 question for you, is there anyway to minimize Host Pinger to the tray or hide it to run in the backround or something like that. It is kinda annoying just sitting there like it does, lol.

I can minimize a command prompt screen. You can also run it as a background service. But, you are on your own with that one! :joy:

1 Like

Running on my PC.


  1. I used Switch Mania to create a Virtual Button (Restart Study PC)
  2. I went to Study PC (EG)<—Name of the Event Ghost for my Study PC IP Address and found the “Button” under “Switches” and checked it
  3. Went to Study PC and Show Event Ghost
  4. Went to ST App and Click on Restart Study PC button and it showed in Event Ghost
  5. Created a New Folder in Event Ghost called Restart PC
  6. Created a Macro-System-Reboot
  7. Click and Dragged the HTTP…Restart Study PC “On” Event to the Macro System Reboot.
  8. Saved.

Here is the SS. Hopefully it will reboot and I will come back to report.

Yeah, I understand, and I did exactly that, however no matter what I do it is still mixing up the switches, when I thru the restart it shows computer off. I have tried 100 times in a 100 different ways with no dice. For whatever reason it will only work if I have 1 switch setup.

K, I’m back and it worked perfect.

Please post a SS of your Event Ghost Screen.

Are you saying that the Switch HTTP.ST on the left Event Screen in Event Ghost does not read the correct Switch?

Yes, that is exactly what I am saying

Don’t know what’s going on unless you post a SS of EventGhost. I hit PrintScreen at the top of Insert Home Page Up. Then open up Paint and Paste. Crop the image. Then Save as jpeg or png. I don’t think there is any information on the Event Ghost Screen that is fragile…

I will have to do this tomorrow, I am in the middle of making host pinger run as a service

1 Like

I dont have have a PC / PI that i can leave on 24/7 so am i right in assuming i can still use eventghost to shutdown and ST/Core to wake i just wont have a reliable status of the PC in ST?

1 Like

Yep. It will work without an always on pc. Just have to worry about the switch getting out of sync with PC.

1 Like

Little stuck at number 9

Finally configure a Macro and Python Script in Event Ghost to send SmartThings the PC Activity Status
import urllib; urllib.urlopen(‘http://some smartthings address’) This is better explained with the screen shots below.

Am i pointing this to the URL of the switch or the EG app in smarthings IDE ? so for example i have this as my EG URL


I updated the Tutorial. I also had a label out of order. Detailed instructions are in Post #2 for Step 9.

Basically once you create the virtual switch, you will use The Cloud Interface app to get the end points of the Virtual Switch you created for this step. You need both the On End Point and Off End Point. These will be a SmartThings IDE URL similar to:


Once you get these, you will put that URL after the Python Script:

import urllib; urllib.urlopen(‘your End Point Address goes in between these two apostrophes’)

The Python Script goes into EventGhost to send the Status to SmartThings as explained here:

Did you get it worked out? I updated the Tutorial.

Let me know.


Reading this thread with interest. Will probably do something similar to track computer state here, although I’m a linux user, so will probably roll my own (or roll it into my network phone presence detector).

Regarding Wireless Wake on Lan (or WoWLAN), I expect the issue will be that your USB ports aren’t powering your WLAN adaptors when the PCs are off. You might be able to get your PCs to keep some USB ports powered up, but I doubt whether you can then tell the PC to wake on USB and trigger the wireless adaptor that way. Wake-on-LAN only works at all because most PCs can keep the LAN card (or built-in WLAN card) active when the machine is off.

Hope that helps.

do you have a screenshot of where i get this from

the Cloud Interface app to get the end points of the Virtual Switch you created for this step

am i wrong in assuming its the url when i select edit on the Virtual switch?

Post #2 has more detailed instructions.

I use a smart outlet (one that preferably has power monitoring) and the BIOS setting to turn on PC after power restore.

If PC Power Outlet drops below 10 watts
Then Using Power Outlet
Wait 5 seconds
Turn Off

If PC Virtual Switch changes to On
Then Using PC Power Outlet
Turn On