core: luci device_tracker fix from 0.115.x incorrectly reports devices status
The problem
I use this add-on to check the state of tv/sat/audio and many other devices.
My main openwrt device is a hp t5730 with old OpenWrt 18.06.1 and serves the network for cable devices via 1G switch a TPLink(19.07.4) lan <-> wifi bridge is also connected to this switch.
So…luci-device-tracker is associated with the main cable router which is the dhcp server… and everything was working fine until this: https://github.com/home-assistant/core/pull/40160. From 0.115, some of my automations suddenly went crazy! and this applies to all devices, connected by cable and wifi every ~2 minutes their status changed home/away/home etc…
Today i found this: https://github.com/home-assistant/core/pull/40160 and at 21:10 I removed the fix temporarily and everything seems to be working fine again!
P.S. The fact that some devices remains in the dhcp table (after they physically disappear) I solved some time ago on openwrt router via shell script which every 5 minutes (from crontab) performs a ping for all devices on my subnet. This has completely eliminated reporting devices at HOME that are physically no longer in the network.
for i in $(seq 1 253)
do
(ping 192.168.0.$i -c 1 -w 5 >/dev/null && echo "192.168.0.$i" &);
done
so it’s not an add-on problem itself
Environment
1 | 2 |
---|---|
arch | armv7l |
dev | false |
docker | false |
hassio | false |
installation_type | Home Assistant Core |
os_name | Linux |
os_version | 5.4.51-v7+ |
python_version | 3.7.3 |
timezone | Europe/Warsaw |
version | 0.115.2 |
virtualenv | true |
- Home Assistant Core release with the issue: 1.115.x
- Last working Home Assistant Core release (if known): 1.114.x
- Integration causing this issue: luci device_tracker
- Link to integration documentation on our website: https://www.home-assistant.io/integrations/luci/
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 34 (27 by maintainers)
I promise to close if all of us confirm that it doesn’t work worse than before the original fix 😄
@cagnulein - for me Your patch works from this moment: https://github.com/home-assistant/core/issues/40370#issuecomment-696152899
@reaper7 @fnordpojk check https://github.com/home-assistant/core/pull/40524 and confirm that it works
@reaper7 I did not close this thread intentionally it was closed due to merging a PR that stated that it would fix this issue.
I will reopen it if the PR did not solve the problem for everyone 😃
@cagnulein - “we”, on the other hand, had no problems with this addon before fix 😉 😄
with latest fix also ok 😃
I’m not sure if I applied Your fix correctly but I get this error: Version object has no attribute major
I’ll check it again when I get home
@fbradyirl I’m fixing it using the openwrt version. I’ve done, I have only to pull it