Kodi Community Forum
Automatic WOL - Confused - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111)
+---- Forum: Raspberry Pi (https://forum.kodi.tv/forumdisplay.php?fid=166)
+---- Thread: Automatic WOL - Confused (/showthread.php?tid=195424)



Automatic WOL - Confused - archie456 - 2014-05-17

Hi,

I'm running OpenELEC, Gotham on a Raspberry Pi, and am slightly confused as how Automatic Wake on Lan work.

I watch TV programs from a another computer on my network which is set to sleep whenever possible.

Auto WOL seems the answer to my issues about waking it.

When I turn on the PI, and open up the videos Auto WOL jumps in a wakes the remote computer and I can watch my files - everything works fine.

But, I don't turn off my PI and if the remote computer then sleeps (sometime later) XBMC doesnt pick this up and doesn't issue an automatic WOL command and I get an error when I try to play a video.

I was expecting it to issue a WOL command everytime I select videos, but that doesn't seem to happen.

Am I missing something?

Cheers.


RE: Automatic WOL - Confused - Ned Scott - 2014-05-20

From what I understand, it should send another WOL command. Can you get us a debug log (wiki) of when this happens?


RE: Automatic WOL - Confused - t4_ravenbird - 2014-05-20

It should send another WOL command, yes, but only if enough time has passed.

This time is specified in the parameter 'timeout' as described here ; http://wiki.xbmc.org/index.php?title=Wake_on_lan
That parameter should be less or equal to the idle-timeout used by the server to go to sleep


RE: Automatic WOL - Confused - archie456 - 2014-05-20

Ned,

Annoyingly whilst I could repeat the issue twice, I couldn't do it when the file logging was enabled, though something slightly different happened:

When logging was not enabled:

- I XBMC was running, I clicked on a video folder in favorites from the menu, XBMC loaded thumbnails for the videos and, I selected one and the video played.
- I then put the remote PC (where the videos were stored) to sleep.
- in XBMC I clicked on video folder (from favorites), XBMC hanged for about 30 seconds to a minute and then displayed an error something along the lines of 'invalid arguement'.

When logging was running log file: http://pastebin.com/EpdzUfXJ

- After rebooting, I slept the remote PC with the videos.
- When I clicked on videos from favorites, a message was displayed about waking the PC along with a percentage value. The remote PC woke, XBMC displayed the video thumbnails and I could play a video.

- I then slept the remote PC again.
- In XBMC I clicked on videos, the remote PC did not wake, but XBMC displayed thumbnails, when I clicked on a video, the PC woke and played the video - there was no message about waking the remote PC.

I tried a few more times, each time the PC sometimes woke when thumbnails were displayed other times not, one time the PC did not wake at all and nothing happened in when I clicked on the video.



I think that captured what happened.

Cheers.


RE: Automatic WOL - Confused - t4_ravenbird - 2014-05-20

(2014-05-20, 21:34)archie456 Wrote: - I then put the remote PC (where the videos were stored) to sleep.

You may not do that ; it will screw up the timeout. Let the server be alone until it sleeps by itself and make sure that "wake-on-access-timeout-parameter" <= "server-idle-timeout-before-suspend"


RE: Automatic WOL - Confused - archie456 - 2014-05-21

(2014-05-20, 22:07)t4_ravenbird Wrote:
(2014-05-20, 21:34)archie456 Wrote: - I then put the remote PC (where the videos were stored) to sleep.

You may not do that ; it will screw up the timeout. Let the server be alone until it sleeps by itself and make sure that "wake-on-access-timeout-parameter" <= "server-idle-timeout-before-suspend"

The PC is set to power save and so will sleep whenever idle - won't that screw up the timeout too?


RE: Automatic WOL - Confused - t4_ravenbird - 2014-05-21

No.
The parameter is telling XBMC that after the server has been woken it will stay on until timeout has passed, so no further wakeup is required until then.
When you force-sleep the server prematurely you break that prerequisite.

It seems that you expect wakeup check to be done always - and that would have been the safest, probably - but there is a problem with it too ; Wakeup-logic is done immediately before every file-open and every database-transaction so starting to ping server on every access would cause heavy network traffic and cpu load ; a very intrusive solution.
Therefore a threshold is needed that defines how long time must pass until a new check (and wakeup) is done. This could have been a predefined, low timeout value, maybe - but in the end it was made as a parameter.


RE: Automatic WOL - Confused - archie456 - 2014-05-21

t4_ravenbird - excellent, thanks for the explanation, that make sense now.

I'll check out the parameter, but I think I'm happy with how it currently is now that I understand how it works.

Cheers.