Kodi Community Forum

Full Version: [RELEASE] Wake-On-Lan (WOL) Script Addon
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
A new Wake-On-Lan XBMC script dd-on is available for download from here. I have submitted it into the official XBMC add-on repository but can not tell when it becomes available.
Quick question for the noobs.

how would we take advantage of this assuming we had the HTPC set up to wake on lan, how does one go about waking it from with in the network after the addon has been configured with Mac Address of said "remote" computer in lan?

-=Jason=-
Hm, no need to script there actually. XBMC comes with a built-in command for sending the magic packet.
Flomaster Wrote:Quick question for the noobs.

how would we take advantage of this assuming we had the HTPC set up to wake on lan, how does one go about waking it from with in the network after the addon has been configured with Mac Address of said "remote" computer in lan?

-=Jason=-

The add-on allows you to wake another computer from inside XBMC. Presumably that is your media server that is usually headless, located in some remote place, like a rack in a basement, and goes to sleep automatically when not in use.

You don't need to wake your XBMC machine remotely as you can easily wake it up with the remote press when you are in front of the TV. At least this is the case that the add-on was created for.
vdrfan Wrote:Hm, no need to script there actually. XBMC comes with a built-in command for sending the magic packet.

You need a script to execute even a built-in command. Also an add-on has much friendlier UI with configuration and allows using it even by those who don't know what the hack is "a built-in command". Try to explain it to your wife or kids.
konan Wrote:You need a script to execute even a built-in command. Also an add-on has much friendlier UI with configuration and allows using it even by those who don't know what the hack is "a built-in command". Try to explain it to your wife or kids.

Presumably you could map the built in wake on lan to a button on the remote ...

JR
i have used the WOL-script for a while, but i was missing the notification of the success or failure of waking-attempt. additionally i'd also like to launch the remote-PC when accessing a certain favourite or (custom) menu-item. so i took things into my own hand and created a version 2.0.0 of the WOL-addon.

here are the changes:
Code:
- Added verification of wakeup-command by pinging remote computer
- Added on-screen-notifications during verification (waiting for answer, answer received or error)
- Added setting for IP or Host-Address (used for ping)
- Added setting for timeout (used for ping)
- Added possibility to provide another XBMC-command as a parameter, which will then be launched
  either immediately or not until the remote computer is available. Behaviour can be set by a second parameter:
  - False: launch immediately (default)
  - True: wait for remote computer
- Added german language
- Changed wakeup-method to the built in XBMC-command WakeOnLan()
- Changed Addon-Icon

and here a screenshot:
Image

download mirrors:
http://www.share.cx/files/353363771680/s...0.zip.html
http://www.megaupload.com/?d=IMZ9TKXR

@konan: i hope you don't mind, if i "hijack" your addon. :o
feel free to integrate my changes to sourceforge and/or submit an updated version to the XBMC-addon-repository!
I've been fooling around with this addon trying to get it to work. I have an HTPC in my living room full of hard drives. I have enabled SMB but I keep it in sleep mode. I now have an HTPC in my bedroom. Since all my media is on my living room htpc I want it to wake when I turn on my bedroom htpc. Both htpc's are running Windows 7

I installed the Wake On LAN addon but I'm having trouble configuring it. I tried entering the living room pc MAC address with "-" and when that didn't work ":" between the numbers and it's not working. I am assuming that with this addon enabled it automatically sends the magic packet when XBMC loads. I loaded a program called "WOL Magic Packet Sender" and was able to wake with that. That program requires the network location and the MAC address of the computer to send the magic packet too. Is there a format I should be using in the addon to get the IP and MAC in the configuration?
robothunter Wrote:I installed the Wake On LAN addon but I'm having trouble configuring it. I tried entering the living room pc MAC address with "-" and when that didn't work ":" between the numbers and it's not working.
using ":" would be right.

robothunter Wrote:I am assuming that with this addon enabled it automatically sends the magic packet when XBMC loads.
that is not the case. the magic packet is sent, when the addon is launched from your programs section of XBMC. from there you can e.g. add it to your favourites and launch it from there.

there might also be a way to let the WOL-addon get launched on XBMC-startup, but i don't know how.
Thank you. That's what I needed to know. It works now.
Can i use this addon to wakeup my server automatically when xbmc wakes from sleep?
Hi,

I use MySQL (to share and synchronize XBMC userdata profiles between multiple machines) which is installed on my Asrock 330HT on Windows 7 in living room.
I don't use it all the time, so it automatically go to "sleep".

But when is in "sleep" mode I can't (not able to connect to MySQL) run xbmc client on other laptop before I turn on Asrock. How I can send command "wake on lan" to my Asrock before or during start client on another PC/laptop ?
I can't launch addon from programs section of XBMC before Asrock (with MySQL) start before wake up from sleep mode.

Image

many thanks for any tips,
Regards
jhsrennie Wrote:XBMC has a wake on lan function built in. See http://wiki.xbmc.org/?title=List_of_Built_In_Functions

If you create a Python script called default.py and put it in your userdata folder XBMC will execute this script when it starts, and you can have this script send a WOL signal.

JR

unfortunatelly it's not working Sad

I've created default.py in C:\Users\%username%\AppData\Roaming\XBMC\userdata

Code:
# Wake-On-LAN
#
# Copyright (C) 2002 by Micro Systems Marc Balmer
# Written by Marc Balmer, [email protected], http://www.msys.ch/
# This code is free software under the GPL

import struct, socket

def WakeOnLan(ethernet_address):

  # Construct a six-byte hardware address

  addr_byte = ethernet_address.split(':')
  hw_addr = struct.pack('BBBBBB', int(addr_byte[0], 16),
    int(addr_byte[1], 16),
    int(addr_byte[2], 16),
    int(addr_byte[3], 16),
    int(addr_byte[4], 16),
    int(addr_byte[5], 16))

  # Build the Wake-On-LAN "Magic Packet"...

  msg = '\xff' * 6 + hw_addr * 16

  # ...and send it to the broadcast address using UDP

  s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
  s.setsockopt(socket.SOL_SOCKET, socket.SO_BROADCAST, 1)
  s.sendto(msg, ('<broadcast>', 9))
  s.close()

# Example use
WakeOnLan('aa:bb:cc:dd:ee:ff')    # Asrock

of course I replace aa:bb:cc:dd:ee:ff with my Asrock MAC address

anybody knows what could be wrong ?
if i need to send a mp to wake multiple macConfused could i do it with this script...
i assume id need to install multiple instances?

and it looks like the devs are saying i can use the function inside xbmc to send a mp... im checking the wiki now... is that the best way to say create 4 links(possibly favorites links) to pop on 4 hubs from within my main htpc window?
thanks
RT
ryan03rr Wrote:if i need to send a mp to wake multiple macConfused could i do it with this script...
i assume id need to install multiple instances?

and it looks like the devs are saying i can use the function inside xbmc to send a mp... im checking the wiki now... is that the best way to say create 4 links(possibly favorites links) to pop on 4 hubs from within my main htpc window?
thanks
RT
this is going to sound hilarious to anyone that understands this shit...lol

i tried changing the addon info to point it to a different folder
and set the name different ...bla bla bla..
basically i changed all in the addon xml to script.wol2
and folder the same....
didnt work.....go figure...

im tring to add multiple wol buttons to the transparecy skin.
linked from favorites...

anyway if anybody knows that be great. if i figure it out ill post results
double post i know... space cadet...lol
Pages: 1 2