Closed angelflames1337 closed 2 years ago
Are you running Windows? It seems like if your computer is ignoring pings. Can you try to ping your computer from another host via a terminal?
If I remember correctly, you’ll need to enable some setting under printers and sharing.
Correct it is running Windows. I don’t have any other terminal, but the PC is pingable from literally everything else (phone, other pc, and from homebridge terminal itself). I allowed the network discovery and disable the firewall but issue still persists.
I haven't seen this issue before. Basically the plugin uses the provided IP without alteration and that code has been the same since the first version. The only thing I could image it could be is that pinging could require elevated privileges. But since you're able to ping from the homebridge terminal itself, I think it's safe to say we can rule that one out.
For sanity's sake, could you try the new version (https://github.com/AlexGustafsson/homebridge-wol/issues/124)?
Tried the beta, same thing. If it makes any difference, I am running this from docker.
Try the following on the server running Docker.
List all running containers (you may need sudo).
docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
...
Find the homebridge server (identified either by name, command or image. Make a note of it's container id. Enter the container by running the following code.
docker exec -it my-container-id sh
Now, try to ping the computer's IP, your router and some other devices on the network.
ping 192.168.1.1
ping 192.168.1.109
ping 192.168.1.80
Does this work? If it does, then there's still an issue. If it doesn't, then your container isn't able to see your local network.
Since I assume the rest of your plugins work, there likely isn't any issue here. But it's one thing we'll have to rule out first.
Yeah, I am able to ping the PC
root@omv:~# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
c47f488dfb30 linuxserver/transmission:latest "/init" 8 days ago Up 17 hours 0.0.0.0:9091->9091/tcp, 0.0.0.0:51413->51413/tcp, 0.0.0.0:51413->51413/udp transmission
29d4b787e2d8 oznu/homebridge:latest "/init" 9 days ago Up 17 hours homebridge
f9f8ca9936b1 portainer/portainer-ce "/portainer" 9 days ago Up 17 hours 0.0.0.0:8000->8000/tcp, 0.0.0.0:9000->9000/tcp portainer
root@omv:~#
root@omv:~# docker ex
exec export
root@omv:~# docker exec -it 29d4b787e2d8 sh
/homebridge # ping 192.168.1.109
PING 192.168.1.109 (192.168.1.109) 56(84) bytes of data.
64 bytes from 192.168.1.109: icmp_seq=1 ttl=128 time=1.12 ms
64 bytes from 192.168.1.109: icmp_seq=2 ttl=128 time=0.549 ms
Could it still possibly be docker issue, just not network issue? I used to run homebridge standalone on pi and it works fine.
Although it could be a Docker issue, it seems unlikely. I'm running oznu/homebridge
myself and it works. There are also tests for this plugin using the very same image.
Can you check that you've started homebridge with --network=host
?
docker inspect 29d4b787e2d8 | grep "NetworkMode"
We want it to look like so:
"NetworkMode": "host",
And not like this:
"NetworkMode": "default",
Yeah it looks correct
root@omv:~# docker inspect 29d4b787e2d8 | grep "NetworkMode"
"NetworkMode": "host",
I'll try grabbing work laptop tomorrow and test to verify it is not PC issue.
I am pretty sure it has something to do with the machine you are trying to wake. I had the wol plugin from the very beginning, (Thanks Alex for the great job!) for waking up my main machine and it would “keep the state”. And still does. As long as the PC is on I can see it “lit”/on in the home app. I just added another win PC to the plugin today. Wakes fine, so obviously works, and pings. However, the Home app brielfly shows it on and then, a few seconds later it returns to OFF even though the PC is still up and running. Since I run the same homebridge instance for both but only one reflects the correct state I can only assume it is something with the PC or with my router. Nonetheless I am curious about a solution to this too.
@dragosde Thank you for the kind words.
All platforms should support responding to pings. Can you validate that you've set up the target to respond to them? The procedure is different for every operating system.
I'm closing this as it doesn't seem to be a bug in the plugin. If you've solved the issue, please write your solution here. If the issue persists, try open a discussion about it and we'll take it from there.
WOL and shutting down is working fine, but the plugin will not recognize the PC state (up). I've played around with the timeout, without any result. Below is the log:
[1/17/2021, 9:46:05 PM] [Alienware] Attempting to ping "Alienware" (192.168.1.109) [1/17/2021, 9:46:05 PM] [Alienware] Result of pinging "Alienware" (192.168.1.109): offline [1/17/2021, 9:46:07 PM] [Alienware] Attempting to ping "Alienware" (192.168.1.109) [1/17/2021, 9:46:07 PM] [Alienware] Result of pinging "Alienware" (192.168.1.109): offline [1/17/2021, 9:46:09 PM] [Alienware] Attempting to ping "Alienware" (192.168.1.109) [1/17/2021, 9:46:09 PM] [Alienware] Result of pinging "Alienware" (192.168.1.109): offline [1/17/2021, 9:46:09 PM] [Alienware] Got 0 positives out of 5
Pinging from homebridge terminal looks ok, so the IP seems to be reachable from homebridge:
/homebridge # ping -c 2 192.168.1.109 PING 192.168.1.109 (192.168.1.109) 56(84) bytes of data. 64 bytes from 192.168.1.109: icmp_seq=1 ttl=128 time=0.316 ms 64 bytes from 192.168.1.109: icmp_seq=2 ttl=128 time=0.422 ms
Below is the plugin and homebridge versions, everything is at the latest:
homebridge-config-ui-x v4.36.0 homebridge-wol v4.3.0
Below is my config.json.
Appreciate your help, thanks.