Hey Guys,
is it possible to send a Wake On Lan Magic Packet with Plex Connect?
If not, you may think about to include this function, maybe with awake (python) or something else?
regards
Manuel
Hey Guys,
is it possible to send a Wake On Lan Magic Packet with Plex Connect?
If not, you may think about to include this function, maybe with awake (python) or something else?
regards
Manuel
PlexConnect doesn’t have this functionality but we do accept pull requests 
PlexConnect doesn't have this functionality but we do accept pull requests ;)
Uh, but i’m not a python coder and don’t know how to include it in plexconnect :(
I only use „awake“ on my Mac and call it in a applescript to start my Server while mounting some Shares.
Hopefully someone can do this ;)
Wait, do you want your computer running PlexConnect to wake the AppleTV, or do you want AppleTV to wake your computer?
Does AppleTV even understand WOL packets? If so this is what I came up with a short search:
#!/usr/bin/env python
import socket
s=socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
s.setsockopt(socket.SOL_SOCKET, socket.SO_BROADCAST, 1)
s.sendto('\xff'*6+'\x42\x42\x42\x42\x42\x42'*16, ('192.168.0.255', 9))
Change the script to your needs
- replace x42\x42\x42\x42\x42\x42 with own MAC address - keep the ‘\x’-prefixes
- replace 192.168.0.255 with own broadcast address
via http://braeutigamcommunications.blogspot.co.at/2013/02/send-wake-on-lan-magic-packet-per-bash.html
And regarding the other way around: Is it even possible to open a network socket via JavaScript and send arbitrary data to construct such a packet?
(Maybe something like this? http://www.mozdev.org/source/browse/jslib/libraries/network/socket.js?rev=1.6)
No, a unjailbroken ATV can't send WOL Pakets. But for workaround i want to use PlexConnect to send the MagikPaket.
Example:
I have a Mediaserver which sleeps and is waiting for WOL Paket.
I have a Jailbroken ATV 2 with PlexConnect running on it, or a other Machine in my Lan with PlexConnect running.
If some device connecting to PlexConnect and PlexConnect have no active PlexMediaServers, it should send a WOL Broadcast to wake the PMS up.
So the wakeup function will work for any device which is connecting to PlexConnect.
In that case my Python example is probably the best pointer in the right direction.
You have the PMS' IP Adress in PlexConnect's settings, so it should be trivial to send the WOL packet.
I set up my computer running PlexConnect and PMS to wake on lan and use an app from my mobile device to wake it up... thats pretty simple, right?
You can't send a magic packet via javascript/websocket, but from python/bash it is easily done; Azathoth's example is the easiest to implement.
i've tested this code
#!/usr/bin/env python
import socket
s=socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
s.setsockopt(socket.SOL_SOCKET, socket.SO_BROADCAST, 1)
s.sendto('\xff'*6+'\x42\x42\x42\x42\x42\x42'*16, ('192.168.0.255', 9))
Change the script to your needs
- replace x42\x42\x42\x42\x42\x42 with own MAC address - keep the ‘\x’-prefixes
- replace 192.168.0.255 with own broadcast address
and seems to work... now the question is...
where i have to put it, to get plexconnect power on my nas when needed?
Did you find out where to place this code? I have the same need and would love to implement a solution like this.
Two valid options from my point of view:
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.