core icon indicating copy to clipboard operation
core copied to clipboard

Unifi Network: Devices marked as "away" after Unifi Network Upgrade

Open bnordli opened this issue 1 year ago • 33 comments

The problem

After the Unifi Network application updated (from 8.0.24 to 8.0.26) on my Unifi Dream Machine Pro, all device trackers was set to "away".

After reloading the integration, the trackers went back to "home", as expected.

I have seen this several times before, both when the Network application or the Unifi OS itself was updated, so I guess the errors coincides with the "soft reboot" of the UDM.

No relevant lines in the console logs (debug logs were not enabled).

What version of Home Assistant Core has the issue?

core-2023.12.0

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Container

Integration causing the issue

Unifi Network

Link to integration documentation on our website

https://www.home-assistant.io/integrations/unifi

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Unifi log:
"Network has been updated to 8.0.26. View Improvements Today, 3:14:52 AM"

All access points device trackers went from "home" to "away" at 03:14:14.
All other clients went from "home" to "away" at 03:14:49.

Additional information

I do have Unifi Protect running against the same UDM, which did not experience any issues.

bnordli avatar Jan 04 '24 07:01 bnordli

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!

Code owner commands

Code owners of unifi can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign unifi Removes the current integration label and assignees on the issue, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


unifi documentation unifi source (message by IssueLinks)

home-assistant[bot] avatar Jan 04 '24 07:01 home-assistant[bot]

Possibly related: https://github.com/home-assistant/core/issues/104576

But I don't have any intermittent drop-offs, only after update of the Unifi Console.

Looking through an access point history (which should always be "home"):

UniFi OS has been updated to 3.2.7. December 15, 3:26:38 AM -> APs went "away" until manual integration reload Network has been updated to 8.0.24. December 14, 3:22:37 AM -> APs went "away" 3:20:17, came back "home" 3:22:38

bnordli avatar Jan 04 '24 07:01 bnordli

Same issue for me. Related #106130

deexiz avatar Jan 04 '24 08:01 deexiz

+1

igoraj avatar Jan 04 '24 08:01 igoraj

Same issue here on 3.2.7 & 8.0.24. Broke a ton of Christmas automations 😞

SK360 avatar Jan 04 '24 14:01 SK360

Same, and integration reload fixes it

tescher avatar Jan 04 '24 15:01 tescher

Same here integration reload did fix it. Pretty annoying. We had all the shutters go up due to a automation looking at the tracker state.

DenisMir avatar Jan 05 '24 06:01 DenisMir

Same issue, reload fixes it for 10 minutes, after that, status is away again (and automations for when everyone is away run).

When within the 10 minutes, I turn off wifi of a device, the device is marked away and when I turn on, it's home again. So it seems the integration only functions correctly the first 10 minutes.

Anyone with a better solution then reloading the hub every 10 minutes?

Ps I also noticed that in previous versions of HA the devices presence was unknown after reboot until the device connected to the network. Now it shows the last status.

Kiphouder avatar Jan 07 '24 09:01 Kiphouder

Same issue, reload fixes it for 10 minutes, after that, status is away again (and automations for when everyone is away run).

When within the 10 minutes, I turn off wifi of a device, the device is marked away and when I turn on, it's home again. So it seems the integration only functions correctly the first 10 minutes.

Anyone with a better solution then reloading the hub every 10 minutes?

Ps I also noticed that in previous versions of HA the devices presence was unknown after reboot until the device connected to the network. Now it shows the last status.

Same issue and behavior here

akajester avatar Jan 07 '24 16:01 akajester

I updated to network 8.0.26 and reloaded the integration and it’s been solid… so far

image

SK360 avatar Jan 07 '24 16:01 SK360

I updated to network 8.0.26 and reloaded the integration and it’s been solid… so far

I'm also on 8.0.26, reloaded twice and each time it lasts for 10 minutes, now everything is marked Away again.

akajester avatar Jan 07 '24 17:01 akajester

@akajester you must have some additional going on. When I reloaded the integration (after 8.0.26) mine also has been running fine for several days now. Your 10 minute thing must be something else or some interaction with something else going on in your system

tescher avatar Jan 07 '24 18:01 tescher

I did a full reboot of the rpi system and reloaded the integration and it started working, showing the proper device state. When I left wifi my phone went into Away status, but it never comes back. I checked the device status in Unifi and it's online, but in home assistant it's still offline. Also in Unifi the home assistant account has not logged in since I reloaded the integration. So something is definitely still wonky here. Like the integration will only login once to get the state, then just doesn't anymore. I'll try removing/readding the integration.

akajester avatar Jan 07 '24 20:01 akajester

Update: removed / readded the integration and it worked for a little while, now everyone is marked away again.

akajester avatar Jan 07 '24 21:01 akajester

+1 Experience the same issue as discribed by @akajester Reloaded full integration, but issue persists, after 300 seconds its set to away. Reloading fixes the issue, but only temporary (for 300 seconds).

cardinal808 avatar Jan 07 '24 22:01 cardinal808

After restore to December it's still broken until reload of integration, then breaks again. Current versions: Core: 2023.12.3, Supervisor: 2023.12.0, Operating System: 11.3, Frontend: 20231208.2

akajester avatar Jan 08 '24 14:01 akajester

Same here - I am using the UDM Pro, latest Network version, rebooted all Unifi devices, but still experiencing presense detection issues. Somehow HA looses visibility on all persons after a short time.

HA: Core 2024.1.2 Supervisor 2023.12.0 Operating System 11.3 Frontend 20240104.0

