Did you ever solved this? My detection_time is 120 sec but it takes about 5-10 min to set device not_home. Does it check the detection_time in the first place?
I’m working on additional improvements to state handling of unifi device tracking. I hope to get it ready for 0.110
not really, seems to be timeout of the device on the controller in my opinion
Hi everybody!
I have hassio last release (0.109) in a raspberry and unifi controller software running in another raspberry.
Is there a solution to use unifi controller as device tracker with my configuration?
EDIT:
Sorry, i have seen the integration now
Hi!
I have problem with Unifi presence detection constantly toggling my network gear home/away. Whole my logbook is flooded with it:
I have already tried to setup integration from beginning, modify consider_home time, restarted everything, updated Unifi to last availabe firmware. Nothing helped or changed that behaviour.
It is not happening all the time- for example, today the problem persisted from 0:45 to 1:58, then from 6:42 for couple of minutes.
My config:
- custom site
- Home assistant core 0.109.6@docker
- Hardware cloud key
Any idea what may be the cause?
There are improvements to unifi integration and it’s device tracker implementation in 0.110. Beta is out if you want to try it out
So far I have to say that adding the ability to remove the “wired bug” fix has definitely improved things greatly.
I disabled it and I haven’t had any issues that i’ve seen with my devices showing away when connected to non-unifi stuff.
Thanks for that modification.
Hopefully the next phase will be even better.
Thanks for info. For now I disabled most of my device trackers, so I’ll wait for 0.110 stable. Hope it’ll fix that behavior.
Thanks for the feedback, glad it improved your situation. Not withstanding possible bugs Im quite happy with the state of the code in 0.110. It has become rewritten in a much more maintainable way
Unfortunately after updating to 0.110.1 problem still exists. I’ve even tried to remove whole integration and add configure it again, but it’s the same- state of unifi devices if flickering between home/away every couple of seconds.
Create a new issue on GitHub with detailed logs
Did you end up creating an issue on GitHub? I’m having the identical problem of my Unifi gear rapidly switching between home and away on 0.110.4.
I can’t manage to make it work, maybe a firewall or DPI issue?
Gateway : UDM PRO
Home Assistant OS on Raspberry PI 4 in IoT VLAN.
conf file :
device_tracker:
- platform: unifi
host: !secret IOT_IP
username: !secret unifigateway_user
password: !secret unifigateway_pwd
verify_ssl: false
detection_time: 10
new_device_defaults:
track_new_devices: false
logs :
Logger: homeassistant.setup
Source: components/device_tracker/legacy.py:279
First occurred: 21:47:32 (1 occurrences)
Last logged: 21:47:32Error during setup of component device_tracker
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/setup.py”, line 213, in _async_setup_component
result = await task
File “/usr/src/homeassistant/homeassistant/components/device_tracker/init.py”, line 52, in async_setup
await async_setup_legacy_integration(hass, config)
File “/usr/src/homeassistant/homeassistant/components/device_tracker/legacy.py”, line 153, in async_setup_integration
legacy_platforms = await async_extract_config(hass, config)
File “/usr/src/homeassistant/homeassistant/components/device_tracker/legacy.py”, line 279, in async_extract_config
raise ValueError(
ValueError: Unable to determine type for unifi: None
using the main LAN IP :
Logger: homeassistant.setup
Source: components/device_tracker/legacy.py:279
First occurred: 22:01:41 (1 occurrences)
Last logged: 22:01:41Error during setup of component device_tracker
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/setup.py”, line 213, in _async_setup_component
result = await task
File “/usr/src/homeassistant/homeassistant/components/device_tracker/init.py”, line 52, in async_setup
await async_setup_legacy_integration(hass, config)
File “/usr/src/homeassistant/homeassistant/components/device_tracker/legacy.py”, line 153, in async_setup_integration
legacy_platforms = await async_extract_config(hass, config)
File “/usr/src/homeassistant/homeassistant/components/device_tracker/legacy.py”, line 279, in async_extract_config
raise ValueError(
ValueError: Unable to determine type for unifi: None
You should set it up using integrations page in the gui. Yaml hasn’t been supported for a long time
I have an issue with the integration, probably something to do with linux epoc time, when it’s enable I have wrong data, e.g :
MacBook Pro WiFi (2020) Uptime
2673 weeks ago
That has been fixed, will be out with next release
thank you !
Can I use an EdgeRouter X SFP or an UAP-AC-Lite to menage Presence Detection?
If so, how can I acomplish that?
This all depends on home assistant communicating with the unifi controller and gateway. Additional hardware can be mixed
When I try to configure the Unifi component I always get an error…
Should I place the Router IP or the AP IP? None of them are working.