Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Entity status updates requires periodic integration restart #150

Open
ripple7511 opened this issue Oct 21, 2024 · 12 comments
Open

Entity status updates requires periodic integration restart #150

ripple7511 opened this issue Oct 21, 2024 · 12 comments

Comments

@ripple7511
Copy link

The problem

It seems that at least once a week, I find that automations relying on Vivint entities are no longer firing. Home Assistant is able to send commands (unlock doors, disarm/arm Vivint system, etc) but the status of all entities is not updated. Looking through my logs, this is the only thing I'm able to see:

Restarting the Vivint plugin always solves the issue.

What version of Home Assistant Core are you running?

core-2024.10.3

What was the last working version of Home Assistant Core?

No response

Anything in the logs that might be useful?

Logger: custom_components.vivint.hub
Source: helpers/update_coordinator.py:367
integration: Vivint (documentation, issues)
First occurred: October 18, 2024 at 11:55:06 PM (1 occurrences)
Last logged: October 18, 2024 at 11:55:06 PM

Error requesting vivint data: 500, message='Internal Server Error', url='https://www.vivintsky.com/api/authuser'

Additional information

No response

@ripple7511
Copy link
Author

Adding more logs:
This error originated from a custom integration.

Logger: custom_components.vivint.hub
Source: helpers/update_coordinator.py:354
integration: Vivint (documentation, issues)
First occurred: 4:15:17 PM (1 occurrences)
Last logged: 4:15:17 PM

Unexpected error fetching vivint data
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 354, in _async_refresh
self.data = await self._async_update_data()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 271, in _async_update_data
return await self.update_method()
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/vivint/hub.py", line 80, in _async_update_data
return await self.account.refresh()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/vivintpy/account.py", line 153, in refresh
await system.refresh()
File "/usr/local/lib/python3.12/site-packages/vivintpy/system.py", line 59, in refresh
system_data = await self.api.get_system_data(self.id)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/vivintpy/vivintskyapi.py", line 156, in get_system_data
resp = await self.__get(
^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/vivintpy/vivintskyapi.py", line 570, in __get
return await self.__call(
^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/vivintpy/vivintskyapi.py", line 654, in __call
raise cls(message)
vivintpy.exceptions.VivintSkyApiError: Attempted to access an unauthorized Smarthome System

@ripple7511
Copy link
Author

This follows immediately after:
This error originated from a custom integration.

Logger: custom_components.vivint.hub
Source: helpers/update_coordinator.py:367
integration: Vivint (documentation, issues)
First occurred: 4:10:17 PM (1 occurrences)
Last logged: 4:10:17 PM

Error requesting vivint data: 500, message='Internal Server Error', url='https://www.vivintsky.com/api/authuser'

@ripple7511 ripple7511 changed the title Error requesting vivint data: 500; entity status not updated Entity status updates requires periodic integration restart Oct 25, 2024
@msherga
Copy link

msherga commented Oct 25, 2024

I'm getting same behavior, but nothing in my logs about it. I see on my physical panel that my alarm gets successfully set, but then homeassistant doesn't see the status change until much later.

@nick2687
Copy link

nick2687 commented Nov 4, 2024

I’m experiencing this issue as well, however there is nothing in my logs either. I use the door and motion sensors in several automations and after a period of time after a restart those automations no longer fire because Vivint stops communicating with home assistant.

Going to try and track down more information from my system, but just wanted to make sure you knew there were more people seeing this.

@ripple7511
Copy link
Author

ripple7511 commented Nov 5, 2024

Got another error yesterday- this time bad gateway.

Logger: custom_components.vivint.hub
Source: helpers/update_coordinator.py:367
integration: Vivint (documentation, issues)
First occurred: October 25, 2024 at 8:05:11 AM (2 occurrences)
Last logged: November 4, 2024 at 11:57:23 AM

Error requesting vivint data: 500, message='Internal Server Error', url='https://www.vivintsky.com/api/authuser'
Error requesting vivint data: 502, message='Bad Gateway', url='https://www.vivintsky.com/api/systems/3***************?includerules=false'

@natekspencer
Copy link
Owner

My best guess right now is that when these server error / authentication issues happen, it somehow terminates the connection with pubnub for push updates to the component, which then introduces the lag. I haven't had a chance to test that theory though, or to test a fix that would try to resubscribe yet.

@Ljiddou
Copy link

Ljiddou commented Nov 11, 2024

I’m having the same issue where it’s taking a long time for automations to fire and state to update on home assistant. Sending a command like arming and disarming instantly updates the panel but opening/closing doors or windows takes 3-4 minutes to update on home assistant and I have to constantly reload to have it work normally.

@Ljiddou
Copy link

Ljiddou commented Nov 19, 2024

I’m having the same issue where it’s taking a long time for automations to fire and state to update on home assistant. Sending a command like arming and disarming instantly updates the panel but opening/closing doors or windows takes 3-4 minutes to update on home assistant and I have to constantly reload to have it work normally.

I was able to set an automation to reload the Vivint integration couple times a day to temporarily fix this issue but the annoying thing is the automation that Vivint used last gets triggered every time it reloads.

@mstberto
Copy link

mstberto commented Dec 9, 2024

I am also suffering from this issue and have been for about a month and a half. It seemingly popped up out of nowhere as it was working flawlessly before this.

Copy link

github-actions bot commented Jan 8, 2025

This issue has now been marked as stale and will be closed if no further activity occurs.

@github-actions github-actions bot added the Stale label Jan 8, 2025
@ripple7511
Copy link
Author

Issue occurred again for me today. I didn't have debugging logs enabled. I'll re-enable and see if I can capture anything new.

@github-actions github-actions bot removed the Stale label Jan 9, 2025
@rvalentin1974
Copy link

just installed onto home assistant today and I am able to see all equipment on my system, I also see the equipment on a secondary system tied to same username. trying to figure out how to remove secondary account

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants