WOL with Ping Sensor

Is any way to use “AllowedFailure” as in Ping Sensor plugin?
I would like to switch off light if no ping during 1 minute (ping every 5 sec).

This option is not available in my plugin and would require to take that from the ping sensor plugin and incorporate it into mine. I can not tell you if / when this would get added as my time is pretty limited and focusing on more important projects like my android app.

  • Garrett

[quote=“garrettwp, post:82, topic:172491”]This option is not available in my plugin and would require to take that from the ping sensor plugin and incorporate it into mine. I can not tell you if / when this would get added as my time is pretty limited and focusing on more important projects like my android app.

  • Garrett[/quote]

Thanks a lot for fast answer, Garrett! But variable “Count” can only count then Ping is OK or Count false too?

It is the amount of pings to issue. So a count of 5 will ping the device 5 times and report if any of those pings failed. It does a ping -c.

  • Garrett

If the device I’m pinging drops from the network it obviously won’t reply but something on my network from the same ip every time will reply to a ping request stating “host not found” and I believe this plugin takes that response as a reply from the target ip even though the response comes from a totally diff ip…
2 things.

  1. Can you make the plugin only accept ping reply from subject ip?
  2. I have att uverse hb gateway, does anyone know how to turn this feature off? (I’m assuming it’s from the gateway)
    Thanks

If the device ip is not pingable, it will return a non zero exist status. It uses this status to verify if it is successful or not. The plugin issues an actual ping command with the -c option. Test it for yourself on Vera and see what happens. It is working as intended.

  • Garrett

I didn’t want the WolPlusPing to show up with the rest of the lights… so I removed the number in the category field. Now it shows up on other where it makes sense. Is there any risk in this? Seems like it works fine…

Thanks,
Roy

Found a couple glitches, better to set it to 0 than blank. Works great that way.

Roy

By doing this, you may effect 3rd party apps that rely on category numbers to figure out the type of device.

  • Garrett

Thanks Garrett. You’re right it broke the “On” button by changing the category. Will just have to deal with them being shown with the lights.

yesterday i switched from Ping sensor (the ones from the wiki) to the WOL version.
i managed to wake my iMac once … but then it did not work anymore. well probably something i have to work on with settings.

i have a few questions:

  1. IPAdresses
  • WOL does not require a IP, but the ping sensor element does (as i understand) when and how is the IP entry updated ? or is it done only once ?
  1. Performance
  • for 2 scenarios i need scene action as immideate as possible. does it largly effect performance if i set the ping time to somethings like 10 sec on 4 Sensors ?
  1. Timer variable update
  • is it possible to change the “Period variable” via Luup and does it take effect if do so ?
    my reason for this is to use the another sensor for stand-by … while stand by it needs to be respond as quickly as possible.
    but if no stand by it does need to be checked at all … so my idea was to simply set the Period time to 5 sec or so on stand-by (but reset it to 10 minutes if not)

make sense ? :wink:

i made a few tests,

regardign the period value,

it seems the Reload time only gets into effect after luup restart … which is not so smart.

not sure i asked that already

i use 6 WOL Ping Sensors. and have 2 issues

  1. i would like to change the ping interval on certain conditions.
    is it enough to simply change the variable “Period” … or is a Lua Restart required ?

  2. i removed a ping switch once, and the trash action did remove the whole plugin with all other switches, any idea how to avid that ?

[quote=“garrettwp, post:71, topic:172491”]I setup eventghost to use the web server plugin. I use a url like so for the machine that is running eventghost:

http://computer_ip:port/eventghost.html?SleepPC

The html file I just created with an empty html template. But you do not have to have the html file it could be just this:

http://computer_ip:port/?SleepPC

Eventghost will see that a SleepPC request was issued and you can take that request to have it trigger the suspend or shutdown command for windows.

For the off button a created a scene to listen to the off trigger event of the wol plus ping device. So you would create a scene say “MediaPC Off” and have a trigger to use the wol plus ping sensor device and the trigger event would be “A device is triggered on or off” and the trigger mode would be “Device is triggered off”. I than add the following luup code for that trigger:

-- Issue sleep command to MediaPC via Eventghost http local http = require("socket.http") http.TIMEOUT=5 result, statuscode, content = socket.http.request("http://computer_ip:port/eventghost.html?SleepPC") log("Result"..result)

  • Garrett[/quote]
    Ok maybe I’m just dumb here but I’ve used the sample code that you provided, plugged in my computer_ip:port/?event but cannot get it to work.
    I can get eventghost to trigger using any other browser on my network using the computer_ip:port/?event but not thru the scene on my veralite.
    any help or advice would be greatly appreciated.
    thank you in advance

[quote=“onidragon, post:94, topic:172491”]Ok maybe I’m just dumb here but I’ve used the sample code that you provided, plugged in my computer_ip:port/?event but cannot get it to work.
I can get eventghost to trigger using any other browser on my network using the computer_ip:port/?event but not thru the scene on my veralite.
any help or advice would be greatly appreciated.
thank you in advance[/quote]

I use:

local status, result = luup.inet.wget(“http://192.168.0.190:8082/?Sleep”, 5)

Thanks for the reply conchordian. I finally have eventghost working and when I push the run button on the scene the evenghost does what it’s suppose to, However when I push the off button that I thought I set up as the trigger for running the scene…nothing… I’ve read and reread thinking I’ve missed something(and probably did).
I have it set so that:

device #10 Wol with ping ->a device is triggered on or off->device is triggered off.

but nothing. I’ve set the Luup in both the trigger and the scene, just the trigger, and just the scene. still to no avail. I don’t know what I’m missing. And thank you garrettwp for making such a nice app :slight_smile:

Sounds right. So the scene is working, just not the trigger to run the scene? Does it look like mine below?

[quote=“garrettwp, post:6, topic:172491”]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]

That sounds great, i love the idea of waking up my pc and sending it to sleep remotely. No idea how eventghost and http requests work though… is there anything on here about that or where can i try to read up about that ?

My last 2 posts above you have most of the info you need. Anything specific you need help with?

Don’t know why, but it randomly started working. Must have been the computer reboot. Thanks again for taking the time to respond. :slight_smile: