2010-09-22, 20:36
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.
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=-
vdrfan Wrote:Hm, no need to script there actually. XBMC comes with a built-in command for sending the magic packet.
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.
- 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
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.
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
# 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
ryan03rr Wrote:if i need to send a mp to wake multiple mac could i do it with this script...this is going to sound hilarious to anyone that understands this shit...lol
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