vectronic / homebridge-ping-hosts

Ping state sensor plugin for homebridge

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

mac addresses on different LANs shows as offline

mbierman opened this issue · comments

I've noticed that when I use mac addresses devices may appear offline when they are not. Best I can determine to reproduce is if the device defaults to offline and restart homebridge . Very soon after, devices on other LANs will show as disconnected when the lookup fails. Leaving it run for a while doesn't seem to fix it.

[8/20/2022, 12:36:03 AM] [@vectronic/homebridge-ping-hosts] [Obihai VOIP Online 192.168.155.3] closed_on_success: true
[8/20/2022, 12:36:03 AM] [@vectronic/homebridge-ping-hosts] [Obihai VOIP Online 192.168.155.3] startup_as_failed: true
[8/20/2022, 12:36:03 AM] [@vectronic/homebridge-ping-hosts] [Obihai VOIP Online 192.168.155.3] success_state: CONTACT_DETECTED
[8/20/2022, 12:36:03 AM] [@vectronic/homebridge-ping-hosts] [Obihai VOIP Online 192.168.155.3] failure_state: CONTACT_NOT_DETECTED
[8/20/2022, 12:36:03 AM] [@vectronic/homebridge-ping-hosts] [Obihai VOIP Online 192.168.155.3] success_state: CONTACT_DETECTED
[8/20/2022, 12:36:04 AM] [@vectronic/homebridge-ping-hosts] [Obihai VOIP Online 192.168.155.3] ARP lookup result: 9C:AD:EF:60:02:D9 => null
[8/20/2022, 12:37:04 AM] [@vectronic/homebridge-ping-hosts] [Obihai VOIP Online 192.168.155.3] response error: Error: Invalid IP address 'null' for null at Sat Aug 20 2022 00:37:04 GMT-0700 (Pacific Daylight Time) with session 719

I don't believe the MAC address lookup will work across LANs?

So I don't know the answer to that. Obviously routers that support 802.1q know how to do that but maybe there isn't a way to to ask the router based on Arp for a different network segment? You could be right that isn't possible unless the plugin is configured to know about local LANs and scans them. Perhaps that's asking too much.

I am going to close this as I don't think there is anything possible to do with pinging ARP on different subnets. This is what IP and routers and for...