maciej-or / hikvision_next

Home Assistant integration for Hikvision NVRs and IP cameras
115 stars 23 forks source link

Motion detection not working 2024 #203

Open RomanovVIII opened 2 months ago

RomanovVIII commented 2 months ago

Good afternoon. My binary motion sensor of the cameras not working. The cameras are connected to NVR - DS-N208P(C). The cameras themselves work. motion detection in HIK Connect works. In Home Assistant - no.
Everything worked properly before. The problem is for the last 2-3 weeks. I tried reinstalling the integration. Tried installing the previous integration - 16. Still nothing works. What can I do?

Translated with DeepL.com (free version)

maciej-or commented 2 months ago

Did you update the firmware during this time? Please check in NVR's device info Notifications Host IP, should point to Home Assistant.

RomanovVIII commented 2 months ago

Did you update the firmware during this time? Please check in NVR's device info Notifications Host IP, should point to Home Assistant.

Yes, the firmware has been updated to version 17. The log shows the following:

Эта ошибка возникла в пользовательской интеграции. Регистратор: custom_components.hikvision_next.notifications Источник: custom_components/hikvision_next/notifications.py:57 интеграция: Hikvision NVR / IP Camera (документация, проблемы) Первое сообщение: 14:43:39 (15985 сообщений) Последнее сообщение: 23:41:36 Cannot process incoming event Entity not found None

RomanovVIII commented 2 months ago

Please check in NVR's device info Notifications Host IP, should point to Home Assistant.

Were can I found it?

maciej-or commented 2 months ago

You don't have to search anymore, the latest log shows that the notification reached HA, this is already half the success :) Event entity has not been found, to solve the issue I'd need full log from integration. pls catch the log as described here https://github.com/maciej-or/hikvision_next?tab=readme-ov-file#reporting-issues. Then trigger notification and paste everything you find in the log after line --- Incoming event notification ---

SiemprePicheo commented 2 months ago

I have the same problem with the motion detection entity not working.

RomanovVIII commented 2 months ago

You don't have to search anymore, the latest log shows that the notification reached HA, this is already half the success :) Event entity has not been found, to solve the issue I'd need full log from integration. pls catch the log as described here https://github.com/maciej-or/hikvision_next?tab=readme-ov-file#reporting-issues. Then trigger notification and paste everything you find in the log after line --- Incoming event notification ---

2024-09-11 17:58:39.356 DEBUG (MainThread) [custom_components.hikvision_next.notifications] --- Incoming event notification --- 2024-09-11 17:58:39.356 DEBUG (MainThread) [custom_components.hikvision_next.notifications] Source: 192.168.1.76 2024-09-11 17:58:39.356 DEBUG (MainThread) [custom_components.hikvision_next.notifications] request headers: <CIMultiDictProxy('Host': '192.168.1.36', 'User-Agent': 'HTTP_USER_AGENT', 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8', 'Accept-Language': 'ZH-cn;zh;q=0.5', 'Accept-Charset': 'gb2312,utf8;q=0.7,*;q=0.7', 'Authorization': 'Basic Og==', 'Content-Type': 'application/xml; charset="UTF-8"', 'Content-Length': '596', 'Connection': 'Keep-Alive')> 2024-09-11 17:58:39.357 DEBUG (MainThread) [custom_components.hikvision_next.notifications] alert info: <?xml version="1.0" encoding="UTF-8"?>

39 2024-09-11T17:58:40+03:00 430769 VMD active DS-N208P(C)0820220223CCRRJ54422129WCVU VMD&&DS-N208P(C)0820220223CCRRJ54422129WCVU,2024-09-11T17:58:40+03:00,39,1.0

2024-09-11 17:58:39.357 DEBUG (MainThread) [custom_components.hikvision_next.notifications] Alert: AlertInfo(channel_id=7, io_port_id=0, event_id='motiondetection', device_serial_no='DS-N208P(C)0820220223CCRRJ54422129WCVU', mac=None, region_id=0, detection_target=None) 2024-09-11 17:58:39.358 DEBUG (MainThread) [custom_components.hikvision_next.notifications] UNIQUE_ID: binary_sensor.ds_n208p_c_0820220223ccrrj54422129wcvu_7_motiondetection 2024-09-11 17:58:39.779 ERROR (MainThread) [aiohttp.server] Error handling request Traceback (most recent call last): File "/usr/local/lib/python3.12/site-packages/aiohttp/web_protocol.py", line 362, in data_received messages, upgraded, tail = self._request_parser.feed_data(data) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Stanislav-BT commented 2 months ago

I confirm! After the update, the motion detector on the cameras stopped working. Please fix it as it was)

SiemprePicheo commented 2 months ago

Guys, in the NVR itself, check if the boxes are checked like the screen I posted on another issue I've had. This solved my other issues, and I noticed the motion detection was also unchecked, then I could be able to re active it on Home Assistant

My solution for my own issue, and maybe the motion detection too : https://github.com/maciej-or/hikvision_next/issues/204#issuecomment-2336726501

Stanislav-BT commented 2 months ago

I confirm! After the update, the motion detector on the cameras stopped working. Please fix it as it was)

Update! Rebooted the recorder, everything worked.

RomanovVIII commented 2 months ago

Guys, in the NVR itself, check if the boxes are checked like the screen I posted on another issue I've had. This solved my other issues, and I noticed the motion detection was also unchecked, then I could be able to re active it on Home Assistant

My solution for my own issue, and maybe the motion detection too : #204 (comment)

Sure, I checked this, and I have everything marked with checkmarks as well.

RomanovVIII commented 2 months ago

I confirm! After the update, the motion detector on the cameras stopped working. Please fix it as it was)

Update! Rebooted the recorder, everything worked.

Стас, у меня это не помогает уже несколько недель

Stanislav-BT commented 2 months ago

I confirm! After the update, the motion detector on the cameras stopped working. Please fix it as it was)

Update! Rebooted the recorder, everything worked.

Стас, у меня это не помогает уже несколько недель

Вчера тоже думал, что не работает. Залез в настройки через веб интерфейс, перезагрузил. Проверил после все настройки по записи. И все сразу заработало, датчик движения начал передавать в ХА данные. До этого был провал, и после обновы приложения в ХА, не работало.

RomanovVIII commented 2 months ago

I confirm! After the update, the motion detector on the cameras stopped working. Please fix it as it was)

Update! Rebooted the recorder, everything worked.

Стас, у меня это не помогает уже несколько недель

Вчера тоже думал, что не работает. Залез в настройки через веб интерфейс, перезагрузил. Проверил после все настройки по записи. И все сразу заработало, датчик движения начал передавать в ХА данные. До этого был провал, и после обновы приложения в ХА, не работало.

Он сначала передает 1-2 мин. Потом отрубается. Но вот с line defection все в порядке. I hope, integration author will fix it.

maciej-or commented 2 months ago

please use English, this discussion is for the whole world

RomanovVIII commented 2 months ago

please use English, this discussion is for the whole world

Motion still not working