Skip to content
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

Detect motion no working #131

Open
pepsonEL opened this issue Dec 20, 2023 · 36 comments
Open

Detect motion no working #131

pepsonEL opened this issue Dec 20, 2023 · 36 comments
Labels
help Troubleshooting

Comments

@pepsonEL
Copy link

Hi. I have NVR model DS-7616NXI-K2 with FW 4.76.005 and i have connected 7 cameras. Cameras detect motion and record. But in your integration detect is no reconized. Still show no detect....on binary sensor.

@george-oniceag
Copy link

george-oniceag commented Dec 21, 2023

I have the same problem with: DS-7608NI-K2/8P
Firmware: V4.74.200

@TolianIPB
Copy link

I have the same problem with: DS-7608NI-K2/8P
Firmware: V4.74.205 build 230712

@pepsonEL
Copy link
Author

pepsonEL commented Jan 3, 2024

Any update ?

@maciej-or
Copy link
Owner

Apparently NVR sends notification in unexpected format, it might be related to firmware version, please share log as described here: https://github.com/maciej-or/hikvision_next#reporting-issues
It will be enough to paste everything after line:
--- Incoming event notification ---

@maciej-or maciej-or added the logs needed This doesn't seem right label Jan 7, 2024
@pepsonEL
Copy link
Author

pepsonEL commented Jan 7, 2024

I send and email.... but no response.... i am from poland.... and also write on FB on Home Assistant group... maybe contact with me it will be better to share logs.

@maciej-or
Copy link
Owner

@pepsonEL The best place for discussing this integration is here. Each post is available to the community and can be a helpful tip or guide for others as well.

@pepsonEL
Copy link
Author

pepsonEL commented Jan 7, 2024

ok but logs has many address about my network. I dont want share it public.

@pepsonEL
Copy link
Author

and ?

@pepsonEL
Copy link
Author

and any news.,.... can you help us ?

@maciej-or
Copy link
Owner

I have no access to K2 devices, so logs are only way to help me with eventual fix. If you afraid to publish your ips you can easily replace them in the log before send. Consider using pastebin.com which has handy features like burn after read and expiration time.

@pepsonEL
Copy link
Author

But please send me step by step how get loga gor you.

@maciej-or
Copy link
Owner

https://github.com/maciej-or/hikvision_next#reporting-issues
after restart HA, trigger an event and send me all after line:
--- Incoming event notification ---

It's not straightforward but I believe you will manage that

@pepsonEL
Copy link
Author

After restart i dont see it

--- Incoming event notification ---

@pepsonEL
Copy link
Author

https://github.com/maciej-or/hikvision_next#reporting-issues after restart HA, trigger an event and send me all after line: --- Incoming event notification ---

It's not straightforward but I believe you will manage that

Looks i get this logs:
https://pastebin.com/ZxRwfTfV

@maciej-or
Copy link
Owner

awesome, did you trigger motion event? I can't see incoming notification in the log.

@pepsonEL
Copy link
Author

pepsonEL commented Jan 22, 2024

yes on cameras in your integration i have enbable:
Intrusion Detection
Line Crossing Detection
Motion Detection
Video Loss Detection

By web GUI NVR Hikvision i have enable it and my camera on NVR record by motion detect.

@maciej-or
Copy link
Owner

I've checked your logs, Alarm server is configured properly but Home Assistant does not receive notifications from NVR.
Do you get notifications in HikConnect mobile app? If not please check Notify Surveillance Center option for the event.

@pepsonEL
Copy link
Author

In mobile app also no recive notification. I check Notify Surveillance Center and get you info.

@pepsonEL
Copy link
Author

But please tell me where i can enable it ? I can not find this option....

@maciej-or
Copy link
Owner

Oh man, you haven't read this f* manual ;)
image

@pepsonEL
Copy link
Author

I dont have it.... I have only send to IVMS-4200
image

@maciej-or
Copy link
Owner

wow, really interesting, maybe your device doesn't support that. Anyway you could try IVMS-4200.
What your device manual says about using HikConnect app?

This is my UI in polish:
image

@pepsonEL
Copy link
Author

pepsonEL commented Jan 23, 2024

I have add my NVR to app HikConnect and works ok.

And what you have model NVR with which FW version ? And for you works motion detection ok and show it in HA ?

HAHAHAHA
I see that manual for my NVR also show in alarm that one option should be: Notify Surveillance Center
Again i think that HikVision is stuppid devices and with many bugs.... Still this is show and i see. New device is not true that better,

@maciej-or
Copy link
Owner

I own this one https://www.hikvision.com/en/products/IP-Products/Network-Video-Recorders/Pro-Series/ds-7608nxi-i2-8p-s
with the latest FW.
From my experience HikVision has very inconsistent software. It looks like different teams are working on the software for individual models, and yet others are working on documentation. It's a shame because it's good hardware, and weak software is wasting its potential.

@maciej-or maciej-or added help Troubleshooting and removed logs needed This doesn't seem right labels Jan 23, 2024
@pepsonEL
Copy link
Author

You have this model select as EOL on HikVision ?

@pepsonEL
Copy link
Author

Activated send to IVMS4200 nothing change. Still no show motion in HA

@maciej-or
Copy link
Owner

