nitaybz / homebridge-network-presence

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

No presence after reboot #22

Open davrodfer opened 3 years ago

davrodfer commented 3 years ago

Hi. I have installed homebridge-network-presence v1.2.3 with homebridge v1.3.4. in a raspberry pi with raspbian.

I'm triying to track an HP laptop (win10 pro) who has an issue that reboot the O.S. after a few hours. When this reboots occurs, in the homebridge's log appears:

[2021-4-19 14:24:32] [NetworkPresence] [OrdenadorTrabajo] - disconnected from the network (mac: d0:c5:d3:XX:XX:XX | ip:172.xx.2xx.1xx | hostname:?)

But when the laptop is online again, isn't detected.

When I reboot the homebridge process, the HP laptop is detected again.

[2021-4-19 16:19:06] [NetworkPresence] [OrdenadorTrabajo] - connected to the network (mac: d0:c5:d3:XX:XX:XX  | ip:172.xx.2xx.1xx | hostname:?)

This isn't a matter of time, between the laptop reboot and the homebridge reboot I waited 2 hours connecting and disconnecting the laptop from the network, and the homebridge-network-presence didn't noticed the presence.

This is my config:

 {
            "debug": true,
            "interval": 60,
            "threshold": 3,
            "anyoneSensor": false,
            "addressRange": "172.xx.2xx.0/24",
            "devices": [
                {
                    "name": "OrdenadorTrabajo",
                    "mac": "d0:c5:d3:XX:XX:XX",
                    "hostname": "win10.local",
                    "threshold": 9
                }
            ],
            "platform": "NetworkPresence"
  }

The hostname in config, is working, I can ping that name and the windows laptop responds.