home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
71.07k stars 29.73k forks source link

1x of 5x axis cams work correctly, others only show Cleared events for object analytics hits #122159

Open bob454522 opened 1 month ago

bob454522 commented 1 month ago

The problem

(first off, thank you so much for Writing this awesome axis integration for home assistant, I can't believe the number and depth of features you have integrated into it!).

Issue: Only 1x of my 5x Axis cams in HA are registering Object Analytic "hits" (the 4x others for some reason only will show the "Cleared" event most of the time, not always, and never the initial "motion detected" event). But one of my axis cameras works perfectly. (to be clear the video feeds for all 5x cameras do work)

I cant determine anything different about the one that is working correctly, of the ones im testing, all are p3265-LVE, and all are running the latest 11.11.73 firmware.

I have tried removing some of the problem cameras, re adding them using manually via http import 80, using the root account instead of my view only account.

I also have a milestone xprotect NVR on my same network and that is picking up the events correctly (i know as when in testing the HA part, via "Test Alarm" on the camera -> Object Analytics -> Scenario XYZ, i hear my Axis poe speakers playing my audable alert tone via xprotect rules). (all , including HAOS, is on the same /24 local subnet). I only bring up X Protect as I assume it's using a similar method library to communicate with the events on the Axis camera.

Im attaching Diagnostics from one of the problem cameras, as well as the Axis Integration "debug log" - where I clicked enable debug logging then did "Test Alarm" via the camera's web interface, then stopped the debug logging.

image

(un related to my issue, but it would be SO great If you could add the IP address or anything that could help in identifying a camera from the list of devices on the axis integration page, I see it has the model and the serial / Mac address, but The IP address (or the Friendly name) is really needed right here, as debugging usually starts by choosing one of your cameras from this list - thanks ) )

debug log: (and .json config is also below) home-assistant_axis_2024-07-19T07-30-38.193Z.log

What version of Home Assistant Core has the issue?

core-2024.7.1

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

axis

Link to integration documentation on our website

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

Diagnostics information

config_entry-axis-01J34Y572X4FPVYGQT5ESCZVRD.json

Example YAML snippet

No response

Anything in the logs that might be useful for us?

(debug log linked in OP)

Additional information

No response

