Supergiovane / node-red-contrib-hikvision-ultimate

A native set of node for Hikvision Cameras, Doorbells, Alarms, Radars etc.
https://www.facebook.com/supergiovaneDev
MIT License
51 stars 11 forks source link

ANPR issue #57

Closed Innocentius-alt closed 11 months ago

Innocentius-alt commented 11 months ago

Hello. I use iDS-TCM203-A as ANPR and try to get info (license plate and direction) through Node-RED (version: 16.0.2) running under Home assistant OS on Raspberry pi4. From node ANPR and RAW Camera Event i get follow notification:

"Hikvision-config: FETCH ERROR: request to http://192.168.1.129/ISAPI/Event/notification/alertStream failed, reason: socket hang up"

Could you help?

Supergiovane commented 11 months ago

Hi Seems that the camera has reached the maximum connection limit. How many open connections to the camera do you have?

Innocentius-alt commented 11 months ago

Hi Seems that the camera has reached the maximum connection limit. How many open connections to the camera do you have?

Thank you for a quick reply!

Camera had connection with NVR Frigate running under another Home assistant {docker) and with browser on my laptop. I deleted them both but nothing changed

Innocentius-alt commented 11 months ago

There are other messages periodically appears: "Error: read ECONNRESET" on debug panel and "Error response: Forbidden Retry..." under ANPR node

Supergiovane commented 11 months ago

Hi "ECONNRESET" is sent from your camera. Can you please enable the debug log, by adding "banana" to the ANPR server config widow, like this?

Node-RED___192_168_1_16

Then please restart node-red and paste here the log. Thanks.

Innocentius-alt commented 11 months ago

"Errore hikvisionUltimateGetInfoCamANPR request to http://192.168.1.129banana/ISAPI/System/deviceInfo failed, reason: getaddrinfo ENOTFOUND 192.168.1.129banana"

Do you mean this log?

Supergiovane commented 11 months ago

Nope. Are you on the latest version of Hikvisio-Ultimate?

Innocentius-alt commented 11 months ago

Nope. Are you on the latest version of Hikvisio-Ultimate?

node-red-contrib-hikvision-ultimate 1.1.13

Supergiovane commented 11 months ago

I don't understand why the "banana" doesn't work. It should give you tons of line in your log, not the error you show me. Are you sure that the username and password are correct, as well as the authentication "Digest" and the protocol "http"?

Supergiovane commented 11 months ago

With "log" i mean node-red's log, not what you see in the GUI. Have you access to your homeassistant log? You should find here the node-red log as well (i presume).

Innocentius-alt commented 11 months ago

seems that this mistake "Error: read ECONNRESET" was called by another node "Alexa Home" I fixed it but still can not use nor ANPR node nor RAW Camera event node.

Here is lthe latest logs (with banana):

3 Jan 17:30:16 - [info] Stopping flows 3 Jan 17:30:17 - [info] [server:Home Assistant] Closing connection to http://supervisor/core 3 Jan 17:30:17 - [info] [server:Home Assistant] Closing connection to http://192.168.1.50:8123 3 Jan 17:30:17 - [info] [mqtt-broker:core-mosquitto] Disconnected from broker: mqtt://core-mosquitto:1883 3 Jan 17:30:17 - [info] [mqtt-broker:surveillance] Disconnected from broker: mqtt://192.168.1.111:1883 3 Jan 17:30:27 - [info] Stopped flows 3 Jan 17:30:27 - [info] Updated flows 3 Jan 17:30:27 - [info] Starting flows 3 Jan 17:30:28 - [info] Started flows 3 Jan 17:30:28 - [info] [server:Home Assistant] Connecting to http://192.168.1.50:8123 3 Jan 17:30:28 - [error] [api-current-state:gas_sensor] InputError: Entity could not be found in cache for entityId: sensor.gas_sensor 3 Jan 17:30:28 - [error] [api-current-state:is tower_water_leak_detector on?] InputError: Entity could not be found in cache for entityId: binary_sensor.lumi_lumi_sensor_wleak_aq1_moisture 3 Jan 17:30:28 - [error] [api-current-state:is tower_water_leak_detector on?] InputError: Entity could not be found in cache for entityId: binary_sensor.lumi_lumi_sensor_wleak_aq1_moisture_2 3 Jan 17:30:28 - [error] [api-current-state:sun_state] InputError: Entity could not be found in cache for entityId: sun.sun 3 Jan 17:30:28 - [info] [mqtt-broker:surveillance] Connected to broker: mqtt://192.168.1.111:1883 3 Jan 17:30:28 - [info] [mqtt-broker:core-mosquitto] Connected to broker: mqtt://core-mosquitto:1883 3 Jan 17:30:28 - [info] [server:Home Assistant] Connected to http://192.168.1.50:8123 Error: getDevices status code: 401 Error: getDevices returned data: undefined 3 Jan 17:30:32 - [info] [server:Home Assistant] Connecting to http://supervisor/core 3 Jan 17:30:32 - [info] [server:Home Assistant] Connected to http://supervisor/core