My NVR became EOL last year. It seems you device doesn't support notification way used by this integration. Sorry.

@pepsonEL
Copy link
Author

But other user has the same problem.... not only me.... other user in this thread ex has model DS-7608NI-K2/8P and also has problem.....
In my opinion problem is in integration.

@maciej-or
Copy link
Owner

the error submitted in #132 occurs after --- Incoming event notification ---
Initially I thought your issue is the same but you confirmed the log does not contain that line. Most likely fw on K2 devices has sth changed.

@pepsonEL
Copy link
Author

pepsonEL commented Jan 29, 2024

Can you do something ?

@alexander-tomov
Copy link

Hello, I have the following device:
Device Model
DS-7616NXI-K2
Firmware Version
V4.75.005 build 230630

I also experience the issue described here
"Cannot process incomming event."

@alexander-tomov
Copy link

My user, I use in your integration has these permissions:
Screenshot 2024-01-30 at 0 41 19

These are the logs I see:

2024-01-30 00:33:26.867 WARNING (MainThread) [custom_components.hikvision_next.isapi] Unexpected exception | Cannot fetch state for io | Client error '403 Forbidden' for url 'http://10.0.4.2/ISAPI/System/IO/inputs/801'
For more information check: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/403
2024-01-30 00:33:26.920 WARNING (MainThread) [custom_components.hikvision_next.isapi] Unexpected exception | Cannot fetch state for io | Client error '403 Forbidden' for url 'http://10.0.4.2/ISAPI/System/IO/inputs/901'
For more information check: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/403
2024-01-30 00:33:26.959 WARNING (MainThread) [custom_components.hikvision_next.isapi] Unexpected exception | Cannot fetch state for io | Client error '403 Forbidden' for url 'http://10.0.4.2/ISAPI/System/IO/inputs/1001'
For more information check: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/403
2024-01-30 00:33:26.996 DEBUG (MainThread) [custom_components.hikvision_next.isapi] http://10.0.4.2/ISAPI/System/IO/outputs/1/status {'IOPortStatus': {'@version': '1.0', '@xmlns': 'http://www.hikvision.com/ver20/XMLSchema', 'ioPortID': '1', 'ioPortType': 'output', 'ioState': 'inactive'}}
2024-01-30 00:33:27.036 DEBUG (MainThread) [custom_components.hikvision_next.isapi] http://10.0.4.2/ISAPI/ContentMgmt/Storage [{'hdd': {'@version': '1.0', '@xmlns': 'http://www.hikvision.com/ver20/XMLSchema', 'id': '1', 'hddName': 'hdd1', 'hddPath': None, 'hddType': 'SATA', 'status': 'ok', 'capacity': '1907729', 'freeSpace': '0', 'property': 'RW'}}]
2024-01-30 00:33:27.036 DEBUG (MainThread) [custom_components.hikvision_next.coordinator] Finished fetching hikvision_next data in 3.950 seconds (success: True)
2024-01-30 00:33:30.315 DEBUG (MainThread) [custom_components.hikvision_next.notifications] --- Incoming event notification ---
2024-01-30 00:33:30.316 DEBUG (MainThread) [custom_components.hikvision_next.notifications] Source: 10.0.0.1
2024-01-30 00:33:30.316 DEBUG (MainThread) [custom_components.hikvision_next.notifications] request headers: <CIMultiDictProxy('Host': '10.0.0.2', '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': '598', 'Connection': 'Keep-Alive')>
2024-01-30 00:33:30.316 DEBUG (MainThread) [custom_components.hikvision_next.notifications] alert info: <?xml version="1.0" encoding="UTF-8" ?>
<EventNotificationAlert version="1.0" xmlns="http://www.hikvision.com/ver20/XMLSchema">
<ipAddress>10.0.4.2</ipAddress>
<portNo>80</portNo>
<protocolType>HTTP</protocolType>
<macAddress>**:**:**:**:**:**</macAddress>
<dynChannelID>3</dynChannelID>
<channelID>3</channelID>
<dateTime>2024-01-30T00:33:28+02:00</dateTime>
<activePostCount>0</activePostCount>
<eventType>VMD</eventType>
<eventState>active</eventState>
<eventDescription>Motion alarm</eventDescription>
<channelName>DVOR2</channelName>
<targetType>vehicle</targetType>
</EventNotificationAlert>

2024-01-30 00:33:30.317 DEBUG (MainThread) [custom_components.hikvision_next.notifications] Alert: AlertInfo(channel_id=3, io_port_id=0, event_id='motiondetection', device_serial_no=None, mac='**:**:**:**:**:**')
2024-01-30 00:33:30.322 WARNING (MainThread) [custom_components.hikvision_next.notifications] Cannot process incoming event 'NoneType' object has no attribute 'device_info'

@alexander-tomov
Copy link

Anything else I can help?

@maciej-or
Copy link
Owner

thanks @alexander-tomov this is all I need, it will help to fix that issue

@pepsonEL
Copy link
Author

Any news about this fix ?

@RomanovVIII
Copy link

Good afternoon.
I do not have a binary motion sensor of the cameras.
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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help Troubleshooting
Projects
None yet
Development

No branches or pull requests

6 participants