home-assistant[bot] commented 1 month ago

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. - `@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)


axis documentation axis source (message by IssueLinks)

bob454522 commented 1 month ago

This has been fixed (was issue on my end) - i had disabled UPnP on some of my cameras , and those were the ones not working. Once i re-enabled it, all events started working correctly in HA.

It's worth noting the only reason I disabled it, was a security suggestion by the Axis Server Report tool (their cloud based tool server report analyzer)

so all is good, even on latest FW 11.11.73, and with a "Viewer" level axis/camera account even!

for any others that come across this, UPnP is enabled by default, but if you need to enable it, here is how (its in plan config -> networking):

image

Kane610 commented 1 month ago

You said your issue was you didn't get all events from a specific device? Meaning the connection is at least somewhat working. I wonder why enabling upnp would affect behavior aa that would only be relevant should your devices change ip alot

Kane610 commented 1 month ago

but it would be SO great If you could add the IP address or anything that could help in identifying a camera from the list of devices on the axis integration page

This is a thing where home assistant provides information and so far IP has not been a relevant attribute to show. Nothing i can do on the integration side. One thing i could do would be to improve naming of the device in home assistant during setup of config entry. You can of course change device name yourself at any point in time to help with your overview

yaletownguy commented 1 month ago

Not sure what the protocol is re: adding a comment to a closed topic, but I'm having exactly the same issue with the same cameras (P3265-LVE), so figured it would probably be easiest for anyone tracking if I tried to stick to the same thread.

All sensors work except the Object Analytics one.

image

For example, see the log form VMD3:

image

But nothing on the Object Analytics One.

image

I just reinstalled that camera after changing the username to one dedicated to Home Assistant.

Although, interestingly, I just noticed it's not grabbing the name of the scene from my cameras like my other cameras are doing (using the Axis root account). For example, this is the scene as named in another Axis camera:

image

I've got UPnP enabled in my camera and also enabled it on my Ultimate Dream Machine.

image

Any thoughts? Can I provide any other information? TIA!

UPDATE: Weird. One of my cameras works, but I've gone through the settings on the others and they appear identical, yet don't work. Not sure what I'm missing?

Here are the diagnostics for the working one:

config_entry-axis-01J34PJX4QCS3VW2WX9P313V75 - Working.json

And the non-working one:

config_entry-axis-01J3M2HP3K1N85YZD1P6NB0X70 - not working.json

Kane610 commented 1 month ago

You shouldn't run vmd4 and object analytics at the same time

What firmware versions and versions of object analytic are you running?

yaletownguy commented 1 month ago

Thanks, Kane! I was leaving the VMD run concurrently so my wife could go back after the fact and check for wildlife, whereas I want the Object Analytics for real time humans. You raise a good point, though, re: "overburdening" the cameras, particularly with a 24/7 feed. I'll try disabling.

However, I think I need to do a mea culpa. Before posting, I read through the troubleshooting instructions and unchecked the box noted below on the camera that I was most interested in, but it didn't have any impact. Later, I did the same thing on the "working" camera, but I had assumed that camera was working before I made that change. I just now rebooted the "non-working" camera and, guess what, it's working.

TROUBLESHOOTING DISCOVERY If your device is not discovered. On your camera, go to System Options -> Advanced -> Plain Configuration. Change the drop-down box to network and click Select Group. If Network Interface I0 ZeroConf contains the 169.x.x.x IP address, unchecked the box next to Enabled for this section and click Save.

I'll confirm for sure tomorrow, but I'm pretty certain it was a case of RTFM re: the above setting and reboot the camera if it doesn't work (I think one worked without a reboot and one didn't).

In case helpful, below are the only changes in the diagnostics of the "non-working" camera before and after the camera reboot (I also rebooted HA), although I suspect there's nothing helpful in there:

image

To answer your questions re: versions:

AXIS OS Version: 11.11.73

AXIS Connect Deployment Agent Version: 0.1-2243

AXIS Device Diagnostics Version: 4.237-0

AXIS Video Motion Detection Version: 4.5-8

AXIS WebRTC Version: 4.16-5

AXIS Object Analytics Version: 1.14.35

Thanks again for jumping in! I'm completely new to the scene and a slow study!!

Kane610 commented 1 month ago

I just now rebooted the "non-working" camera and, guess what, it's working.

Hmm, but all other entities of the non-working camera where working as expected so the change of the network shouldn't affect as that is only to know the address of the device, from that point of view everything or nothing should work

yaletownguy commented 1 month ago

That makes sense. Yes, all other entities were working.

Interestingly, though, I tried to get a third camera working this AM and no dice after unchecking "Enabled" for Network / ZeroConf. I rebooted the HA and Axis (because my IT guys have engrained into me no support unless I first reboot and make sure everything is plugged in!), but it still wouldn't work. So, to your point, not sure it was the UPNP (at least alone - see below).

I finally got Object Analytics on the third camera to work, but TBH, I'm not sure how. Although, it seemed to follow the path of the OP, by initially showing "cleared" events (once I disabled ZeroConf), but not the actual triggers.

July 25, 2024 Kitchen Camera Object Analytics Line Cross cleared (no motion detected) 9:26:52 AM - 6 minutes ago Kitchen Camera Object Analytics Line Cross detected motion 9:26:46 AM - 6 minutes ago Kitchen Camera Object Analytics Line Cross cleared (no motion detected) 9:22:59 AM - 10 minutes ago Kitchen Camera Object Analytics Line Cross became unavailable 9:22:53 AM - 10 minutes ago Kitchen Camera Object Analytics Line Cross cleared (no motion detected) 9:21:06 AM - 12 minutes ago Kitchen Camera Object Analytics Line Cross became unavailable 9:21:01 AM - 12 minutes ago Kitchen Camera Object Analytics Line Cross cleared (no motion detected) 9:18:56 AM - 14 minutes ago Kitchen Camera Object Analytics Line Cross detected motion 9:18:50 AM - 14 minutes ago Kitchen Camera Object Analytics Line Cross cleared (no motion detected) 9:16:51 AM - 16 minutes ago Kitchen Camera Object Analytics Line Cross detected motion 9:16:45 AM - 16 minutes ago Kitchen Camera Object Analytics Line Cross became unavailable 9:10:36 AM - 22 minutes ago Kitchen Camera Object Analytics Line Cross cleared (no motion detected) 9:02:24 AM - 31 minutes ago Kitchen Camera Object Analytics Line Cross cleared (no motion detected) 8:56:29 AM - 36 minutes ago Kitchen Camera Object Analytics Line Cross became unavailable 8:56:14 AM - 37 minutes ago Kitchen Camera Object Analytics Line Cross became unavailable 8:52:13 AM - 41 minutes ago Kitchen Camera Object Analytics Line Cross cleared (no motion detected) 8:49:30 AM - 43 minutes ago Kitchen Camera Object Analytics Line Cross became unavailable 8:49:13 AM - 44 minutes ago Kitchen Camera Object Analytics Line Cross cleared (no motion detected) 8:47:21 AM - 1 hour ago Kitchen Camera Object Analytics Line Cross became unavailable 8:47:16 AM - 1 hour ago

I've got one last camera to fix, but my wife is threatening to divorce me if we don't head out NOW for our weekend vacation, so will try and take that camera one step at a time and report back.

In the interim, some of the things I did, which my wife insists I write down and do one at a time for the fourth camera:

  1. Changed the "friendly" name in Axis from just "Kitchen" to include the camera make and model, since I noticed the first "working" camera had that same nomenclature (I did that for the second working camera as well). No clue if it matters, but just FYI:

image

  1. I also disabled IPV6 on the Axis, since my ISP doesn't offer IPV6. It didn't seem to have any effect, but, again, just FYI.

  2. Finally, I noticed after installing and uninstalling the third camera in HA, that HA was still referring to it by the name I had given in for the previous HA installation ("Kitchen Camera"). So, I rebooted HA and then the camera was discovered by HA and installed and the Object Analytics worked.

  3. Just noticing, and in the interests of full disclosure, I had installed the Unifi Integration (I think after the initial camera installs) and the third working camera seemed to have integrated firstly with Unifi, but once I get Object Analytics working on all 4 cameras, it will be easy enough to uninstall Unifi and then start again with the cameras and then Unifi if I really care. Again, just FYI in case helpful:

image

  1. And, another possible oops, the second and third working cameras showed a configuration error in the PC version of Companion, which I clicked to fix. I've never seen that before, so I clearly messed with something. I will try and see what it changed when I get back.

Thanks again, Kane, and sorry for not being more helpful. Just wanted to lay out the stuff above in case helpful to you or others in the interim. Will try to pinpoint the issue on the 4th camera and if you want me to try anything in particular for others, just let me know. Again, thanks!!

yaletownguy commented 1 month ago

I know you're not going to believe it, but the "fix" made when I clicked on the link in Axis Companion to fix the configuration error it flagged was ... to activate VMD! I checked both cameras to confirm:

image

And I checked to make sure I didn't have anything using VMD:

Motion recording off in Axis Companion:

image

And in the Events section of the camera (VMD disabled):

image

Gotta run, she's coming back...

yaletownguy commented 1 month ago

I've isolated the fix, but no clue if it makes sense or not.

I didn't test various naming conventions. However, if I just call the camera "Shed" under Bonjour (without the additional information below), it won't register an Object Analytics trigger, but it will register a clear and all other triggers. The UPnP name seems to have no effect, and I had to reboot the camera to get the settings to take effect:

image

My logs since day 1, with me changing the UPnP name and rebooting, but it works 100% with the Bonjour name being what you see above:

Logbook Start date March 1, 2024 at 12:00 AM End date July 29, 2024 at 10:00 PM Entity Shed Camera Object Analytics Line Cross July 28, 2024 Shed Camera Object Analytics Line Cross cleared (no motion detected) 8:28:29 PM - 4 minutes ago Shed Camera Object Analytics Line Cross detected motion 8:28:23 PM - 4 minutes ago Shed Camera Object Analytics Line Cross cleared (no motion detected) 8:28:18 PM - 4 minutes ago Shed Camera Object Analytics Line Cross detected motion 8:28:12 PM - 4 minutes ago Shed Camera Object Analytics Line Cross cleared (no motion detected) 8:27:53 PM - 5 minutes ago Shed Camera Object Analytics Line Cross became unavailable 8:27:38 PM - 5 minutes ago Shed Camera Object Analytics Line Cross cleared (no motion detected) 8:23:53 PM - 9 minutes ago Shed Camera Object Analytics Line Cross became unavailable 8:23:14 PM - 9 minutes ago Shed Camera Object Analytics Line Cross cleared (no motion detected) 8:22:44 PM - 10 minutes ago Shed Camera Object Analytics Line Cross detected motion 8:22:37 PM - 10 minutes ago Shed Camera Object Analytics Line Cross cleared (no motion detected) 8:22:06 PM - 11 minutes ago Shed Camera Object Analytics Line Cross detected motion 8:22:00 PM - 11 minutes ago Shed Camera Object Analytics Line Cross cleared (no motion detected) 8:21:52 PM - 11 minutes ago Shed Camera Object Analytics Line Cross detected motion 8:21:46 PM - 11 minutes ago Shed Camera Object Analytics Line Cross cleared (no motion detected) 8:21:19 PM - 11 minutes ago Shed Camera Object Analytics Line Cross became unavailable 8:21:04 PM - 12 minutes ago Shed Camera Object Analytics Line Cross cleared (no motion detected) 8:19:51 PM - 13 minutes ago Shed Camera Object Analytics Line Cross detected motion 8:19:44 PM - 13 minutes ago Shed Camera Object Analytics Line Cross cleared (no motion detected) 8:19:01 PM - 14 minutes ago Shed Camera Object Analytics Line Cross detected motion 8:18:55 PM - 14 minutes ago Shed Camera Object Analytics Line Cross cleared (no motion detected) 8:18:14 PM - 14 minutes ago Shed Camera Object Analytics Line Cross became unavailable 8:17:36 PM - 15 minutes ago Shed Camera Object Analytics Line Cross cleared (no motion detected) 8:12:10 PM - 20 minutes ago Shed Camera Object Analytics Line Cross cleared (no motion detected) 8:09:32 PM - 23 minutes ago Shed Camera Object Analytics Line Cross became unavailable 8:09:10 PM - 23 minutes ago July 25, 2024 Shed Camera Object Analytics Line Cross cleared (no motion detected) 9:14:03 AM - 3 days ago Shed Camera Object Analytics Line Cross cleared (no motion detected) 9:02:31 AM - 3 days ago July 24, 2024 Shed Camera Object Analytics Line Cross cleared (no motion detected) 10:42:30 PM - 4 days ago July 23, 2024 Shed Camera Object Analytics Line Cross cleared (no motion detected) 10:29:41 AM - Last week Shed Camera Object Analytics Line Cross cleared (no motion detected) 7:41:05 AM - Last week Shed Camera Object Analytics Line Cross became unavailable 7:37:35 AM - Last week July 22, 2024 Shed Camera Object Analytics Line Cross cleared (no motion detected) 9:31:38 PM - Last week Shed Camera Object Analytics Line Cross cleared (no motion detected) 9:23:23 PM - Last week Shed Camera Object Analytics Line Cross cleared (no motion detected) 8:56:14 PM - Last week Shed Camera Object Analytics Line Cross cleared (no motion detected) 7:14:41 AM - Last week Shed Camera Object Analytics Line Cross became unavailable 7:13:41 AM - Last week

Kane610 commented 1 month ago

That information is never used for anything related to functionality. It's not just with starting or restarting the device which causes this? Do you see any errors in the logs on the device? Is it reproducible on other devices?

yaletownguy commented 1 month ago

Definitely not just starting or restarting the device. I tried that numerous times with each camera the first time, each to no avail.

That said, I just reverted each setting I changed, one by one and rebooting after each, and it was still working.

I uninstalled a different camera and reinstalled it. Like the first time, only Object Analytics didn't work. I rebooted after each setting change. It wasn't until I used the long-form name for Bonjour that it started working again (after a reboot).

Name that worked (vs. just "Deck" when initially reinstalled):

image

You can see from the Logbook that "no motion detected" appeared until the yellow highlighted "line detected motion" following the name changes noted above (and a reboot):

image

Here are the Axis logs (before and after it was working) apparently scrubbed of personally identifiable information by ChatGPT, along with the following commentary by GPT (since I'm not smart enough to figure this out!):

image

Anonymized_Axis_log_Not_Working - Cleaned by GPT.docx

Anonymized_Working_after_long_form_name - Cleaned by GPT.docx

Kane610 commented 1 month ago

I've renamed both Bonjour and UPnP to Shed but could not reproduce it.

Could you try using the axis python library directly and see if it is the same running from the terminal?

Its just executing ❯ python3 -m axis 192.168.0.90 root pass --events and check the Event output

yaletownguy commented 1 month ago

I know it probably doesn't make sense, but when I renamed Bonjour and UPnP the one word name after it started working (i.e., after I changed the name to the longer form noted above), it didn't stop working, even after a reboot. However, if I deleted the camera and reinstalled it with the short form name, then it wouldn't work until I changed it to the long form name and rebooted.

I know it's sad, as your command line is simple, but I'm tapped out on my command line knowledge. I don't know why one authentication fails and one doesn't. ChatGPT says the event output is supposed to show onscreen in real time, but it just sits there (even after triggering an alarm event):

C:\Users**[XXXX]>python -m axis 192.168.30.154 root [PW]** –events 192.168.30.154, root, YYYY, 80, True, False Connecting to Axis device HTTP Request: POST http://192.168.30.154/axis-cgi/pwdgrp.cgi "HTTP/1.1 401 Unauthorized" HTTP Request: POST http://192.168.30.154/axis-cgi/pwdgrp.cgi "HTTP/1.1 200 OK"

Sorry for being a PITA!

Kane610 commented 1 month ago

make sure to use double '-' for '--events' I think you only added one '–events'

you couldd also add a '-D' to enable all debug logs

yaletownguy commented 1 month ago

It's a fair point. It looks like Word squished them together when I copied and pasted to Word to remove the password. Definitely a double "-".

The -D produced the information below, but not sure if it's helpful. I used Notepad instead of Word this time.

PS: This is the "working" version.

Microsoft Windows [Version 10.0.22631.3958] (c) Microsoft Corporation. All rights reserved.

C:\Users\XXXXX>python -m axis 192.168.30.154 root XXX --events 192.168.30.154, root, XXX, 80, True, False Connecting to Axis device HTTP Request: POST http://192.168.30.154/axis-cgi/pwdgrp.cgi "HTTP/1.1 401 Unauthorized" HTTP Request: POST http://192.168.30.154/axis-cgi/pwdgrp.cgi "HTTP/1.1 200 OK"

C:\Users\XXXXX>python -m axis 192.168.30.154 root XXX --events -D 192.168.30.154, root, XXX, 80, True, False Using proactor: IocpProactor Connecting to Axis device load_ssl_context verify=False cert=None trust_env=True http2=False post, http://192.168.30.154:80/axis-cgi/pwdgrp.cgi, 'None', '{'action': 'get'}', 'None' connect_tcp.started host='192.168.30.154' port=80 local_address=None timeout=15 socket_options=None connect_tcp.complete return_value=<httpcore._backends.anyio.AnyIOStream object at 0x00000290A20E9C40> send_request_headers.started request=<Request [b'POST']> send_request_headers.complete send_request_body.started request=<Request [b'POST']> send_request_body.complete receive_response_headers.started request=<Request [b'POST']> receive_response_headers.complete return_value=(b'HTTP/1.1', 401, b'Unauthorized', [(b'Date', b'Wed, 07 Aug 2024 05:18:30 GMT'), (b'Server', b'Apache/2.4.59 (Unix) OpenSSL/3.0.14'), (b'Cache-Control', b'no-cache, no-store, max-age=0'), (b'Pragma', b'no-cache'), (b'Expires', b'Thu, 01 Dec 1994 16:00:00 GMT'), (b'WWW-Authenticate', b'Digest realm="AXIS_XXX", nonce="XXX", algorithm=MD5, qop="auth"'), (b'X-Content-Type-Options', b'nosniff'), (b'X-Frame-Options', b'SAMEORIGIN'), (b'X-XSS-Protection', b'1; mode=block'), (b'Content-Security-Policy', b"default-src 'self'; frame-ancestors 'self'; connect-src 'self' https://*.google-analytics.com https://*.analytics.google.com https://*.googletagmanager.com https://*.axis.com mediastream: blob:; script-src 'self' 'unsafe-inline' 'unsafe-eval' https://*.googletagmanager.com https://www.google-analytics.com https://ssl.google-analytics.com https://*.axis.com; style-src 'self' 'unsafe-inline'; img-src 'self' https://*.google-analytics.com https://*.googletagmanager.com https://*.axis.com data: blob:; media-src 'self' mediastream: blob:; object-src 'none'"), (b'Upgrade', b'h2'), (b'Connection', b'Upgrade, Keep-Alive'), (b'Keep-Alive', b'timeout=5, max=100'), (b'Transfer-Encoding', b'chunked'), (b'Content-Type', b'text/html')]) HTTP Request: POST http://192.168.30.154/axis-cgi/pwdgrp.cgi "HTTP/1.1 401 Unauthorized" receive_response_body.started request=<Request [b'POST']> receive_response_body.complete response_closed.started response_closed.complete send_request_headers.started request=<Request [b'POST']> send_request_headers.complete send_request_body.started request=<Request [b'POST']> send_request_body.complete receive_response_headers.started request=<Request [b'POST']> receive_response_headers.complete return_value=(b'HTTP/1.1', 200, b'OK', [(b'Date', b'Wed, 07 Aug 2024 05:18:30 GMT'), (b'Server', b'Apache/2.4.59 (Unix) OpenSSL/3.0.14'), (b'Cache-Control', b'no-cache, no-store, max-age=0'), (b'Pragma', b'no-cache'), (b'Expires', b'Thu, 01 Dec 1994 16:00:00 GMT'), (b'X-Content-Type-Options', b'nosniff'), (b'X-Frame-Options', b'SAMEORIGIN'), (b'X-XSS-Protection', b'1; mode=block'), (b'Content-Security-Policy', b"default-src 'self'; frame-ancestors 'self'; connect-src 'self' https://*.google-analytics.com https://*.analytics.google.com https://*.googletagmanager.com https://*.axis.com mediastream: blob:; script-src 'self' 'unsafe-inline' 'unsafe-eval' https://*.googletagmanager.com https://www.google-analytics.com https://ssl.google-analytics.com https://*.axis.com; style-src 'self' 'unsafe-inline'; img-src 'self' https://*.google-analytics.com https://*.googletagmanager.com https://*.axis.com data: blob:; media-src 'self' mediastream: blob:; object-src 'none'"), (b'Authentication-Info', b'rspauth="05b0fb85b7e028a298025569a5d7a604", cnonce="e91ffc7101d8b930", nc=00000001, qop=auth'), (b'Keep-Alive', b'timeout=5, max=99'), (b'Connection', b'Keep-Alive'), (b'Transfer-Encoding', b'chunked'), (b'Content-Type', b'text/plain')]) HTTP Request: POST http://192.168.30.154/axis-cgi/pwdgrp.cgi "HTTP/1.1 200 OK" receive_response_body.started request=<Request [b'POST']> receive_response_body.complete response_closed.started response_closed.complete Response (from 192.168.30.154 /axis-cgi/pwdgrp.cgi): b'admin="axisconnect,webrtcacapuser,Kiosk,root"\r\noperator="HomeAssistant,axisconnect,webrtcacapuser,Kiosk,root"\r\nviewer="webrtcacapuser,HomeAssistant,axisconnect,Kiosk,tv0000F6C45D50,root"\r\nptz="axisconnect,webrtcacapuser,Kiosk,root"\r\ndigusers="root,tv0000F6C45D50,Um9u,Kiosk,axisconnect,webrtcacapuser,HomeAssistant"\r\n' rtsp://192.168.30.154/axis-media/media.amp?video=0&audio=0&event=on Stream listener online OPTIONS rtsp://192.168.30.154/axis-media/media.amp?video=0&audio=0&event=on RTSP/1.0 CSeq: 0 User-Agent: HASS Axis

Received data ['RTSP/1.0 200 OK', 'CSeq: 0', 'Public: OPTIONS, DESCRIBE, ANNOUNCE, GET_PARAMETER, PAUSE, PLAY, RECORD, SETUP, SET_PARAMETER, TEARDOWN', 'Server: GStreamer RTSP server', 'Date: Wed, 07 Aug 2024 05:18:31 GMT', ''] from 192.168.30.154 DESCRIBE rtsp://192.168.30.154/axis-media/media.amp?video=0&audio=0&event=on RTSP/1.0 CSeq: 1 User-Agent: HASS Axis Accept: application/sdp

Received data ['RTSP/1.0 401 Unauthorized', 'CSeq: 1', 'WWW-Authenticate: Digest realm="AXIS_XXX", nonce="XXX", stale=FALSE', 'Server: GStreamer RTSP server', 'Date: Wed, 07 Aug 2024 05:18:31 GMT', ''] from 192.168.30.154 DESCRIBE rtsp://192.168.30.154/axis-media/media.amp?video=0&audio=0&event=on RTSP/1.0 CSeq: 1 Authorization: Digest username="root", realm="AXIS_XXX", algorithm="MD5", nonce="XXX", uri="rtsp://192.168.30.154/axis-media/media.amp?video=0&audio=0&event=on", response="XXX" User-Agent: HASS Axis Accept: application/sdp

Received data ['RTSP/1.0 200 OK', 'CSeq: 1', 'Content-Type: application/sdp', 'Content-Base: rtsp://192.168.30.154/axis-media/media.amp/', 'Server: GStreamer RTSP server', 'Date: Wed, 07 Aug 2024 05:18:31 GMT', 'Content-Length: 551', '', 'v=0', 'o=- 12131067987285694320 1 IN IP4 192.168.30.154', 's=Session streamed with GStreamer', 'i=rtsp-server', 't=0 0', 'a=tool:GStreamer', 'a=type:broadcast', 'a=range:npt=now-', 'a=control:rtsp://192.168.30.154/axis-media/media.amp?video=0&audio=0&event=on', 'm=application 0 RTP/AVP 98', 'c=IN IP4 0.0.0.0', 'a=rtpmap:98 vnd.onvif.metadata/90000', 'a=ts-refclk:local', 'a=mediaclk:sender', 'a=ssrc:4255855964 cname:user157688849@host-71de763', 'a=x-onvif-track:APPLICATION000', 'a=recvonly', 'a=control:rtsp://192.168.30.154/axis-media/media.amp/stream=0?video=0&audio=0&event=on'] from 192.168.30.154 SETUP rtsp://192.168.30.154/axis-media/media.amp/stream=0?video=0&audio=0&event=on RTSP/1.0 CSeq: 2 Authorization: Digest username="root", realm="AXIS_XXX", algorithm="MD5", nonce="XXX", uri="rtsp://192.168.30.154/axis-media/media.amp?video=0&audio=0&event=on", response="XXX" User-Agent: HASS Axis Transport: RTP/AVP;unicast;client_port=64017-64018

Received data ['RTSP/1.0 200 OK', 'CSeq: 2', 'Transport: RTP/AVP;unicast;client_port=64017-64018;server_port=50004-50005;ssrc=FDAB355C;mode="PLAY"', 'Server: GStreamer RTSP server', 'Session: RidMW7a_IUpRokDR;timeout=60', 'Date: Wed, 07 Aug 2024 05:18:31 GMT', ''] from 192.168.30.154 PLAY rtsp://192.168.30.154/axis-media/media.amp?video=0&audio=0&event=on RTSP/1.0 CSeq: 3 Authorization: Digest username="root", realm="AXIS_XXX", algorithm="MD5", nonce="XXX", uri="rtsp://192.168.30.154/axis-media/media.amp?video=0&audio=0&event=on", response="XXX" User-Agent: HASS Axis Session: RidMW7a_IUpRokDR

Received data ['RTSP/1.0 200 OK', 'CSeq: 3', 'RTP-Info: url=rtsp://192.168.30.154/axis-media/media.amp/stream=0?video=0&audio=0&event=on;seq=31768;rtptime=3232108576', 'Range: npt=now-', 'Server: GStreamer RTSP server', 'Session: RidMW7a_IUpRokDR;timeout=60', 'Date: Wed, 07 Aug 2024 05:18:31 GMT', ''] from 192.168.30.154 OPTIONS rtsp://192.168.30.154/axis-media/media.amp?video=0&audio=0&event=on RTSP/1.0 CSeq: 4 User-Agent: HASS Axis Session: RidMW7a_IUpRokDR

Received data ['RTSP/1.0 200 OK', 'CSeq: 4', 'Public: OPTIONS, DESCRIBE, ANNOUNCE, GET_PARAMETER, PAUSE, PLAY, RECORD, SETUP, SET_PARAMETER, TEARDOWN', 'Server: GStreamer RTSP server', 'Session: RidMW7a_IUpRokDR;timeout=60', 'Date: Wed, 07 Aug 2024 05:19:26 GMT', ''] from 192.168.30.154

renaatdb commented 1 month ago

Not sure what the protocol is re: adding a comment to a closed topic, but I'm having exactly the same issue with the same cameras (P3265-LVE), so figured it would probably be easiest for anyone tracking if I tried to stick to the same thread.

All sensors work except the Object Analytics one.

image

For example, see the log form VMD3:

image

But nothing on the Object Analytics One.

image

I just reinstalled that camera after changing the username to one dedicated to Home Assistant.

Although, interestingly, I just noticed it's not grabbing the name of the scene from my cameras like my other cameras are doing (using the Axis root account). For example, this is the scene as named in another Axis camera:

image

I've got UPnP enabled in my camera and also enabled it on my Ultimate Dream Machine.

image

Any thoughts? Can I provide any other information? TIA!

UPDATE: Weird. One of my cameras works, but I've gone through the settings on the others and they appear identical, yet don't work. Not sure what I'm missing?

Here are the diagnostics for the working one:

config_entry-axis-01J34PJX4QCS3VW2WX9P313V75 - Working.json

And the non-working one:

config_entry-axis-01J3M2HP3K1N85YZD1P6NB0X70 - not working.json

I have Axis Q3538 LVE. Same problem. Stopped Axis Video Motion Detection and Started again. Now Object Analytics worked again. Stange? Regards

Kane610 commented 1 month ago

Same problem. Stopped Axis Video Motion Detection and Started again. Now Object Analytics worked again.

Just so I understand it; the integration was running the whole time while you were stopping/starting Axis Video Motion Detection? And just like that Object Analytics started to signal again?

If this is the case then I think that the issue would be on the device side

renaatdb commented 1 month ago

the integration was running the whole time: yes stopping/starting Axis Video Motion Detection: yes Object Analytics started to signal again: this worked for me. Renaat De Block l Lelielaan 8 Hever-Schiplaken 3191 l +32 474 21 04 73

Op vr 9 aug 2024 om 08:33 schreef Robert Svensson @.***

:

Same problem. Stopped Axis Video Motion Detection and Started again. Now Object Analytics worked again.

Just so I understand it; the integration was running the whole time while you were stopping/starting Axis Video Motion Detection? And just like that Object Analytics started to signal again?

If this is the case then I think that the issue would be on the device side

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

Kane610 commented 4 weeks ago

the integration was running the whole time: yes stopping/starting Axis Video Motion Detection: yes Object Analytics started to signal again: this worked for me. Renaat De Block l Lelielaan 8 Hever-Schiplaken 3191 l [+32 474 21 04 73](tel:+32 474 21 04 73) Op vr 9 aug 2024 om 08:33 schreef Robert Svensson @. : Same problem. Stopped Axis Video Motion Detection and Started again. Now Object Analytics worked again. Just so I understand it; the integration was running the whole time while you were stopping/starting Axis Video Motion Detection? And just like that Object Analytics started to signal again? If this is the case then I think that the issue would be on the device side — Reply to this email directly, view it on GitHub <#122159 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABGHV4YSX3BTIDOE45M6J6LZQRPCRAVCNFSM6AAAAABLECXVXSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENZXGI2DEMJUGU . You are receiving this because you commented.Message ID: @.>

Based on this descriptive it might be an issue with camera firmware

bob454522 commented 2 weeks ago

Something unusual on my end as well, 2x of my 4x cameras also stopped sending its obj. analytic events to the HA integration.
Milestone Xprotect is still picking up all object analytic events just fine (i know this as i have them trigger a sound alerts via axis network speakers placed around my house) - milestone picks up obj analytic events from all 12x of my axis cams, and they actually have a easy way to confirm that events are flowing (via the "axis optimizer" add on for milestone) - pict below.

Ive rebooted the 2x problem cameras and havent changed anything on my cameras camera since i made that opening post (and it has been working great in HA). I made sure that all services on the camera side are still on (they are). The 2x cameras at my front are still sending data to HA-Axis integration just fine. Its weird as all 4x had been rock solid up till the past few days (i have not done any of the recent HA updates either)

image

on the axis HA integration, its the same issue as when i opened this post (ie as back when i didnt have uPNP turned on) - when i reboot the camera it will show a few events, but that is all (ie in this pict i rebotted the camera 18min ago, And in that time I've done the "test alarm" button in the cams web GUI several times- they always do make it to milestone but they don't make it to the to the axis HA integration)

image

will try some more things and update if i get a fix.

(although It may be more reliable to look into using an event on the axis camera side to send a http get request to home assistant to then trigger my automation on action= object analytics line cross, i'm not sure that home assistant can support that but I assume it can somehow once i look into it).

bob454522 commented 2 weeks ago

i would like to help fix this issue, (and will).

but I want to point out as a workaround for now, for those of you who are trying to trigger an automation or something else on home assistant, as of 2023.5 HA update, you can setup a webhook as a trigger, to an automation. then over on the axis camera, set an event to use action= http notification, to do a GET of that webhook (which will trigger the HA automation).

image