rtyle/wake-on-lan

Won’t turn on TV

Closed this issue · 5 comments

Hi! I got this app installed and connected to a switch. I can see that it’s running, but my device (Samsung TV model U) won’t turn on.

The MAC address is correct, and I can see in the logs that it’s running but I can also see a log message that says “doesTvSupportVoice TV: false”. Does that mean it won’t work?

I can confirm that the TV actually does support WOL, I can send a magic packet directly to it and it turns on.

A question for my own diagnostics, what’s the specific method that SmartThings is using to trigger the WOL? Does it try to send a magic packet over the public internet? In that case I would need to open up a port no?

Separately, I see that Alexa devices now seem to support WOL directly: https://developer.amazon.com/en-US/docs/alexa/device-apis/alexa-wakeonlancontroller.html#supported-devices. Is that something I should be looking at instead of going through SmartThings?

rtyle commented

It doesn't seem like you are using this SmartApp.
It is pretty simple:
https://github.com/rtyle/wake-on-lan/blob/master/smartapps/rtyle/wake-on-lan.src/wake-on-lan.groovy
You can see that it doesn't log anything like what you are reporting.

This is the code that causes the WoL packet to be sent by your SmartThings hub on its LAN.
Your TV must be on the same LAN.

sendHubCommand(new physicalgraph.device.HubAction("wake on lan $targetMacAddress", physicalgraph.device.Protocol.LAN, null))

rtyle commented

https://docs.smartthings.com/en/latest/cloud-and-lan-connected-device-types-developers-guide/building-lan-connected-device-types/building-the-device-type.html#wake-on-lan-wol

The last parameter is a map representing the options on the request. For a WOL request, this map will only ever consist of one parameter, secureCode. Some NIC’s support the SecureOn feature which requires the request to not only have a valid mac address, but also supply a valid password. This password must be configured on the NIC. If the NIC does not support SecureOn or does not have a password set, simply leave out the options map.

My TV does not require a secureCode, hence I did not code for one.

Yes, I’m definitely using this app and I do see the debug “WOL” message.

However, I don’t have a separate Smart Hub, just my TV. So likely the TV can’t send a WOL to itself ;-)

I managed to get it working with the WOL Alexa skill which uses Alexa to send the WOL to the TV. It works, just isn’t as ideal as having everything connected in SmartThings.

rtyle commented

Yes, you need an agent on your LAN to send the unroutable WoL packet.
A SmartThings hub is required by this SmartApp.
They are pretty cheap:
https://www.amazon.com/Samsung-SmartThings-Generation-GP-U999SJVLGDA-Automation/dp/B07FJGGWJL