Wake on Lan Plugin

With Bill’s help I have created a Wake on Lan plugin. To configure a device, in “WOLdevices” add a device and use its MAC address combined with its IP using a “/” separator for its “Id” field like “mac/ip”. For example “11:22:33.44:55:66/192.168.1.10”. You can use the “WOLdevicesTile.xaml” to WoL a device or just use a button and add an “EventTrigger” with “DataAction” where the device “MediaCommand = PowerOn”.
WOLdevices.plugin (1.4 KB) WOLdevicesTile.xaml (1.5 KB)

4 Likes

I took the code from here and integrated it into a different plugin, and it works just fine. However, I am unable to get it to work via VPN - what’s going on behind the scenes with “WOL.wake” that might be preventing it from working via VPN?

It sends a UDP broadcast of the “Magic Packet” to an endpoint of the address & port you specify. If you don’t specify an address, it’ll use defaults of 255.255.255.255 & port 7. For my integrations, I usually send 1 WOL command with the defaults, wait 500 ms, then send it again with the device’s IP address.

I don’t know if WOL is possible on a VPN. I’ve read online from folks saying it is & some saying it isn’t.

I will say, don’t only test in the simulator. Please test in the actual Android & iOS apps too. I’ve gotten feedback from other users that WOL doesn’t always work in simulator.

Hi guys,

Appreciate you sharing your work.

Quick question on this: I have been struggling to turn on LG flat screens using the LG media commands. It is possible to control everything with the commands except turning it on after a period of inactivity. Is the WOL concept (and hence the plugin) “universal” in nature or is it geared towards specific devices?

Thanks

Dennis

The device has to support WOL. It’s not universal to just any device with a network connection.

Some devices support WOL but have settings to turn it on or off. Newer LG TVs support WOL but you need to enable the “Mobile TV On” setting.

OK cool, yes I did enable that, but I wasn’t aware of the “magic packet” part of the equation.

It all makes sense now.

Thanks

Dennis