ONVIF integration failing with “Couldn’t connect to camera x, please verify that the credentials are correct. Error: Invalid data”
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 "Couldn't connect to camera x, please verify that the credentials are correct. Error: Invalid data"
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.