[WINDOWS TUTORIAL] PC On/Off (No Hardware Required)

Hey there! This is absolutely able to be expanded. Using the “Send Events to EventGhost” SmartApp alone, you can trigger actions such as shell scripts, websites, programs, and much more.

As for your PC you linked to, it looks like it will work. The MSI Cubi 2 uses a proprietary motherboard as far as I can tell, though this forum post on the MSI forums shows that previous Cubi boxes have had Wake-on-LAN.

1 Like

Still doesn’t work. In event Ghost I get “error: [Errno 10013] An attempt was made to access a socket in a way forbidden by its access permissions”. Is there some setting on my PC I have to change?

In the webserver settings are you using Port 80?

Yes:

Make sure the permissions for the HTML documents root is set to allow access for Eventghost based on the context Evengthost is running under (current user or as a system service). There are several ways to do this (ie different levels of permission) that I won’t get into here. But that’s one possible culprit.

Also, why is your HTML documents root set to a folder on your desktop? In general you should probably move that to another folder, personally I’d prefer a folder off the root, that will 1) not be tied to a Windows account (such as by having it in “HTPC\Desktop” is tied to the user HTPC) and 2) will not cause issues if you are running Eventghost as a system service (assuming you can, I’m not sure).

Mine is just empty and works fine. Also, does EventGhost have permission to bypass the firewall? Try this: (Start Menu -> Search “Firewall” -> Allow an app or feature through Windows Firewall -> EventGhost)



Hey I just wanted to say thank you so much for this. I have been looking for a good solution to ensure my computer is off or turn it on when I need it. I really appreciate you sharing this.

I do have one issue, which may be because I messed something up I am not sure, but when I turn the PC on or off manually it doesn’t update the switch in ST. Any idea why that might be? I played around a little bit, but I am not all that familiar with Event Ghost so I wasn’t sure what exactly is happening.

Thanks again!

1 Like

Did you follow the instructions with webcore and the ift chart?

I did but maybe I missed it up. If I put the URL into my browser it works and triggers WebCoRE but it doesn’t seem like event ghost is calling it. I’ll play with it now when I get home and report back. :slight_smile: Thanks!

Wait, did you install cURL from the resources section?

Yep, I did. In fact I have found that if I right click on the IFTT action in EG and execute it there it works. I also found that if I go to sleep manually it does work. It is only the wake up that does not update correctly even though the EG log shows the IFTT action running. This makes me think that either it is running too soon after resume and the call fails or perhaps it isn’t able to actually run the action because it is at the log-in screen? Any thoughts? Thanks!

Guess I should have tested my theories before I posted. So I added a 5s wait after system.resume before the IFTT call fires and that fixed it. I could probably shorten the delay but I just wanted to see if it worked. My guess is networking goes to sleep and then takes a ms or so to turn back on when the system is resumed. I guess if nothing else this is good for others if they experience a similar issue in the future.

Thanks again for this great and useful project. I appreciate it!

1 Like

I tried the Firewall thing and that didn’t help. It must be the different levels of permission thing…

1 Like

Thanks for the heads up. I think you’re right about the network card taking a little bit to get back up. Good find! :slight_smile:

1 Like

HI
I have just set up everything its not working at least to pc off.
Im able to trigger pc shutdown in eg, but not with the virtual switch in st. I can see the log in eg on , off.
The commend pc on in st work but only if i have trigger from eg or manualy thru windows,pc off never work in st.
A also see webcore receive both command from st
Where do guy think i miss.

I also try to do another pc, this one dont receive any log in eg from st and when i trigger pc update on or off from that pc both switch turn on or off i gess i would have to replace the eg command in st but where do i replace the same command in eg
Thanks

Another question, do you have to do some configuration with curl or just install curl ,there no mention in the instruction
Thanks

Hey, all you have to do is install cURL as an admin. It simply allows EventGhost to tell SmartThings that your PC is turning off. Did you check and make sure your settings in EventGhost preferences are correct? It sounds like EventGhost might be closing when you exit. See step 1.

hi Nickd
Evenghost is not closing,step 1 is done correctly. I’m not shure if i have installed curl as a admin .Strange thing is that i can see the log in evenghost pc on pc off when i trigger the switch in st, for me ,i think the problme should be in eg or the pc itself.
I will make more testing soon and get back to you .
Thanks

1 Like

As I’ve just started with Smartthings and/or I have a problem with logic, I don’t understand how IFTTT/Webhooks is used. Do I need to create anything in IFTTT or it works just like that without a web request in Webhooks? If it works just like that, how does this happen? :slight_smile:

Later Edit: I’m slow, I got it in the end :slight_smile:

All WebCoRE is doing with the “IFTTT” action and trigger is using HTTP GET and HTTP POST to receive and send signals across the web. Nothing is required in IFTTT and it’s just your computer sending signals to the WebCoRE service.