i use this with alexa
is there a way to check if the wol worked
i posted the wrong code
Wake on lan question
What is the LAN device? Can’t you go check to see if it woke up?
Also, you have a nested IF that has no trigger (turning on Switch 1), which doesn’t make sense to me.
the only way i can get alexa to work is to turn the switch off other wise it does not work the next time used
So I am guessing this is a virtual switch. You turn on the switch through Alexa, do a wake-on-lan, then flip the virtual switch back off so it’s ready to go again. Is this right?
Bry is correct - you need to get rid of the nested IF. It’ll never fire without a trigger.
if
–switch changes to on
then
–with location
----send WOL
–end with
–with switch
----turn off
–end with
end if
There is no way to know if the WOL actually worked. There’s no feedback, just blindly sending a WOL request to a MAC address. Like Bry said, walk over and look. You could probably take a look at some of the smartapps that look for a device on the network e.g. ping request, but I don’t think it’ll be anywhere near timely enough to consider that a response.