WOL with Ping Sensor

Not cool. Not sure why it works on both my units but not on yours. I’ll redo the install from a clean state by removing all the files and see what happens wonder if it’s a config issue. Does the ping portion work? Meaning is it showing the correct status?

  • Garrett

Ok false alarm, its now started working… I think it just took another restart!

Works very well for me, thanks, with just the MAC address. Combined with the Vera EventGhost plugin to put it to sleep on the off trigger is great.

Edit: works with Authomation for Android too.

For me, the ping part works. I’ll try again tonight and report my results.

Removed the separate ping and WOL apps, then installed WOL Plus Ping for three computers and it works well locally and through Home Buddy.

:frowning:

Okay, so I’m gonna start out by saying I’m a bit frustrated, but I’m trying to stay objective.

I just spent an hour recovering my Vera/Network because after configuring your plugin to wake up my computer when “ON” is pressed, and for “OFF” trigger a scene that causes it to “HIBERNATE”:

  1. My computer began cycling: waking-up, then immediately hibernating again.
  2. I watched as your plugin would display ON (I set the period to 15 seconds like the default ping sensor) and then soon after drop from ON to OFF (without user intervention) which then triggered the scene for causing it to hibernate. In other words, if the ping fails, it acts as if someone pressed the off button.
  3. My Vera became very slow to respond.

Now I’m not pointing fingers because there still could have been some wacky stuff going on with my config that may have not been caused by the plug-in.

My gut feeling is that your EVENTS ARE WRONG. There needs to be separation between the state of the computer and the action of pressing the buttons. I still could be wrong, but it looks like it (as the trigger list says) it only reacts to STATE and not to UI actions.

Another note: Although I was able to operate the actions via the web console and through other scenes, I was not able to operate your plugin via any 3rd party mobile apps.

[quote=“electricessence, post:26, topic:172491”]:frowning:

Okay, so I’m gonna start out by saying I’m a bit frustrated, but I’m trying to stay objective.

I just spent an hour recovering my Vera/Network because after configuring your plugin to wake up my computer when “ON” is pressed, and for “OFF” trigger a scene that causes it to “HIBERNATE”:

  1. My computer began cycling: waking-up, then immediately hibernating again.
  2. I watched as your plugin would display ON (I set the period to 15 seconds like the default ping sensor) and then soon after drop from ON to OFF (without user intervention) which then triggered the scene for causing it to hibernate. In other words, if the ping fails, it acts as if someone pressed the off button.
  3. My Vera became very slow to respond.

Now I’m not pointing fingers because there still could have been some wacky stuff going on with my config that may have not been caused by the plug-in.

My gut feeling is that your EVENTS ARE WRONG. There needs to be separation between the state of the computer and the action of pressing the buttons. I still could be wrong, but it looks like it (as the trigger list says) it only reacts to STATE and not to UI actions.

Another note: Although I was able to operate the actions via the web console and through other scenes, I was not able to operate your plugin via any 3rd party mobile apps.[/quote]

The reason I say my events are not wrong is that they are of the standard binary switch. So the plugin acts and works like any standard binary switch. So if the device you are operating manually changes status, e.g. on, the plugin will run the wake on lan, but that should not affect anything as the computer is already on.

I see a few issues with your implementation,

  1. The 15 second poll is way to short for any plugin to poll.
  2. How are you sending the hibernate command to your computer? Are you using an http request? If that is the case, do you have a timeout set for the hibernate command? This is how I have my http request:

