maciej-or / hikvision_next

Home Assistant integration for Hikvision NVRs and IP cameras
102 stars 19 forks source link

configuration failed #189

Closed roma777roma closed 3 weeks ago

roma777roma commented 1 month ago

HI, Sorry if this is the wrong way to ask for help, but I have a problem with the integration. This is the first time I've installed it so I'm not sure I've done everything right even though there are very few fields to configure. The integration gives me a "configuration failure" on all 3 cameras (2 model DS-2CD2685FWD-IZS and 1 model DS-2CD2685FWD-IZS (B)) even if then entering into the detail of each individual camera the video flow and I see other things working

image

image

image

I enabled debugging in the log and among the countless lines there I saw this:

2024-07-19 11:17:18.366 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry Rear Camera for hikvision_next Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 586, in async_setup result = await component.async_setup_entry(hass, self) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/hikvision_next/init.py", line 93, in async_setup_entry refresh_disabled_entities_in_registry(hass, isapi) File "/config/custom_components/hikvision_next/init.py", line 181, in refresh_disabled_entities_in_registry update_entity(event, SWITCH_ENTITY_ID_FORMAT) File "/config/custom_components/hikvision_next/init.py", line 170, in update_entity if entity.disabled != event.disabled: ^^^^^^^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'disabled'

could this be the problem?

If necessary I could attach the entire log file. Thank you very much Andrea

maciej-or commented 1 month ago

Hi, This is the best way to ask for help :) In the last version there is small bug, it is fixed but not released yet. If you get integration from the main branch it should work for you.

roma777roma commented 1 month ago

Hi, This is the best way to ask for help :) In the last version there is small bug, it is fixed but not released yet. If you get integration from the main branch it should work for you.

done, I confirm that everything works. Thanks so much for the support! :-)

maciej-or commented 3 weeks ago

https://github.com/maciej-or/hikvision_next/releases/tag/v1.0.17