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

Axis camera motion sensor becomes unavailable #91558

Closed
DirkMu opened this issue Apr 17, 2023 · 31 comments
Closed

Axis camera motion sensor becomes unavailable #91558

DirkMu opened this issue Apr 17, 2023 · 31 comments

Comments

@DirkMu
Copy link

DirkMu commented Apr 17, 2023

The problem

The motion sensors (vdm4) of my Axis cameras (both P3228-LVE) turn unavailable after a certain time.
When I restart HA or reload the integration the sensors are available. There is no specific warning or error in my log.

This only happens for my Axis P3228-LVE. The sensors of my M3106-LVE-MkII are working fine.

What version of Home Assistant Core has the issue?

core-2023.4.3

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

Axis

Link to integration documentation on our website

No response

Diagnostics information

config_entry-axis-47ce93b23c1c4bee8a76864553d9854c.json.txt

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

@DirkMu
Copy link
Author

DirkMu commented May 6, 2023

The issue still occurs in 2023.5.0

@home-assistant
Copy link

home-assistant bot commented May 6, 2023

Hey there @Kane610, mind taking a look at this issue as it has been labeled with an integration (axis) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of axis 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 axis Removes the current integration label and assignees on the issue, add the integration domain after the command.

(message by CodeOwnersMention)


axis documentation
axis source
(message by IssueLinks)

@Kane610
Copy link
Member

Kane610 commented May 6, 2023

Hello. Do you get any errors in the logs?

Can you enable debug logging for the Axis integration and share logs when it happen?

@DirkMu
Copy link
Author

DirkMu commented May 6, 2023

Hi. No, there are neither errors nor warnings. They just become unavailable. I just reloaded the integration and the motion sensors became available. I enabled debug logging. Once they become unavailable I will attach the log.

@DirkMu
Copy link
Author

DirkMu commented May 7, 2023

Hi. I run HA as a container. It appears that when I reset the container and start it, the binary_sensors of my two P3228 just remain unavailable. They will not become available later. I am no longer sure whether they become unavailable or whether they are unavailable from the beginning. However, this only appears when resetting the container and when HA is initialized. When reloading the integration und restating HA they remain available. I will check further if they will become unavailable.

Here's the log
home-assistant_axis_2023-05-07T07-43-00.271Z.log

@DirkMu
Copy link
Author

DirkMu commented May 8, 2023

I kept an eye on it. It appears that after restarting HA the binary_sensors become unavailable.

HA was stopped/started at around 10:39
image

The binary sensor became unavailable:
image

Here's the log
home-assistant_axis_2023-05-08.log

@Kane610
Copy link
Member

Kane610 commented May 8, 2023

You mean that when restarting core it becomes unavailable? If you reload the integration it will work?

Which IP belongs to which device?

@DirkMu
Copy link
Author

DirkMu commented May 8, 2023

Yes, when I restart core the binary sensors become unavailable, sometimes (!) And yes, if I reload the integration they become available. As far as I can see the will keep available.

192.168.10.13 = Cam-Vorgarten
192.168.10.15 = Cam-Garten

@Kane610
Copy link
Member

Kane610 commented May 8, 2023

And Garten is the one this issue is about?

@DirkMu
Copy link
Author

DirkMu commented May 8, 2023

No, both are affected. Both are an AXIS P3228-LVE.

192.168.10.14 = Cam-Zugang-Garten is an AXIS M3106-LVE Mk II that runs fine.

@Kane610
Copy link
Member

Kane610 commented May 8, 2023

What happens if you disable .13 and .14 and then restart core? Would .15 load up properly?

@DirkMu
Copy link
Author

DirkMu commented May 9, 2023

That’s hard to predict. I need to test. It’s not every time that the binary sensors become unavailable. I hoped the log would provide more infos.

@Kane610
Copy link
Member

Kane610 commented May 9, 2023

It's hard to see what source data comes from and it all looks OK data wise afaics

@DirkMu
Copy link
Author

DirkMu commented May 9, 2023

