core: ONVIF - Trying to add unbranded VIKVIZ camera fails because of broken `utf-8` (firmware bug)

The problem

When i try to add a camera to ONVIF, it fails as in the logs attached. The form seems to work but then the integration shows “Failed to set up. Check logs”

Its an unbranded PTZ but looks the same as a FOSCAM (also tried that integration, but didnt work) If i try an ONVIF browser it works. Also the web interface and RTSP etc

Its this camera https://www.amazon.com/Hikvision-Compatible-18xOptical-Security-4818X-IZ/dp/B089M9WR7L/ref=sr_1_1?crid=3YIWQ7GJB2Z6&keywords=ONVIF+PTZ+IP+Camera+18+zoom&qid=1678695900&sprefix=onvif+ptz+ip+camera+18+z%2Caps%2C298&sr=8-1

Any help would be appreciated!

What version of Home Assistant Core has the issue?

2023.3.1

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Supervised

Integration causing the issue

onvif

Link to integration documentation on our website

2023-03-13 19:14:49.177 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry PTZ - F0:00:00:C6:34:8C for onvif File "/usr/src/homeassistant/homeassistant/components/onvif/__init__.py", line 30, in async_setup_entry File "/usr/src/homeassistant/homeassistant/components/onvif/device.py", line 108, in async_setup File "/usr/src/homeassistant/homeassistant/components/onvif/device.py", line 255, in async_get_device_info Content: b'<?xml version="1.0" encoding="UTF-8"?>\n<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope" xmlns:SOAP-ENC="http://www.w3.org/2003/05/soap-encoding" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsdd="http://schemas.xmlsoap.org/ws/2005/04/discovery" xmlns:chan="http://schemas.microsoft.com/ws/2005/02/duplex" xmlns:wsa5="http://www.w3.org/2005/08/addressing" xmlns:xmime="http://www.w3.org/2005/05/xmlmime" xmlns:xop="http://www.w3.org/2004/08/xop/include" xmlns:wsrfbf="http://docs.oasis-open.org/wsrf/bf-2" xmlns:tt="http://www.onvif.org/ver10/schema" xmlns:wstop="http://docs.oasis-open.org/wsn/t-1" xmlns:wsrfr="http://docs.oasis-open.org/wsrf/r-2" xmlns:tan="http://www.onvif.org/ver20/analytics/wsdl" xmlns:tdn="http://www.onvif.org/ver10/network/wsdl" xmlns:tds="http://www.onvif.org/ver10/device/wsdl" xmlns:tev="http://www.onvif.org/ver10/events/wsdl" xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2" xmlns:c14n="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:xenc="http://www.w3.org/2001/04/xmlenc#" xmlns:wsc="http://schemas.xmlsoap.org/ws/2005/02/sc" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:timg="http://www.onvif.org/ver20/imaging/wsdl" xmlns:tmd="http://www.onvif.org/ver10/deviceIO/wsdl" xmlns:tptz="http://www.onvif.org/ver20/ptz/wsdl" xmlns:trt="http://www.onvif.org/ver10/media/wsdl" xmlns:ter="http://www.onvif.org/ver10/error" xmlns:tns1="http://www.onvif.org/ver10/topics" xmlns:trt2="http://www.onvif.org/ver20/media/wsdl" xmlns:tr2="http://www.onvif.org/ver20/media/wsdl" xmlns:ewsd="http://www.onvifext.com/onvif/ext/ver10/wsdl" xmlns:exsd="http://www.onvifext.com/onvif/ext/ver10/schema" xmlns:tnshik="http://www.hikvision.com/2011/event/topics" xmlns:hikwsd="http://www.onvifext.com/onvif/ext/ver10/wsdl" xmlns:hikxsd="http://www.onvifext.com/onvif/ext/ver10/schema"><SOAP-ENV:Header><wsse:Security><wsse:UsernameToken><wsse:Username>silicoon</wsse:Username><wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest">DPb6nMp+mrRX5hSUUnstDJb067M=</wsse:Password><wsse:Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">bYKxmWa8bL1mTH7OjHPTCA==</wsse:Nonce><wsu:Created>2023-03-13T08:14:49+00:00</wsu:Created></wsse:UsernameToken></wsse:Security></SOAP-ENV:Header><SOAP-ENV:Body><tds:GetDeviceInformationResponse><tds:Manufacturer>ONVIF_ICAMERA</tds:Manufacturer><tds:Model>800S-\xd3\xa2\xce\xc4_AF</tds:Model><tds:FirmwareVersion>V3.0.9.2 build 2022-07-07 16:10:10 &#xA;</tds:FirmwareVersion><tds:SerialNumber>EF00000000C6348C</tds:SerialNumber><tds:HardwareId>1419d68a-1dd2-11b2-a105-F00000C6348C</tds:HardwareId></tds:GetDeviceInformationResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>\r\n'

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

