def myWOLCommand() {
def result = new physicalgraph.device.HubAction (
"wake on lan <your mac address w/o ':'>",
physicalgraph.device.Protocol.LAN,
null,
[secureCode: "111122223333"]
)
return result
}
I played around with this method a bit and was able to get to it work with a PC wired directly to my primary router. However, I needed to wake/suspend a laptop over wifi, and was unable to get the wake to work with this method.
My final solution ended up being quite a bit more complicated…I believe this built-in method would be an easy solution for a simple WOL request to a PC physically wired to your LAN.
Thank you for pointing me towards EventGhost, it works great for putting the computer to sleep or shutting it down, but I’m still trying to find a way to wake it up after putting it to sleep.
The WOL command doesn’t do anything or display any errors, but my main concern is that my hub stops responding if I execute that command more than a few times.
When that happens, the only way I can get it to start working again is to reboot it by pulling the power cable and batteries.
This happened twice last night and once today while testing it and twice the last time I tried testing it which was about a month ago.
I didn’t have any problems with my hub during the month in between the tests so it’s definitely related to this command or hub actions in general.
I’m not necessarily looking for help getting WOL to work because it’s probably a windows or bios setting, but I would like to know why it keeps messing up the hub.
Sorry I’m new to all this and was curious how you were able to get your WOL to work with the physically wired computer. I looked through the documentation a bit but I’m not very familiar with Groovy or making apps or device handlers.
I’m pretty sure the SmartApp CoRE has this feature built in so that all you have to do is enter your mac address.
I wasn’t able to get WOL to work with my computer that’s wired so I came up with a different solution.
I used the free software EventGhost to create macros that perform actions like changing the volume, opening various applications and shutting down the computer.
I then changed the bios settings on my computer so that when power is restored the computer automatically turns on.
I have my computer plugged into a z-wave switch (Aeon Labs DSC06106-ZWUS - Z-Wave Smart Energy Switch) and I extended the generic device handler for it.
The on command turns on the switch causing the computer to start.
The off command uses EventGhost to safely shut down the computer and then once the power drops to 0 it shuts the switch off.
I added the Music Player capability so that the device handler can be used to Pause/Unpause shows on Hulu/Netflix and adjust the volume.
This device handler allows me to use my Amazon Echo with the Ask Alexa SmartApp to perform all those actions through voice commands.
I hadn’t planned on posting the code for this device handler, but I’ve added it to my GItHub SmartThings repository as “Generic Computer” in case anyone’s interested.
My TV doesn’t turn on automatically when given power so I had to create an IR transmitter using Arduino and the ThingShield to turn my tv and receiver on and off, but that’s a whole other project.
Hi - are there any instructions on where this is on CoRE. I am new to it - but have it published to my smartapps - but cannot find any settings/capabilities etc for WOL?
It is a task. On the action side of things, add an action controlling either the location or one or more devices, then add a task and scroll down to find Wake on LAN in the list.
SoL is not as standardized as WoL (which is implemented at a low motherboard level), but you will find several apps that can run on your computer (OS dependant) that accept http requests which CoRE can make. Search the forum for sleep on lan…
I use the Windows application EventGhost for this purpose, but I’ve modified an energy monitoring switch DTH to ensure that it doesn’t turn off the power when the computer is still on.
The off command sends the shut down command to EventGhost and then waits until the power drops to 0 before turning the actual switch off.
The motherboard is set to turn on the computer when power is restored so turning the switch back on turns the computer on.
I have wake on lan currently working through a RP module, but I was hoping to get this to work. I set it all up with my
IP. 172.30.42.3 Port 9 and the MAC without any colons and it doesn’t do anything. I have it on with a packet sniffer that monitors for WOL packets and it doesn’t see anything.
@apottere posted this link in another thread, but I wanted to add it to this one. This is a project report at reddit from someone who is using the WOL SmartThings feature combined with google home so they can turn the computer on and off by their voice.