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
71k stars 29.64k forks source link

ONVIF Time problem #121952

Open LordXaosa opened 1 month ago

LordXaosa commented 1 month ago

The problem

After camera reboot it's time resets and ONVIF integration can't authenticate because security header with nonce has more than 5 seconds difference (it's actually half a year difference). So after camera reboot ONVIF integration asks reconfiguration and provided username and password won't work.

I've tested onvif device manager software where all works fine and dumped with wireshark some data. I've realized that this software asks anonymously camera about it's time and then authorizes with camera time (not local), so authenticated requests works fine and it can set date and time.

So please check if camera has wrong time and pass correct auth header. Software request: image Response: image

Forward requests with authorization: image

What version of Home Assistant Core has the issue?

core-2024.7.2

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

No response

Link to integration documentation on our website

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

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

home-assistant[bot] commented 1 month ago

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

Code owner commands Code owners of `onvif` 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 onvif` 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)


onvif documentation onvif source (message by IssueLinks)