UDM: Network 8.0.26 UniFi OS 3.2.7

I have now created an automation that reloads the Unifi integration when it detects that the tracker of my UDM is away. That solves the issue for now.

5bomen avatar Jan 08 '24 22:01 5bomen

Many companies like Life360 & MyQ have removed API access to third party like HA - I hope unifi isn't doing the same..

Ended up doing the same as @5bomen - made node red flow to reload Unifi integration everytime is goes away.

OwnsJo avatar Jan 09 '24 21:01 OwnsJo

It's probably not the case. I've broken stuff before. Just this thing is really weird

Kane610 avatar Jan 09 '24 21:01 Kane610

I confirm same behavior and symptoms as for many above, same latest versions of all systems - 8.0.26 network on cloud key gen2+, core 24.1.2, supervisor 2023.12, os 11.4, fe 20240104. If any testing or logs are needed, i am ready to participate. Good luck and thanks for any updates!

kezon avatar Jan 11 '24 04:01 kezon

Having the same issues as above with a UDM Pro on v8.0.26. HA core 24.1.2, supervisor 2023.12.0, OS 11.3

thomasfilius avatar Jan 11 '24 10:01 thomasfilius

Same issue, reload fixes it for 10 minutes, after that, status is away again (and automations for when everyone is away run).

When within the 10 minutes, I turn off wifi of a device, the device is marked away and when I turn on, it's home again. So it seems the integration only functions correctly the first 10 minutes.

Anyone with a better solution then reloading the hub every 10 minutes?

Ps I also noticed that in previous versions of HA the devices presence was unknown after reboot until the device connected to the network. Now it shows the last status.

My temporary solution using Automation below.

Change entity ID to match your controller (possible to select from UI) Change entry_id to match you Unifi ID (in .storage/core.config_entries -> ctrl F -> unifi)


alias: Temp - Unifi reload when state away
description: |-
  Temporary solution because of bug
  https://github.com/home-assistant/core/issues/107061

  Reloads Unifi when status of UDM is away. 

  Will probably run every 10 minutes.
trigger:
  - platform: state
    entity_id:
      - device_tracker.dream_machine_special_edition
    from: null
    to: not_home
condition: []
action:
  - service: homeassistant.reload_config_entry
    data:
      entry_id: XXXXXXXf7a8610XXXc5b3798bXXXXXXX
mode: single

Kiphouder avatar Jan 11 '24 15:01 Kiphouder

Same issue here after updating to unifi network 8.0.26.

Core 2023.11.3 Supervisor 2023.12.0 Operating System 11.1 Frontend 20231030.2

robmc-itpro avatar Jan 12 '24 09:01 robmc-itpro

Was this issue fixed? because it's been working for me for over 7 hours after the last upgrade and reload. Core 2024.1.3, Supervisor 2023.12.0, Operating System 11.4, Frontend 20240104.0.

akajester avatar Jan 13 '24 03:01 akajester

My automation for recovery of an 'away'-status UDM just triggered, so I am afraid not. 😞

Op za 13 jan 2024 04:39 schreef akajester @.***>:

Was this issue fixed? because it's been working for me for over 7 hours after the last upgrade and reload. Core 2024.1.3, Supervisor 2023.12.0, Operating System 11.4, Frontend 20240104.0.

— Reply to this email directly, view it on GitHub https://github.com/home-assistant/core/issues/107061#issuecomment-1890284570, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASNL62ABFNM3ENT4U4MFHQTYOH6XZAVCNFSM6AAAAABBMQMW52VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOJQGI4DINJXGA . You are receiving this because you were mentioned.Message ID: @.***>

5bomen avatar Jan 13 '24 21:01 5bomen

Was this issue fixed? because it's been working for me for over 7 hours after the last upgrade and reload. Core 2024.1.3, Supervisor 2023.12.0, Operating System 11.4, Frontend 20240104.0.

No changes yet, some people are not affected, doesn't help in identifying the issue :)

Kane610 avatar Jan 14 '24 14:01 Kane610

@Kane610 , anything we can do to support you?

cardinal808 avatar Jan 14 '24 15:01 cardinal808

Also having the issue:

Core 2024.1.3
Supervisor 2023.12.0
Operating System 11.4
Frontend 20240104.0

Symptom is that device trackers either don't update (stay home or not_home) or they go eventually to the not_home state. My computer for instance, suddenly went offline at 00:03 in the night, as far as Home Assistant is concerned. Nothing was logged at the Unifi side. At the Home Assistant side, nothing stands out in the logging.

BTW: The symptoms seem to happen at my side far less frequent.

Sebazzz avatar Jan 14 '24 16:01 Sebazzz

Do any of the other unifi entities stop working or go unavailable?

Kane610 avatar Jan 14 '24 16:01 Kane610

In my (original) case, all entities from the Unifi Integration were marked as "away", even those who were actually home (and marked as connected in the Unifi Console).

søn. 14. jan. 2024, 17:52 skrev Robert Svensson @.***>:

Do any of the other unifi entities stop working or go unavailable?

— Reply to this email directly, view it on GitHub https://github.com/home-assistant/core/issues/107061#issuecomment-1891003274, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABKRA2I3XAT4A5GPY2FX6ETYOQELJAVCNFSM6AAAAABBMQMW52VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOJRGAYDGMRXGQ . You are receiving this because you authored the thread.Message ID: @.***>

bnordli avatar Jan 14 '24 16:01 bnordli