{"id":754,"date":"2023-02-06T13:59:29","date_gmt":"2023-02-06T11:59:29","guid":{"rendered":"https:\/\/exchangetimes.net\/?p=754"},"modified":"2023-02-06T14:03:54","modified_gmt":"2023-02-06T12:03:54","slug":"onvif-integration-failing-with-couldnt-connect-to-camera-x-please-verify-that-the-credentials-are-correct-error-invalid-data","status":"publish","type":"post","link":"http:\/\/exchangetimes.net\/?p=754","title":{"rendered":"ONVIF integration failing with &#8220;Couldn&#8217;t connect to camera x, please verify that the credentials are correct. Error: Invalid data&#8221;"},"content":{"rendered":"\n<p>A few weeks ago I noticed that I was unable to view one of my CCTV cameras from within <a href=\"https:\/\/www.home-assistant.io\/\" target=\"_blank\" rel=\"noopener\">Home Assistant<\/a>.<\/p>\n<p>After some investigation on the <a href=\"https:\/\/www.onvif.org\/\" target=\"_blank\" rel=\"noopener\">ONVIF<\/a> integration I noticed the below error:<\/p>\n<pre class=\"gh-header-title mb-2 lh-condensed f1 mr-0 flex-auto wb-break-word\"><bdi class=\"js-issue-title markdown-title\">ONVIF integration failing with \"Couldn't connect to camera x, please verify that the credentials are correct. Error: Invalid data\"<br \/><br \/><br \/><\/bdi><\/pre>\n\n\n\n<p>I checked the credentials set for the camera and confirmed that the credentials were not the issue. After some research I found <a href=\"https:\/\/github.com\/home-assistant\/core\/issues\/76368\" target=\"_blank\" rel=\"noreferrer noopener\">this github issue<\/a> which pointed me to <a href=\"https:\/\/www.galsys.co.uk\/news\/what-is-ntp-a-beginners-guide-to-network-time-protocol\/\" target=\"_blank\" rel=\"noreferrer noopener\">NTP<\/a>.<\/p>\n\n\n\n<p>I then logged into the camera itself and enabled NTP as per the picture below. I then refreshed the integration in Home Assistant and the integration managed to connect to the camera again and the stream was viewable from Home Assistant as expected.<\/p>\n\n\n\n<p>To note, I have since rebooted Home Assistant a few times and the ONVIF integration has been working without any issue.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/exchangetimes.net\/wp-content\/uploads\/2023\/02\/dahua.png\"><img loading=\"lazy\" decoding=\"async\" width=\"740\" height=\"548\" src=\"https:\/\/exchangetimes.net\/wp-content\/uploads\/2023\/02\/dahua.png\" alt=\"\" class=\"wp-image-756\" srcset=\"http:\/\/exchangetimes.net\/wp-content\/uploads\/2023\/02\/dahua.png 740w, http:\/\/exchangetimes.net\/wp-content\/uploads\/2023\/02\/dahua-300x222.png 300w\" sizes=\"auto, (max-width: 740px) 100vw, 740px\" \/><\/a><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>A few weeks ago I noticed that I was unable to view one of my CCTV cameras from within Home Assistant. After some investigation on the ONVIF integration I noticed the below error: ONVIF integration failing with &#8220;Couldn&#8217;t connect to camera x, please verify that the credentials are correct. Error: Invalid data&#8221; I checked the credentials set for the camera and confirmed that the credentials were not the issue. After some research I found this github issue which pointed me to NTP. I then logged into the camera itself and enabled NTP as per the picture below. I then refreshed the integration in Home Assistant and the integration managed to connect to the camera again and the stream was viewable from Home Assistant as expected. To note, I have since rebooted Home Assistant a few times and the ONVIF integration has been working without any issue.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[615,614],"tags":[622,623,607,621,619,620],"class_list":["post-754","post","type-post","status-publish","format-standard","hentry","category-home-assistant","category-home-automation","tag-cctv","tag-credential-error-using-onvif-in-home-assistant-after-verifying-that-the-credentials-are-correct","tag-home-assistant","tag-onvif","tag-onvif-integration-failing-with-couldnt-connect-to-camera","tag-onvif-please-verify-that-the-credentials-are-correct"],"_links":{"self":[{"href":"http:\/\/exchangetimes.net\/index.php?rest_route=\/wp\/v2\/posts\/754","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/exchangetimes.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/exchangetimes.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/exchangetimes.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/exchangetimes.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=754"}],"version-history":[{"count":4,"href":"http:\/\/exchangetimes.net\/index.php?rest_route=\/wp\/v2\/posts\/754\/revisions"}],"predecessor-version":[{"id":759,"href":"http:\/\/exchangetimes.net\/index.php?rest_route=\/wp\/v2\/posts\/754\/revisions\/759"}],"wp:attachment":[{"href":"http:\/\/exchangetimes.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=754"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/exchangetimes.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=754"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/exchangetimes.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=754"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}