– Issue sleep command to Series7 via Eventghost http
local http = require(“socket.http”)
http.TIMEOUT=5
result, statuscode, content = socket.http.request(“http://192.168.X.X/eventghost.html?SleepPC”)
log(“Result”…result)

I do not know why you are having issues with third party apps. The plugin shows itself as a binary switch. So it should work with any 3rd party app. The main reason I chose to go with the binary switch and not create my own device to make it compatible. I have no issue with using it with my AutHomation app for android. I press the on button and it will wake my computer up, I press the off button and it will put my computer to sleep via the scene trigger.

If I go with my own device type and prevent the status event to not be recognized, it may cause other people to complain as they would not be able to use it in their scenes. If others want to chime in on some suggestions I am more than happy to use them. I have been using the plugin for over a month everyday and have not had any issues.

  • Garrett
  • 15 seconds is only too short if the computer takes longer to wake up which is still an indeterminate event.
  • I’m using an MCE command to hibernate it.
    When I say your events are wrong, I mean, look at the standard switch API compared to the Combo-Switch API.
    The combo switch does it right. You have options on how you can listen for triggers/events. One is the change in state, the other is the action of the button/trigger.

[ul][li]Does your plugin ping and display results correctly? YES[/li]
[li]Does your plugin wake a computer as expected? YES[/li]
[li]Does your plugin have enough events to be scripted safely? NO!
All you need to do to make this perfect is (I’m hoping this is possible) to add two (or possibly one) more trigger set.
[list type=decimal]
[li]A trigger for when the ON button is pressed.[/li]
[li]A trigger for when the OFF button is pressed.[/li]
[/list]
I would also suggest decoupling the state of the switch from the actions of the buttons and only have it based upon ping. That way you can reliably script scenes based upon the real wake state of computer. For example, I might have an scene that is triggered by my computer waking up (which may or may not happen from Vera). That scene may turn on a light or whatever, but if my computer was in full shutdown, it will not wake on LAN! So even though your switch for a short period of time said my computer is ON, it did not actually turn on! The change of state in your current config, would trigger that scene even though I didn’t want it to.
If it were possible, It would be really cool to have the switch be in an ‘indeterminate’ state (neither on nor off) after pressing a button that is opposite the current state, but if it returns to current state, do not trigger the change in state event.
[/li][/ul]

Conceptually this is such a great idea, and I understand your approach to using a standard switch.
But it needs some tweaking to be perfected. :-\

I just wanted to report this plugin work like a charm.

I found a new way to “wakeup” my Mac Mini when I need it (for Plex Media Server).

This is awsome !

Thanks !

@Kiwi: are you using the off button for anything?

Not yet. I used as proof of concept, but I will use it for example to send “hibernate” using Luup to anothers computer (like my Synology) when the Mac Mini is sleeping.

Is there any issue with the off button ?

[quote=“electricessence, post:28, topic:172491”]- 15 seconds is only too short if the computer takes longer to wake up which is still an indeterminate event.

  • I’m using an MCE command to hibernate it.
    When I say your events are wrong, I mean, look at the standard switch API compared to the Combo-Switch API.
    The combo switch does it right. You have options on how you can listen for triggers/events. One is the change in state, the other is the action of the button/trigger.

[ul][li]Does your plugin ping and display results correctly? YES[/li]
[li]Does your plugin wake a computer as expected? YES[/li]
[li]Does your plugin have enough events to be scripted safely? NO!
All you need to do to make this perfect is (I’m hoping this is possible) to add two (or possibly one) more trigger set.
[list type=decimal]
[li]A trigger for when the ON button is pressed.[/li]
[li]A trigger for when the OFF button is pressed.[/li]
[/list]
I would also suggest decoupling the state of the switch from the actions of the buttons and only have it based upon ping. That way you can reliably script scenes based upon the real wake state of computer. For example, I might have an scene that is triggered by my computer waking up (which may or may not happen from Vera). That scene may turn on a light or whatever, but if my computer was in full shutdown, it will not wake on LAN! So even though your switch for a short period of time said my computer is ON, it did not actually turn on! The change of state in your current config, would trigger that scene even though I didn’t want it to.
If it were possible, It would be really cool to have the switch be in an ‘indeterminate’ state (neither on nor off) after pressing a button that is opposite the current state, but if it returns to current state, do not trigger the change in state event.
[/li][/ul]

Conceptually this is such a great idea, and I understand your approach to using a standard switch.
But it needs some tweaking to be perfected. :-[/quote]

What you are asking me requires me to develop a new device type with these new events and this would break compatibility with 3rd party apps that will require the developer to support the plugin.

When I say 15 seconds, 15 seconds is too short for a poll of any plugin. It requires Vera to work harder and in some cases can cause vera to be unresponsive. Many of us have recommended that 30 seconds be the absolute minimum and 60 seconds be the better option.

  • Garrett

Not yet. I used as proof of concept, but I will use it for example to send “hibernate” using Luup to anothers computer (like my Synology) when the Mac Mini is sleeping.

Is there any issue with the off button ?[/quote]

The off button does function. You will need to create a scene and use the off button as the trigger. In the luup section of that trigger, you can add your code to send the hibernate command to you computer.

  • Garrett

Not yet. I used as proof of concept, but I will use it for example to send “hibernate” using Luup to anothers computer (like my Synology) when the Mac Mini is sleeping.

Is there any issue with the off button ?[/quote]

The off button does function. You will need to create a scene and use the off button as the trigger. In the luup section of that trigger, you can add your code to send the hibernate command to you computer.

  • Garrett[/quote]

Yeah I saw that, this is just what I will do… Now I have just to make the good scenario to make what I think :slight_smile:

/Xavier

@Garret: test the third party apps more. It didn’t work with mine.
@Kiwi: If you read what I wrote. A word of caution using the off button for hibernate: if for any reason your computer looses contact (a missed ping) this plugin will send a hibernate signal even though you didn’t ask it to.

@Garrett: 15 seconds is not too often. Check the ping thread, there’s a long discussion about this. It may be problematic if a large number of devices are being pinged. I adjusted mine to 20 seconds and that gives me enough response time without waiting an entire minute to know the real state.

If you have to re-architect it so it can’t keep the standard switch API then I understand the decision not to. But I would think adding an extra trigger or two would not affect it.
That’s all it needs: the fusion of ping sensor, WOL plugin, and standard switch needs to have more than one trigger.

Is there a way to delete a single WOLPlusPing device without deleting all of the devices and the plug-in itself? When clicking the trash can for the one device I want to get rid of, then answering OK to the “Delete this device?” dialog, but then Cancel to the “Delete this plug in and all the devices it created”, nothing happens.

Thanks

If you have multiple devices created from this plugin, clicking the delete icon and accepting to delete the device should delete it and not affect the other devices that were created. The plugin files never really get deleted.

  • Garrett

[quote=“garrettwp, post:37, topic:172491”]If you have multiple devices created from this plugin, clicking the delete icon and accepting to delete the device should delete it and not affect the other devices that were created. The plugin files never really get deleted.

  • Garrett[/quote]

Garrett,

Just tested @bobk comment and it does remove all associated devices for the given app.
It deletes app regardless of how many were created thus the problem.
There is no verification to count devices before deleting app and subsequently deletes the app and all devices.
Of course you are correct, the files remain; however, this now either requires the user to reinstall the plugin of manually create new devices. Whichever way, this should not be the case.

See bug

@bobk modify the command below and enter it into your browser.
http://<Vera_IP>:3480/data_request?id=device&action=delete&device=<device_ID>

The Delete this plug in and all the devices it created dialog is unexpected I think (you get this question when uninstalling a plug-in).

Tried a random plugin, which happened to be the Combination Switch and created 3 instances; was able to delete just a single one of them and see the remaining two reported as having been created by the plug-in. Also, did not get the ‘delete plug-in’ question.

Did reproduce the problem for the WOLPlusPing plug-in.

I also tested this against two other apps, Global Cache and Smart Switch and received the same results; however, it did not occur for Combination switch multi devices.