[RELEASE] Advanced Wake On Lan (WOL) Addon - Wake up a remote computer/server - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33) +--- Forum: Add-on Support (https://forum.kodi.tv/forumdisplay.php?fid=27) +---- Forum: Program Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=151) +---- Thread: [RELEASE] Advanced Wake On Lan (WOL) Addon - Wake up a remote computer/server (/showthread.php?tid=121142) |
[RELEASE] Advanced Wake On Lan (WOL) Addon - Wake up a remote computer/server - mandark - 2012-01-26 The Addon "Advanced Wake On Lan" allows you to wake up a sleeping computer by sending a WOL magic packet using its ethernet MAC address. It displays a notification if and when the computer is available, or an error message, if the computer did not wake up during a configurable timeout. Feature Overview:
Usage Details:
Download:
- BORIStheBLADE - 2012-01-27 Nice! I will give it a try when I get a chance. I have been thinking about how nice it would be for my server to spin up the HD's when I turn on a XBMC box in my house. - mandark - 2012-01-28 the addon is available via the official XBMC-addon-repository now (for XBMC Eden only). - TheLexus - 2012-02-02 Hi Mandark, great, i like your plugin and have one request, maybe you have a little time to add it. I use a self build NAS which wake up using wol and stays awake until no wol packet arrive in a time period. In the past i used a python skript on my xbmc to continues sending wol packets. Could you add such a continues send feature with a configurable delay between the packets to your plugin? Much thanks! TL - mandark - 2012-02-02 hi TL! i may be wrong, but i think it's a bit unusual to keep a server or NAS awake by continuously sending WOL-packets. the purpose of WOL-packets is to wake up devices, not to keep them awake. is this an official feature of you NAS? most solutions i know of solve this problem the other way round. once the server is awake, a service on the server itself is continously looking, if predefined clients are still present, and goes back to sleep, if there are none. examples would be the lightsout-addon of Windows Home Server or the tool SmartPower for Windows. i'm sure tools with similar functionality exist for other platforms (linux, mac, etc.). maybe you could change your NAS-setup to implement such a solution? - TheLexus - 2012-02-03 Hi, yes of course. The purpose is to wake up. But the other way around is not that simple to implement if you run many services like nfs/samba/http server. Each of them must be checked. Its possible but it is far more easier to track some pakets like wol and keep the server running. As far as i know buffalo uses this technique and i catched it up on my own software used to manage my nas (its home build running Ubuntu Server). Would be nice if you consider to implement that feature, even if its not useful for the masses. If you have no time i can take a look and make a patch. Bye TL - TheLexus - 2012-02-03 Ok. Here is a small patch, maybe you want to add it to the main source: Code: diff -rupN script.advanced.wol/autostart.py script.advanced.mod.wol/autostart.py error - UDM1 - 2012-02-03 Hi Mandark, first I want to thank you for this great Addon! I have only a small error and it would be very nice if you could help me to fix this. My Hardware setup: - E45M1-I DELUXE (AMD FUSION) - 60GB SSD - 4GB RAM My Software Setup: - OpenELEC_BUZZ-Fusion.x86_64-devel-20120131182836-r9772.tar.bz2 - It's a Fusion build based on the beta of eden What I want: I want that the WHS boots up when I start the htpc in my living room and shut down when I suspend/shutdown the htpc. The problem: I have an old WHS (Lenovo Idea Center D400) with Lights out etc... In generally the addon works great and it does a great job. Everything works great... ...but when I start the HTPC I got first the normal Popup in my xbmc for waking up the WHS and directly after that I got an separate popup which said: script-fehler!: autostart.py So my question is: Where in the system can i find the autostart.py and have you any logs enabled so that i can deliver you furter information to get this? Thanks in advance Edit1: Sorry i forgot to Post my settings. My settings Look exactly like yours on your Screenshot. Mac, Hostname, 30, dot - bassic - 2012-02-04 I have the advanced wol addon on an appletv2 and a windows 7 box. Very handy thing. On the apple it wakes up my synology nas as expected. On windows it works fine too but it gives a socket error message even tho it worked. It says an attempt was made to access a socket in a way forbidden. It would also be nice if the settings page had the option of running the addon silently. No need for any messages once it's working ok. - mandark - 2012-02-04 i'm glad you guys find this addon useful! TheLexus Wrote:Ok. Here is a small patch, maybe you want to add it to the main source:very cool, thanks! i'll definitely add that feature to the main source. UDM1 Wrote:...but when I start the HTPC I got first the normal Popup in my xbmc for waking up the WHS and directly after that I got an separate popup which said: script-fehler!: autostart.pya script-error should normally not happen. that means there is a bug somewhere. the error should show up in the file "xbmc.log", which should be in your XBMC-user folder. could you please post the error-entries, that show up in there when the error happens? bassic Wrote:It would also be nice if the settings page had the option of running the addon silently. No need for any messages once it's working ok.that's a good idea. i'll definitely implement this in the next version. i'll make two options for this: [o] enable notifications [o] enable verification-notifications this way you can disable notifications completely or just the wake-up-verification-notifications. bassic Wrote:On windows it works fine too but it gives a socket error message even tho it worked. It says an attempt was made to access a socket in a way forbidden.this means, that the verification of the wake-up-process can not send ping-requests to the remote computer to determine, if it has awoken correctly. i think this only works, if the user, under which XBMC is run has administrative rights in windows (or root-rights in linux respectively). are you running XBMC with a standard-user or an administrative-user? if you don't want to or can't run XBMC with administrative rights, than i'm afraid you can't use the verification-feature of this addon. but after i have implemented the disabling of notifications, you can completely disable that feature, and at least you won't get that error anymore. - bassic - 2012-02-05 Yeah Mandark I'm running xbmc as a standard user so that's probably the cause of the message. Thanks again for this addon, very convenient when your library is on a nas. - mandark - 2012-02-05 bassic Wrote:Yeah Mandark I'm running xbmc as a standard user so that's probably the cause of the message.thanks for the info! i'll implement a more meaningful error message in this case. - UDM1 - 2012-02-05 Hi Mandrake, here you have a link to my xbmc log directly after startup and let my htpc boot up my whs. http://pastebin.com/QcvTkvHY And here I have some shots from the two Popus directy after startup: First popup: Second Popup with the error: I hope this will help... - jhay610 - 2012-02-06 @ OP: Great add on -- Thanks! @ UDM1: I had this exact error you are seeing and judging from the logs it looks like the script attempts to ping the PC you have set to automatically WOL at boot of XBMC. I have zero experience with python but after looking at this my best estimation is that your XBMC install will ping the machine it sends the magic packet to and return an error if there is no response. In my case my server needs better than 60 secs to run through its boot sequence so this script returned the error you see every time I cold booted my set up. I am sure you could play around with the sleep or timecount values to get this working for your specific needs but I honestly don't need this function (although I can see how it would be useful) so as a workaround I just commented out everything from line 51 down in /storage/.xbmc/addons/script.advanced.wol/default.py This fixed me right up -- still sends the packet on boot but no more annoying error message. I'm sure the developer or someone with python scripting acumen can give you a more elegant solution but this suits my needs and might serve as a temporary fix for you. - mandark - 2012-02-07 UDM1 Wrote:Hi Mandrake, many thanks UDM1, but the info in the log is not enough to pinpoint me to the source of the problem. i'd have to debug this error with an openELEC-build myself, but at the moment i've no possibility to setup such a build, sorry. but as jhay610 has already suggested, the problem lies with the hostup-check performed by trying to ping the remote computer after sending the wakeup-signal. if you don't need this feature, you can completely disable that part via the settings in the new version of the addon - so there is no need to comment out any code. this should get you rid of the error-message. i have made a new version implementing the new features you guys have suggested. you can download version 1.1.0 of "Advanced Wake On Lan" here. these are the changes:
@everyone: please give some feedback, if the requested features are working as intended. i'll wait until i get positive feedback from you before i submit it to the repository. |