WOL with Ping Sensor

Is anyone interested in a plugin that incorporates the WOL plugin with the Ping Sensor plugin? I written a quick plugin based off of the Ping Sensor Plugin that incorporates the WOL function. The plugin shows itself as a binary light device and the ping sensor will show if the device is on or off using the on and off buttons. When pressing the on button, the wol function will kick into action. It only took me a few hours to write the plugin and I am testing it now. I will hopefully have it available in the app store in the very near future. Was wondering if there was any interest.

  • Garrett

I’ve thought about doing this, I just haven’t had the time yet. I would prefer it to using WOL and ping separately.

Then it would be more in line with the way most other devices appear in Vera, just need one device that represents each computer. Makes much more sense.

I would… out of interest though, what are you going to do with the Off button?

I would absolutely use a combined plugin.

I like the idea, but yeah, use a combo switch.

Right now the off button does not do anything. But what I did was created a scene that uses the off button as the trigger. I then have that scene issue a http request to eventghost to put the computers to sleep that run windows. I did this last night and it works really well. Having one device showing me if the computer is on or off and being able to wake or sleep the computer is really nice. I was getting tired of having to check the ping plugin to see if the home theater computer was on and than go to the wol plugin to turn the computer on. Having it as one device made more sense.

  • Garrett

It might be nice if it was implemented in such a way that the on command was just a shell command on the vera that was run, much like how (I beleive) WOL plugin just runs the wol ... command, and ping runs, well ping.

Then an off could also be set to do something appropriate, depending on the computer. For example most of the machines I care about are linux machines (running XBMC or servers), so it’d be nice to set off to do something like: ssh <IP> "pm-suspend"

[quote=“qedi, post:7, topic:172491”]It might be nice if it was implemented in such a way that the on command was just a shell command on the vera that was run, much like how (I beleive) WOL plugin just runs the wol ... command, and ping runs, well ping.

Then an off could also be set to do something appropriate, depending on the computer. For example most of the machines I care about are linux machines (running XBMC or servers), so it’d be nice to set off to do something like: ssh <IP> "pm-suspend"[/quote]

The on button issues the wol shell command. It is exactly what the wol plugin does. I have many linux boxes in my home as I prefer linux/unix over windows. However, the off button would be different for many people as I have a few windows boxes for xbmc, bluray, etc. That is why I have a scene that issues an http request to put the windows box to sleep using eventghost. This would be different for linux boxes. So the implementation for the off button is up in the air right now.

  • Garrett

Having the off button run a scene seems like a good compromise. I have multiple window, linux, and mac computers and they all need different things done to turn them off. Heck, even the different linux variants have different commands to run.

Right now the off button does not do anything. But what I did was created a scene that uses the off button as the trigger. I then have that scene issue a http request to eventghost to put the computers to sleep that run windows. I did this last night and it works really well. Having one device showing me if the computer is on or off and being able to wake or sleep the computer is really nice. I was getting tired of having to check the ping plugin to see if the home theater computer was on and than go to the wol plugin to turn the computer on. Having it as one device made more sense.

  • Garrett[/quote]Great idea! I use MCE controller and a scene already for this, so I guess I’ll add the off button as a trigger. Thanks

I published the wol with ping sensor plugin in the app market. Waiting for MCV to approve the plugin. When the plugin becomes available and once installed, go into the Advanced tab and enter the ip address and mac address information into the fields at the top. All should be working after that. I’ll have more in-depth instructions later.

  • Garrett

I’ll probably use this, but like I said, the combo-switch works great as a toggle.

Garrett,

What a great concept and a very logical app.
Visually easy to determine if the device is on and if not, the same device to fire it up.
Thanks for the excellent work.

I’ll let you know when it gets published. The name of the plugin is called WOLPlusPing. The on button will act as the wake-on-lan and you can use the off button as a trigger in a scene to do what ever you would like (e.g. put the computer to sleep via eventghost or ssh, etc).

  • Garrett

Looks like the plugin is now published. In the next day or two I’ll try and create a small simple write up to get the plugin configured. Which is pretty simple. As stated in my previous post, you’ll need to go into the WOLPlusPing device settings via the wrench and click on the “Advanced” tab. In there you’ll see the ip address field and mac address field. Enter the appropriate values and click the red save button. It should then work. Other values that can be set:

Enable = To enable/disable the pinging of the device 1 = on, 0 = off
Period = the time between each ping
Invert = switch the on and off status 1 = on, 0 = off

  • Garrett

It’s not working. It doesn’t wake my computer nor does the off state trigger scenes.

I have this working fine with the standard ping sensor, WOL plugin, and combo switch. But when I try to do the same with this, nothing happens.

Just installed this on my Vera 3 from the app store and it is working as intended. Also working find on my Vera Lite that is used for development. So the install from the app store is not the issue. What does your advanced tab look like and how do you have the scene setup for the trigger? It sounds like you do not have something configured correctly.

  • Garrett

I entered the IP of the computer and the Mac address that WOL plugin is using.

It displays the computers status correctly.

I am triggering on/off from my HomeWave app. I could try from another computer.

Are you sure your events are set up correctly. The events say: “when a switch is turned on/off”, but the switch is turned on/off by the state of the ping, not the action of the switch. So a shutdown computer will never trigger an on event. Nor an awake computer will trigger an off event unless the computer actually shuts down. Then upon shutdown the state changes and the trigger is fired.

I could be wrong, but that’s my hunch.

[quote=“electricessence, post:18, topic:172491”]I entered the IP of the computer and the Mac address that WOL plugin is using.

It displays the computers status correctly.

I am triggering on/off from my HomeWave app. I could try from another computer.

Are you sure your events are set up correctly. The events say: “when a switch is turned on/off”, but the switch is turned on/off by the state of the ping, not the action of the switch. So a shutdown computer will never trigger an on event. Nor an awake computer will trigger an off event unless the computer actually shuts down. Then upon shutdown the state changes and the trigger is fired.

I could be wrong, but that’s my hunch.[/quote]

My events are correct. When pressing the off button of the device, the event will fire in the scene. Same goes for the on event. The on event is used for the ping and will update the status as needed. It does indded work and I have it running on two veras. If anyone else is willing to test out the plugin and let me know that it works, it would be much appreciated.

  • Garrett

I’ve only tried it via remote access so far, but turning it on does not appear to work in the brief testing I’ve done so far.