-
-
Notifications
You must be signed in to change notification settings - Fork 31.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hikvision binary sensor fails to initialize #107892
Comments
Hey there @mezz64, mind taking a look at this issue as it has been labeled with an integration ( Code owner commandsCode owners of
(message by CodeOwnersMention) hikvision documentation |
This is being troubleshooted in the library repo (mezz64/pyHik#93). It's not an issue with the component side code. This can be closed. |
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. |
The problem
The Hikvision binary sensor fails to initialize. It had been working fine for the past 2 years.
NVR: Hikvision DS-7604NI-K1/4P(C)
I recently upgraded my NVR to V4.75.200 build 231110
`Error while setting up hikvision platform for binary_sensor
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 360, in _async_setup_platform
await asyncio.shield(task)
File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/hikvision/binary_sensor.py", line 110, in setup_platform
data = HikvisionData(hass, url, port, name, username, password)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/hikvision/binary_sensor.py", line 157, in init
self.camdata = HikCamera(self._url, self._port, self._username, self._password)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/pyhik/hikvision.py", line 116, in init
self.initialize()
File "/usr/local/lib/python3.11/site-packages/pyhik/hikvision.py", line 291, in initialize
events_available = self.get_event_triggers()
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/pyhik/hikvision.py", line 435, in get_event_triggers
etchannel_num = int(etchannel.text)
^^^^^^^^^^^^^^^^^^^
TypeError: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'`
What version of Home Assistant Core has the issue?
core-2024.1.2
What was the last working version of Home Assistant Core?
core-2024.1.2
What type of installation are you running?
Home Assistant OS
Integration causing the issue
Hikvision
Link to integration documentation on our website
https://www.home-assistant.io/integrations/hikvision/
Diagnostics information
Traceback (most recent call last).txt
Example YAML snippet
Anything in the logs that might be useful for us?
File "/usr/local/lib/python3.11/site-packages/pyhik/hikvision.py", line 435, in get_event_triggers etchannel_num = int(etchannel.text) ^^^^^^^^^^^^^^^^^^^ TypeError: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Additional information
NVR: Hikvision DS-7604NI-K1/4P(C)
I recently upgraded my NVR to V4.75.200 build 231110
The text was updated successfully, but these errors were encountered: