Closed Spirituss closed 3 months ago
Hey there @kane610, mind taking a look at this issue as it has been labeled with an integration (unifi
) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)
unifi documentation unifi source (message by IssueLinks)
Please share a debug log
Please share a debug log
What version of unifi are you running
What version of unifi are you running
HA official Add-on, the last available version: UniFi Network Application Current version: 3.0.0
That's the addon version not the software version
That's the addon version not the software version
Network 8.0.7
Can you enable debug logging for the integration and share the logs?
Having the same issue.
HA Core 2023.12.2 Unifi Network Network 8.0.24
States in Unifi Network do show correct.
[Solved for me] Edit: The logs showed my user couldnt login anymore. Maybe because of new Unifi OS password length requirements. Changed the password to a longer (12+) length and updated the integration. Now it works again.
Having the same issue.
HA Core 2023.12.2 Unifi Network Network 8.0.24
States in Unifi Network do show correct.
[Solved for me] Edit: The logs showed my user couldnt login anymore. Maybe because of new Unifi OS password length requirements. Changed the password to a longer (12+) length and updated the integration. Now it works again.
Do you have the log output still? Would be nice to improve how to communicate things like that
I don't think it's the password. I'm facing the same issue and I have a long password. Also, the integration connects on HA start and when I click reload on the integration.
This is all I see in the logs:
Error connecting to the UniFi Network at 192.168.2.1:
Error connecting to the UniFi Network at 192.168.2.1:
Try restarting UniFi
The devices keep going offline. There is something wrong with this integration. I am not sure if Unifi AP is the answer (since I have 3 APs).
I also experience a client device tracker that keeps reverting to away 5 minutes after reloading the integration which is the only way to properly get the real state that I've found. Maybe I should create an automation that reloads the integration every 2 minutes to keep a stable device tracking solution? I'm mostly joking but only mostly
I might have some time for debugging over the Holiday break. Hopefully I'll find something
same problem here. I have changed the password, removed and added the Dream Router again, but it did not help.
After setting up a development environment to debug the issue in dev mode, I noticed that I wasn't able to reproduce it. The only difference was the integration setup. In my Dev environment, my user wasn't setup in advanced mode
which resulted a simplified setup flow for the Unifi Network integration.
Armed with this knowledge, I removed the integration in my prod environment, restarted HA, made my user a non-advanced one and re-created the integration along with my device trackers.
I'm happy, and confused, to report that the device tracking has been working as expected since then. I suspect it's an issue with having the previous integration config contain specific SSIDs to track on or because I added the tracking clients without an accompanying network block switch config (I noticed that the switch was still added to my device even if not requested)
I'll monitor my new setup and report back if it suddenly stops working again
It happened again! At exactly 11PM which is pretty specific. Could it be a timezone issue? Both my Unifi controller and my home assistant are configured with the correct timezone though (UTC-5 Toronto) but I don't think they are configured to use any specific NTP server.
I'm still not able to reproduce the issue in my dev environment so my new assumption is that it might be already fixed on the dev
branch. I'm currently attempting to override the unifi
component with the latest dev
version of it using a custom_component.
The only major-ish difference between the 2 versions is https://github.com/home-assistant/core/pull/105691 which does touch device trackers. I'll report tomorrow.
Note that I've also confirmed that both versions are using the same id and unique id.
Same issue here, tracked WiFi device keeps returning to away state in HA even though its online the entire time. Seems to happen at random. Reloading the integration restores the tracking for some time.
edit: Tracking was working fine before I upgraded from USG (Network 8.0.24) to UDM-Pro (Unifi OS 3.2.7 / Network 8.0.24) on thursday, including a reinstall of the HA unifi integration.
I'm still not able to reproduce the issue in my dev environment so my new assumption is that it might be already fixed on the
dev
branch. I'm currently attempting to override theunifi
component with the latestdev
version of it using a custom_component.The only major-ish difference between the 2 versions is #105691 which does touch device trackers. I'll report tomorrow.
Note that I've also confirmed that both versions are using the same id and unique id.
Just curious how your dev branch is holding up? Still working?
Sorry, with holiday gatherings, it slipped my mind to report here. Latest dev version in production shows the same issue. Like others said, I see correct device tracking reports for short while after a reload and then everything changes to away at the same time.
I had been meaning to look into ESPresence for a while now and I'm going to experiment with it today. At least as a temporary crutch to the Unifi integration.
Thanks for the update. Seeing the same behavior. Seems everyone that is having the issue is on Unifi OS 3.2.7, seems something in this release broke the integration.
Likely, I'm just not able to reproduce the issue in dev
which makes me doubt that it's on Ubiquiti's side. Maybe it's related to request volume? I have the unifiprotect
integration running in my real environment and a lot more devices being tracked due to the various other integrations I have running there as well.
If new reports are coming in that it was fine before updating to 8.0.24 while running 2023.12.x in Home Assistant, then, yeah, most likely a change in the Network application causing this. In my case, both updates happened on the same day.
BTW, I said previously that I was mostly joking talking about reloading the integration every so often... well I did it now. That might be an ok enough crutch for now
alias: Reload Unifi integration every 3 minutes
description: ""
trigger:
- platform: time_pattern
minutes: /3
hours: "*"
seconds: "0"
condition: []
action:
- service: homeassistant.reload_config_entry
data:
entry_id: 1acf49556e38bed1f9a1818ce85b5fc1
mode: single
The entry ID can be found in .storage/core.config_entries
. Find the one for the unifi
integration.
Only downside I found so far is that the device trackers become unavailable
for a couple seconds every reload
Yeah I'm doing the same, just watching the state of one of my networks and when the client count is zero then reloading..
I have the same problem , keeps reverting to away 5 minutes after reloading. Attribute ap_mac of device_tracker disappears after 5 minutes
I have the same issue (since upgrading my UDM-Pro to Unifi OS 3.2.7 / Network 8.0.24). 2 main device trackers appear after a HA reboot for a few hours max before dropping offline again.
Adding another +1 here! Seems to be the same behavior, and versions, that everyone else is reporting.
I have the same problem , keeps reverting to away 5 minutes after reloading. Attribute ap_mac of device_tracker disappears after 5 minutes
I can confirm that my problem has been solved after I restart all Unifi AP then UDM-Pro.
Edited : Devices go offline after about 12hrs
I've been running a test for 5 hours which didn't replicate this issue on UniFi OS 3.1.16 and Controller 8.0.24
I will upgrade to latest stable UniFi OS 3.2.7 and see if that changes
The logics for a client tracker availability is quite simple to view in the logs
It validates if its a wired or wireless client, then if wireless it will check against the ssid filter, and finally it will validates timestamp of reportedly last seen and makes sure its within the configured detection time limit (default 300 sec).
If it matters, I am on 3.2.7. I don't know if the issue was present in 3.1.16, but on 3.2.7 and controller version 8.0.24 it is 100% reproducible. Devices go offline and stay offline after a few minutes.
I can confirm that my problem has been solved after I restart all Unifi AP then UDM-Pro.
Following this recommendation, I restarted all my unfi devices and, 3 hours in, no new false disconnects to report. Potentially a bug on Unifi's part after the upgrade that fixes itself with a second reboot (first one being the upgrade itself)
I can confirm that my problem has been solved after I restart all Unifi AP then UDM-Pro.
Following this recommendation, I restarted all my unfi devices and, 3 hours in, no new false disconnects to report. Potentially a bug on Unifi's part after the upgrade that fixes itself with a second reboot (first one being the upgrade itself)
That is indeed the most common remedy. I should add that to the documentation on things to do before reporting an issue 😅
Reboot doesn’t solve this. It’s only temporary like reloading the integration. I’ve gone as long as 5 hours without issue, but it always comes back.
Same problem here. Running the unifi controller as an add on (8.0.24.0) and sometimes the device_tracker status works for a day, then it needs another restart. I'm using the the reload integration script from pascal-de-ladurantaye now, that works, but is only a work-around of course.
Hi guys, plot twist. I have been having the same problem like everyone else and I have been monitoring this thread ever since. I have a UDMSE and I did a RMA and got a replacement UDMSE because my current UDMSE was one of the faulty ones with the power failure issue.
I backed up the old and restore the settings on the new one and the presence detection has been working since. No issues at all.
24h without issues since doing the full restart of all Unifi devices. I've never went this long without the issue since the upgrade
I've upgraded to UniFi OS 3.2.7 and test has been running positive for 6 hours
I've upgraded to UniFi OS 3.2.7 and test has been running positive for 6 hours
It ran for 9 hours before I turned it off and the iPhone tracker was active the whole time. Running a new test today with my UDMP tracker.
@Kane610 just to let you know, the longest time it worked for me after a reload was ~14h before it stopped tracking again.
This is so annoyingly random xD
In my case the device shows up as online even when it is turned off. In unifi webpage it is correctly marked as offline. The unifi controller is 8.0.24.
24h without issues since doing the full restart of all Unifi devices. I've never went this long without the issue since the upgrade
Looks like the restarts helped. Will update again if it continues to work.
24h without issues since doing the full restart of all Unifi devices. I've never went this long without the issue since the upgrade
Looks like the restarts helped. Will update again if it continues to work.
Ok...it did not work. It stayed Home
for some time, but after I went out and came back, it never turned to Home
.
Also getting this with HA 2023.12.3 - running a UDM-SE with latest OS (v3.2.7) and Network app (8.0.24)
I can't reproduce this issue, and logs provided from affected users don't show anything either so its kinda problematic... Someone said upgrading to UniFi Network app release candidate 8.0.26 resolves it, if someone want to try that it would be nice to know if it actually solves the issue.
I can't reproduce this issue, and logs provided from affected users don't show anything either so its kinda problematic... Someone said upgrading to UniFi Network app release candidate 8.0.26 resolves it, if someone want to try that it would be nice to know if it actually solves the issue.
I already install release candidate 8.0.26 , didn’t resolve this issue
I already install release candidate 8.0.26 , didn’t resolve this issue
Thanks for testing
I set up a new HA instance with 2024.1b5 and only loaded the UniFi Network integration and it only lasted about an hour as well.
The iPad above has been connected for ~24 hours..
The problem
Wi-fi esp device added as "tracked" in Unifi integration. It is permanently online, Unifi controller web site shows it as online device, but HA integration shows "offline" all the time. The same situation is for many devices.
What version of Home Assistant Core has the issue?
core-2023.11.3
What was the last working version of Home Assistant Core?
Unknown
What type of installation are you running?
Home Assistant OS
Integration causing the issue
Unifi
Link to integration documentation on our website
https://www.home-assistant.io/integrations/unifi/
Diagnostics information
I find HA devices in Unifi API info ($ip/api/s/default/stat/device/) and see the following client attributes, which have correct (updated) values, while HA shows "not home" all the time:
Example YAML snippet
No response
Anything in the logs that might be useful for us?
No response
Additional information
No response