nitaybz / homebridge-network-presence

Homebridge plugin that provides occupancy sensor for devices presence in your network
MIT License
43 stars 7 forks source link

Devices and Homebridge on different VLAN's? #21

Open jkrogsgaard opened 3 years ago

jkrogsgaard commented 3 years ago

Hi I have homebridge on 192.168.30.1/24 but my devices are on 192.168.50.1/24 - Can you guide me to what firewall rules (ports etc.) I need to open to have this to work?

notorioustubze commented 3 years ago

I have the same issue and for the life of me I can't figure it out. Any help would be greatly appreciated.

notorioustubze commented 3 years ago

@jkrogsgaard Did you get a solution to this?

pax0707 commented 2 years ago

It works fine for devices on the same VLAN but there's nothing in logs for device on other VLAN. Pi can ping it normally.

[2/11/2022, 12:18:44 AM] [NetworkPresence] Found Cached Accessory: TV Ping (172.16.3.50) 
[2/11/2022, 12:18:44 AM] [NetworkPresence] Found Cached Accessory: Skidalica Ping (172.16.1.7) 
[2/11/2022, 12:18:44 AM] [NetworkPresence] Found Cached Accessory: Vobiscum Ping (172.16.1.9) 
[2/11/2022, 12:18:44 AM] [NetworkPresence] Initiating Network Scanner...
[2/11/2022, 12:18:45 AM] [NetworkPresence] Adding "Skidalica Ping" Occupancy Sensor Service
[2/11/2022, 12:18:45 AM] [NetworkPresence] [Skidalica Ping] - Listening to ip:172.16.1.7
[2/11/2022, 12:18:45 AM] [NetworkPresence] Adding "Vobiscum Ping" Occupancy Sensor Service
[2/11/2022, 12:18:45 AM] [NetworkPresence] [Vobiscum Ping] - Listening to ip:172.16.1.9
[2/11/2022, 12:18:45 AM] [NetworkPresence] Adding "TV Ping" Occupancy Sensor Service
[2/11/2022, 12:18:45 AM] [NetworkPresence] [TV Ping] - Listening to ip:172.16.3.50
.....
[2/11/2022, 12:18:45 AM] Homebridge v1.4.0 (HAP v0.10.0) (HomeBridge) is running on port 51877.
[2/11/2022, 12:18:46 AM] [NetworkPresence] [Skidalica Ping] - connected to the network (mac: xxxx | ip:172.16.1.7 | hostname:Skidalica)
[2/11/2022, 12:18:46 AM] [NetworkPresence] [Vobiscum Ping] - connected to the network (mac: xxxx | ip:172.16.1.9 | hostname:Vobiscum)
pi@raspi:~ $ ping 172.16.3.50
PING 172.16.3.50 (172.16.3.50) 56(84) bytes of data.
64 bytes from 172.16.3.50: icmp_seq=1 ttl=63 time=0.955 ms
64 bytes from 172.16.3.50: icmp_seq=2 ttl=63 time=0.974 ms
64 bytes from 172.16.3.50: icmp_seq=3 ttl=63 time=1.08 ms
64 bytes from 172.16.3.50: icmp_seq=4 ttl=63 time=5.47 ms
64 bytes from 172.16.3.50: icmp_seq=5 ttl=63 time=4.32 ms
64 bytes from 172.16.3.50: icmp_seq=6 ttl=63 time=20.4 ms
^C
--- 172.16.3.50 ping statistics ---
6 packets transmitted, 6 received, 0% packet loss, time 12ms
rtt min/avg/max/mdev = 0.955/5.538/20.432/6.892 ms
pi@raspi:~ $ 
MycroftVonLipwig commented 2 years ago

I have the same issue. Can ping from the Pi but plugin does not "detect" them. I have IP, MAC and FQDN configured but nothing works for devices not on the same subnet. I have tried "arp -a" and I can only see local subnet so assume this plugin does not ping but looks at the ARP broadcasts?

galaxydpw commented 2 years ago

same issue here. plugin could be useless if this is not sorted, as I have now 2 plugins to manage all the IPs.

my non-detected ones are over a vpn on wireguard and they have different network. Local ones are 192.168.240.0/24 and remote IPs are 172.16.1.0/24 and 192.168.88.0/24. all properly routed and accessible from both either Linux and Windows devices.

And some ones are critical, as they are CCTV IP cameras.

itsthejb commented 10 months ago

@MycroftVonLipwig Yes it uses Arp.

I had the same problem but just trying out https://github.com/vectronic/homebridge-ping-hosts which most definitely works using ping. The plugin seems a bit abandoned, but seems to do the job, and as observed here I don't believe arp can possibly work for this case, whereas ping can