And logs without banana:

3 Jan 17:33:09 - [info] Stopping flows 3 Jan 17:33:09 - [info] [server:Home Assistant] Closing connection to http://supervisor/core 3 Jan 17:33:09 - [info] [server:Home Assistant] Closing connection to http://192.168.1.50:8123 3 Jan 17:33:09 - [info] [mqtt-broker:core-mosquitto] Disconnected from broker: mqtt://core-mosquitto:1883 3 Jan 17:33:09 - [info] [mqtt-broker:surveillance] Disconnected from broker: mqtt://192.168.1.111:1883 3 Jan 17:33:15 - [info] Stopped flows 3 Jan 17:33:15 - [info] Updated flows 3 Jan 17:33:15 - [info] Starting flows 3 Jan 17:33:16 - [info] Started flows 3 Jan 17:33:16 - [info] [server:Home Assistant] Connecting to http://192.168.1.50:8123 3 Jan 17:33:16 - [error] [api-current-state:gas_sensor] InputError: Entity could not be found in cache for entityId: sensor.gas_sensor 3 Jan 17:33:16 - [error] [api-current-state:is tower_water_leak_detector on?] InputError: Entity could not be found in cache for entityId: binary_sensor.lumi_lumi_sensor_wleak_aq1_moisture 3 Jan 17:33:16 - [error] [api-current-state:is tower_water_leak_detector on?] InputError: Entity could not be found in cache for entityId: binary_sensor.lumi_lumi_sensor_wleak_aq1_moisture_2 3 Jan 17:33:16 - [error] [api-current-state:sun_state] InputError: Entity could not be found in cache for entityId: sun.sun 3 Jan 17:33:16 - [info] [server:Home Assistant] Connected to http://192.168.1.50:8123 3 Jan 17:33:16 - [info] [mqtt-broker:surveillance] Connected to broker: mqtt://192.168.1.111:1883 3 Jan 17:33:17 - [info] [mqtt-broker:core-mosquitto] Connected to broker: mqtt://core-mosquitto:1883 Error: getDevices status code: 401 Error: getDevices returned data: undefined 3 Jan 17:33:20 - [info] [server:Home Assistant] Connecting to http://supervisor/core 3 Jan 17:33:20 - [info] [server:Home Assistant] Connected to http://supervisor/core

Supergiovane commented 11 months ago

Hi hmmm. no. This log doesn't contain any row wrote by node-red. You should ask on the HA forum, where is node-red's log.

Innocentius-alt commented 11 months ago

Should I enable SDK Listening or ISAPI Listening on Hikvision Configuration? ![Uploading 2.jpg…]()

Supergiovane commented 11 months ago

isapi

Innocentius-alt commented 11 months ago

like this?

3
Supergiovane commented 11 months ago

Newer seen such as option. Try enabling it.

Innocentius-alt commented 11 months ago

Now node "RAW Camera Event" periodically connects to Hikvision but a bit later disconnects with notification "Hikvision-config: streamPipeline: The user aborted a request.http://192.168.1.129:80"

Node "ANPR" never connects.

Supergiovane commented 11 months ago

There is someting wrong or different in the connection handling of your camera. I saw in the specs, you're using an advanced camera with AI. Maybe it uses a different protocol. I need a camera like yours, to be able to understand how to "speak" with that camera. If your username/password and authentication method are all right, thus not connecting, there is very little chance i'm able to fix it without owning that camera and, in case, i need a lot of time to try and test, because there is no understandable/official documentation about the protocol and about all the properties/method your camera can expose to third party apps. You may have more luck by using, for example, the FTP client of that camera and to write somewhere the plates. Then you can read the file it with HA. I know that HA has a plugin for connecting to Hikvision cameras.... i've spoken a lot in with the developer in the past. Maybe you can try with HA directly.

Supergiovane commented 11 months ago

PS: I'm using a DS-2CD4A26FWD-IZS/P anpr camera and it works flawlessy. It's up and running since about 2 years.

Innocentius-alt commented 11 months ago

Apparently i should to dig deeper in ISAPI. Anyway I appreciate your help. Thank you!!

Supergiovane commented 11 months ago

If you solve the issue, please share it with me, so i can add that on the hikvision node. Thanks!!