elad-bar / ha-edgeos

Integration with EdgeOS (Ubiquiti)
133 stars 24 forks source link

Binary sensor doesn't find the device connected #69

Closed b8192 closed 1 year ago

b8192 commented 1 year ago

Trying to add 2 devices to be monitored - it never finds them connected. I've verified using the ssh that I indeed have DPI & Export enabled. On the router: I've seen the IP of my device with the debugging when logging into the web UI of my router.

On HA: I can see the traffic received increasing. Further more, when I add my devices to the Tracked devices I can see "device_tracker.edgeos_xxx" being connected (it does see me "at home" and gets updates correctly) but for some reason the binary sensor ("binary_sensor.edgeos_device_xxx_MYIP") sees me disconnected.

No errors / warnings on the log

What am I missing :(? BTW my router's firmware version is "EdgeRouter Lite v2.0.9-hotfix.4 "

mastermc0 commented 1 year ago

I’m seeing the same since update to v2.0.5 possibly related to the change to use a binary sensor for non admin user?

elad-bar commented 1 year ago

Can you please enable store debug data? Once you will enable it, you will have in ha config/.storage a file that begins with edgeos. And ends with debug.*.json

Files contain details of the device, can you please share the 3 sections in json?

Please dont post the entire file, there are senstive data point over there

mastermc0 commented 1 year ago

It looks like the debug data shows the interface as up I think it's an issue in the logic have created a pull request that I believe fixes it.

"interfaces": { "eth0": { "addresses": [ "xxx.xxx.xxx.xxx/xx" ], "duplex": "full", "l1up": "true", "mac": "xx:xx:xx:xx:xx:xx", "multicast": 5.0, "rx_bps": 2866444.0, "rx_bytes": 1943947269989.0, "rx_dropped": 0.0, "rx_errors": 0.0, "rx_packets": 1677776274.0, "speed": "1000", "tx_bps": 72381.0, "tx_bytes": 387510325734.0, "tx_dropped": 0.0, "tx_errors": 0.0, "tx_packets": 694943864.0, "up": "true"

elad-bar commented 1 year ago

fixed in v2.0.7, please check

mastermc0 commented 1 year ago

All good now many thanks for the quick fix.

elad-bar commented 1 year ago

great, thanks for the update