2023-03-13 19:14:49.177 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry PTZ - F0:00:00:C6:34:8C for onvif
File "/usr/src/homeassistant/homeassistant/components/onvif/__init__.py", line 30, in async_setup_entry
File "/usr/src/homeassistant/homeassistant/components/onvif/device.py", line 108, in async_setup
File "/usr/src/homeassistant/homeassistant/components/onvif/device.py", line 255, in async_get_device_info
Content: b'<?xml version="1.0" encoding="UTF-8"?>\n<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope" xmlns:SOAP-ENC="http://www.w3.org/2003/05/soap-encoding" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsdd="http://schemas.xmlsoap.org/ws/2005/04/discovery" xmlns:chan="http://schemas.microsoft.com/ws/2005/02/duplex" xmlns:wsa5="http://www.w3.org/2005/08/addressing" xmlns:xmime="http://www.w3.org/2005/05/xmlmime" xmlns:xop="http://www.w3.org/2004/08/xop/include" xmlns:wsrfbf="http://docs.oasis-open.org/wsrf/bf-2" xmlns:tt="http://www.onvif.org/ver10/schema" xmlns:wstop="http://docs.oasis-open.org/wsn/t-1" xmlns:wsrfr="http://docs.oasis-open.org/wsrf/r-2" xmlns:tan="http://www.onvif.org/ver20/analytics/wsdl" xmlns:tdn="http://www.onvif.org/ver10/network/wsdl" xmlns:tds="http://www.onvif.org/ver10/device/wsdl" xmlns:tev="http://www.onvif.org/ver10/events/wsdl" xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2" xmlns:c14n="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:xenc="http://www.w3.org/2001/04/xmlenc#" xmlns:wsc="http://schemas.xmlsoap.org/ws/2005/02/sc" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:timg="http://www.onvif.org/ver20/imaging/wsdl" xmlns:tmd="http://www.onvif.org/ver10/deviceIO/wsdl" xmlns:tptz="http://www.onvif.org/ver20/ptz/wsdl" xmlns:trt="http://www.onvif.org/ver10/media/wsdl" xmlns:ter="http://www.onvif.org/ver10/error" xmlns:tns1="http://www.onvif.org/ver10/topics" xmlns:trt2="http://www.onvif.org/ver20/media/wsdl" xmlns:tr2="http://www.onvif.org/ver20/media/wsdl" xmlns:ewsd="http://www.onvifext.com/onvif/ext/ver10/wsdl" xmlns:exsd="http://www.onvifext.com/onvif/ext/ver10/schema" xmlns:tnshik="http://www.hikvision.com/2011/event/topics" xmlns:hikwsd="http://www.onvifext.com/onvif/ext/ver10/wsdl" xmlns:hikxsd="http://www.onvifext.com/onvif/ext/ver10/schema"><SOAP-ENV:Header><wsse:Security><wsse:UsernameToken><wsse:Username>silicoon</wsse:Username><wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest">DPb6nMp+mrRX5hSUUnstDJb067M=</wsse:Password><wsse:Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">bYKxmWa8bL1mTH7OjHPTCA==</wsse:Nonce><wsu:Created>2023-03-13T08:14:49+00:00</wsu:Created></wsse:UsernameToken></wsse:Security></SOAP-ENV:Header><SOAP-ENV:Body><tds:GetDeviceInformationResponse><tds:Manufacturer>ONVIF_ICAMERA</tds:Manufacturer><tds:Model>800S-\xd3\xa2\xce\xc4_AF</tds:Model><tds:FirmwareVersion>V3.0.9.2 build 2022-07-07 16:10:10 &#xA;</tds:FirmwareVersion><tds:SerialNumber>EF00000000C6348C</tds:SerialNumber><tds:HardwareId>1419d68a-1dd2-11b2-a105-F00000C6348C</tds:HardwareId></tds:GetDeviceInformationResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>\r\n'

Additional information

No response

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 21 (13 by maintainers)

Commits related to this issue

Most upvoted comments

Holy shit you’re a wizard harry! Forgot to delete! Thanks so much!

I ordered that camera. I’ll see if I can get it working