I deleted .14 and .15 restarted core and the binary sensors of .13 are unavailable.
home-assistant_axis_2023-05-09.log

I just saw that not every binary sensor is unavailable. I don't know if this random.
image

@DirkMu
Copy link
Author

DirkMu commented May 14, 2023

Hi. The issue still occurs. I just installed HA 2023.5.3 and when HA started the binary sensors were unavailable. I reloaded the integration and they became available. Please find attached the log.

I saw an stream client offline messag ein line 1466
Several unauthorized in line 1144, 1161, 1169, 2583, 2600, 2608
An homeassistant.components.websocket_api.http.connection ERROR for component stream ValueError("Invalid IPv6 URL") which is strange as I have not configured IPv6

home-assistant_axis_2023-05-14.log

@Kane610
Copy link
Member

Kane610 commented May 24, 2023

I haven't forgotten about this, I will look at the new logs shortly

@DirkMu
Copy link
Author

DirkMu commented May 24, 2023

Thanks for the update. The main issue seems the restart of HA which results in unavailable sensors.

@Kane610
Copy link
Member

Kane610 commented May 25, 2023

I saw an stream client offline messag ein line 1466

The system sends a teardown just before that 2023-05-14 20:47:09.883 DEBUG (MainThread) [axis.rtsp] TEARDOWN rtsp://192.168.10.13/axis-media/media.amp?video=0&audio=0&event=on RTSP/1.0

Regarding the unauthorised messages; are you using a viewer account on the device?

The IPv6 error is something between home assistant and a client, not related to this issue.

@Kane610
Copy link
Member

Kane610 commented May 25, 2023

Please find attached the log.

Does this log show the case where you start hass and the integration is not loaded and then the restart and after that it works?

@DirkMu
Copy link
Author

DirkMu commented May 25, 2023

Yes an no. In that case a new hass version was installed (the container was updated). While updating the container hass is shut down. After I started hass the integration was loaded successfully. Only the binary_sensors were unavailable. The camera entity as well as some switches were available. Thus I reloaded the integration. After that the binary_sensors became available.

All of that was logged.

@RobertAmour
Copy link

I'm having the same issue with the same Cameras, Axis P3228-LVE

@Kane610
Copy link
Member

Kane610 commented Aug 14, 2023

I'm having the same issue with the same Cameras, Axis P3228-LVE

Are you also seeing the IPv6 error?

@RobertAmour
Copy link

Sorry for the slow reply. Don't believe I'm getting an IP V6 issue. I've attached the debug log. It seems to randomly disable certain sensors.

home-assistant_axis_2023-08-21T17-02-00.963Z.log

@issue-triage-workflows
Copy link

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍
This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

@DirkMu
Copy link
Author

DirkMu commented Nov 21, 2023

It seems the issue is gone.

@DirkMu DirkMu closed this as completed Nov 21, 2023
@Kane610
Copy link
Member

Kane610 commented Nov 21, 2023

Scary :/

I am continuing my work on improving the axis integration and will probably rework the related flows as time goes on.

@DirkMu DirkMu reopened this Nov 24, 2023
@DirkMu
Copy link
Author

DirkMu commented Nov 24, 2023

The issue still appears

@issue-triage-workflows
Copy link

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍
This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

@Kane610
Copy link
Member

Kane610 commented Feb 22, 2024

Got a separate question about a similar issue, at least you're running as container and maybe they are related.

As you're running it as a container, which network mode do you have? Events are sent over RTSP meaning it negotiates its own ports to communicate, it needs "--network=host" and if you have a firewall enabled on your machine you need to configure it

@Kane610
Copy link
Member

Kane610 commented Mar 18, 2024

Similar Issue. Try to Reload Intégration and Reboot System, but same problem HA

Not the same issue as OPs system works after restart. Open a separate issue

@issue-triage-workflows
Copy link

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍
This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

@issue-triage-workflows issue-triage-workflows bot closed this as not planned Won't fix, can't repro, duplicate, stale Jun 23, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Jul 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants