Core: ONVIF integration error: "Could not configure unique ID for ONVIF device"

Created on 20 May 2020  路  26Comments  路  Source: home-assistant/core

The problem

I have upgraded to HA 0.110 from latest 0.109.x and removed working onvif camera configration from config file. Then tried to add ONVIF integration:

  • no camera were found automatically
  • entered new name, IP address and port
  • entered login name and password
    and got error message saying "Could not configure unique ID for ONVIF device".
    And no ONVIF integration were created.

Environment

  • Home Assistant Core release with the issue: 0.110.0
  • Last working Home Assistant Core release (if known): 0.109.latest
  • Operating environment (Home Assistant/Supervised/Docker/venv): HA Core on Docker
  • Integration causing this issue: ONVIF
  • Link to integration documentation on our website:

Problem-relevant configuration.yaml

N/A

Traceback/Error logs

Additional information

onvif

All 26 comments

Indeed, have closed mine :)
In my case, the integration found all 3 cameras (after I clicked add and then ONVIF) so I could select from the list, but after giving in user/pass I got the same error message.

Note, None of these 3 cameras use the default port (8080).

Hey there @hunterjm, mind taking a look at this issue as its been labeled with a integration (onvif) you are listed as a codeowner for? Thanks!
(message by CodeOwnersMention)

My camera uses port 80.
Sometimes it detects the camera as IPCAM(), then I have to provide login credentials, but finally got the same error as described.

If the camera is discovered, the port that shows in the discovery flow is the correct one. This error means that the MAC address for the camera can not be fetched. What are the make/models of your cameras? Do the users you are trying to authenticate with have full permissions, or are they limited users?

Hi, having the same issue with my ONVIF cams. I have two, both showed up in the automatic discovery flow. I was able to add one but the other is giving the same error that was reported.

For the user accounts, both are using homeassistant accounts that do not allow admin functions. I tried using the admin account on the camera I get the error with and still get the same error.

I'm able to connect to either camera using ONVIF device manager (https://sourceforge.net/projects/onvifdm/). The one is that works reports the manufacture as "IPCAM" and the model "FC2403" The one that returns the error is listed as "Wanviews" and "xseries" for the model.

Same here, providing admin credentials doesn't help either.
My camera is some chinese OEM brand (oem/xseries)
The ONVIF Device Manager reports some info but without MAC address (see screenshot)
obraz

I have exact the same problems as described above. The cameras are also a chinese brand (wanview?) but worked fine in the previous version of homeassistant. I also use these cameras without any problem on Synology Surveillance station, so the cameras couldn't be the problem. Thet cameras are using port 80.

Same problem here. The camera is from a chinese manufacturer Wansview, model Q3.

Same problem here, Chinese camera 'Eyesys' worked in 0.109, now does not with the integration in 0.110.

2 of my cameras are from Safe-home (danish brand) and one from Wansview W3.
As a platform all 3 work fine, though (I'm back on 0-109-6):

- platform: onvif
  name: camera2_garage
  host: <ip>
  username: <user>
  password: <pass>
  port: 8089

Edit: for 2 of the cameras I authenticate with a "viewer" account, for the third I use the administrator account. Same result.

Same problem here. Cameras are discovered, but eventually integration fails with that error message. Manual configuration doesn't help either.
I need to rollback to 0.109 to have my cameras back to work.

Same problem here.

Cam Model: Conceptronic jareth

Error: Could not configure unique ID for ONVIF device
HA: 110.1

This is not a very easy fix. The MAC address was previously used as the unique id in the camera integration, which means you likely have entries in the entity registry with blank unique IDs or even _1. Is the integration able to discover these devices if you go to add them in the UI? If so, there is another ERP ID that I can probably use as a fallback.

That makes sense. Would it be possible to let users enter the mac as part of the discovery process when the error is discovered?

For me, discovery is able to find the device, the error is after selecting the device and entering the un/pw

@superdj4life @twkrol @olealm - Can one of you update your logger config to the one below and share the last couple lines starting at [zeep.asyncio.transport] HTTP Post to http:// right after you get that error on setup?

logger:
  default: critical
  logs:
    homeassistant.components.onvif: debug
    zeep: debug

Sure, this is from my log (security related items replaced by xxxxx, xml is not well presented here):
`

2020-05-22 08:36:52 DEBUG (MainThread) [zeep.wsdl.wsdl] Adding service: DeviceService

2020-05-22 08:36:52 DEBUG (MainThread) [zeep.asyncio.transport] HTTP Post to http://192.168.xxx.xxx:80/onvif/device_service:

b'\nxxxxxxxxxxxxxxxxxxxxxxxxxx2020-05-22T08:36:52+00:00'

2020-05-22 08:36:52 DEBUG (MainThread) [zeep.asyncio.transport] HTTP Response from http://192.168.xxx.xxx:80/onvif/device_service (status: 200):

b'\nxxxxxxxxxxxxxxxxxxxxxxZpS/wmaftLkh10Gp7/wcjg==2020-05-22T08:36:52+00:00\r\n'
`

My log looks like this:

2020-05-22 10:38:51 DEBUG (MainThread) [zeep.asyncio.transport] HTTP Post to http://10.0.0.64:80/onvif/device_service:
b'\nxxxxxxxxxxxx2020-05-22T08:38:51+00:00'

2020-05-22 10:38:52 DEBUG (MainThread) [zeep.asyncio.transport] HTTP Response from http://10.0.0.64:80/onvif/device_service (status: 200):
b'\nxxxxxxxxxxxx2020-05-22T08:38:51+00:00\r\n'
```

Thanks. I'll need to think about how to assign a unique ID for the config flow when the device doesn't support returning a MAC address.

Could it be the Hardware identity or Device ID as read by the ONVIF Device Manager? Just have to make sure it's not the same for a model.
At last, the IP address & port number are quite unique.
Just my 3 cents.

IP/Port is only unique if it's not assigned through DHCP. I can absolutely look into Hardware/Device ID. I've got 2 cameras that are the exact same model/FW version that I can test that with.

Yeah, IP can change, as well as someone might use a DNS name for connection purpose.
Unfortunately I'm unaware of ONVIF attributes that can be read from a device :(

Maybe a bit late to the party, but checked all my 3 problematic cameras (unique ID problem). Using ONVIF device manager, it looks like Mac is returned. Ends up interpreted as "Hardware". Same goes for all 3 cameras (2 different brands, but looks like FW is generic):
2020-05-23 11_20_29-ONVIF Device Manager v2 2 250

Well, inspired by your findings I've decoded Hardware id of my camera which is really a scrambled MAC address. Take a look:
Hardware id reported by Onvif Device Manager: 78-FFFFFFA5-FFFFFFDD-2A-FFFFFF97-0C
MAC address: 78:A5:DD:2A:97:0C

Looks like it added FFFFFF three times: to 2nd, 3rd and 5th MAC address byte.
Hope it helps.

Would still be unique to each camera, so guess it could be used as unique identifier as long as there is room for it.

It鈥檚 planned to release in 0.110.3 (unfortunately didn鈥檛 happen into today鈥檚 0.110.2)

https://github.com/home-assistant/core/milestone/321?closed=1

From: Dominick Marino notifications@github.com
Sent: Sunday, May 24, 2020 11:04 PM
To: home-assistant/core core@noreply.github.com

I see this has been closed, was there a resolution?

Yeah, still not working in 110.2 so I'll stick to platform: ffmpeg until .3 is here.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

flsabourin picture flsabourin  路  3Comments

piitaya picture piitaya  路  3Comments

Elmardus picture Elmardus  路  3Comments

neonandu picture neonandu  路  3Comments

sh0rez picture sh0rez  路  3Comments