AlexGustafsson / homebridge-wol

A Wake on Lan plugin for Homebridge
MIT License
301 stars 30 forks source link

WOL works with router UI, but not with homebridge-wol #16

Closed lyance closed 7 years ago

lyance commented 7 years ago

Hi, The WOL to my Ubuntu desktop does not work (it doesn't wake up when switched ON using homebridge-wol) for me. But if I use my Asus router's UI (where my Ubuntu desktop is connected to) to send a WOL packet, it works fine. The rest of the features (like shutdown) in homebridge-wol is working fine. Can you advise what's wrong with my setup? Thank you.

"accessories": [ { "accessory": "Computer", "name": "UbuntuPC", "mac": "50:e5:49:xx:xx:xx", <<< I masked off my real MAC addr "ip": "192.168.1.11", "pingInterval": 45, "wakeGraceTime": 30, "shutdownGraceTime": 15, "shutdownCommand": "ssh louie@192.168.1.11 sudo poweroff" }

Homebridge log: Latest events first

2017-03-18 13:01:16 UbuntuPC(192.168.1.11) was just turned off 2017-03-18 13:01:16 Computer shutdown cycle started for UbuntuPC(192.168.1.11) 2017-03-18 13:01:16 Setting grace timer for UbuntuPC(192.168.1.11) for 15000ms 2017-03-18 13:01:16 Canceling currently running grace timer for UbuntuPC(192.168.1.11) 2017-03-18 13:01:16 Attempting to shut down UbuntuPC(192.168.1.11) using "ssh louie@192.168.1.11 sudo poweroff" 2017-03-18 13:01:16 Turn UbuntuPC(192.168.1.11) off 2017-03-18 13:01:11 UbuntuPC(192.168.1.11) was just turned on 2017-03-18 13:01:10 UbuntuPC(192.168.1.11) was just turned on 2017-03-18 13:01:10 Computer awake cycle started for UbuntuPC(192.168.1.11) 2017-03-18 13:01:10 Setting grace timer for UbuntuPC(192.168.1.11) for 90000ms 2017-03-18 13:01:10 Canceling currently running grace timer for UbuntuPC(192.168.1.11) 2017-03-18 13:01:10 UbuntuPC(192.168.1.11) was just turned on 2017-03-18 13:01:10 Attempting to wake UbuntuPC(192.168.1.11, 50:e5:49:xx:xx:xx) 2017-03-18 13:01:10 Turn UbuntuPC(192.168.1.11) on

lyance commented 7 years ago

Not a homebridge-wol plugin issue. The problem was due to the WOL packet getting sent over the VPN interface, instead of the LAN. Thereby preventing the WOL packet from reaching the PC which was on the LAN. Since I don't have a way to tell homebridge the network interface (tun0 or eth0) to use by default, I'll turn off the VPN interface of my NAS (running homebridge in a docker container) for now while I look for a fix.

AlexGustafsson commented 7 years ago

Thank you for sharing the cause of the problem. Hopefully it could help others facing the same or similar problems in the future.