-
Notifications
You must be signed in to change notification settings - Fork 24
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
Alert stream endless loop #50
Comments
Доброго дня! Unfortunately, I don't have a Hikvision doorbell, and not sure whether it's possible to investigate what's going on with that alert stream. -Taras |
Taras Apparently the doorbell's http response headers do not have the flag to indicate to the client that the connection is a stream. I suspect it's a firmware bug, however i was not able to find a newer fw. I was able to connect to the alert stream url with a basic telnet test and receive the continuous heartbeat message (once per second) as follows:
The python requests library, curl, and other http clients seem to terminate the connection after receiving the first chunk of data. I'm curious if there is a way to force the socket connection to remain open despite the missing http stream header? |
Let's try to log what we receive in the bot here in the file. Maybe we will see something interesting.
async for chunk in response.aiter_text():
self._log.debug('\n----- CHUNK START -----\n\n%s\n\n----- CHUNK END -----', chunk)
self._log.debug('Response Headers: %s', response.headers)
self._log.debug('Request Headers: %s', response.request.headers)
self._log.debug('Length of the chunk: %d', len(chunk))
yield chunk |
here is the log. I think the camera is not sending
|
i have
|
yes, the same issue for me with camera IPC-B682-G2/ZS. thanks! |
@best-tech Your error is a different kind, you have 403 Forbidden error. Probably related to the configuration on the camera side. |
Доброго вечора, Тарас!
I have a doorbell hikvision camera and the bot is having some problem with initializing the alert stream. Is there something I can look at to fix this:
2022-09-14 17:12:24,345 - [INFO] - [ServiceAlarmMonitoringTask:27] - Starting alert pusher task for camera: "doorbell" 2022-09-14 17:12:24,347 - [DEBUG] - [asyncio:808] - <_SelectorSocketTransport fd=12 read=polling write=<idle, bufsize=0>> resumes reading 2022-09-14 17:12:24,872 - [DEBUG] - [asyncio:800] - <_SelectorSocketTransport fd=12 read=idle write=<idle, bufsize=0>> pauses reading 2022-09-14 17:12:24,872 - [DEBUG] - [httpx._client:1706] - HTTP Request: GET http://192.168.123.80/ISAPI/Event/notification/alertStream "HTTP/1.1 200 OK" 2022-09-14 17:12:24,873 - [ERROR] - [ServiceAlarmMonitoringTask:37] - Unexpectedly exited from stream chunk processing loop for cam_1. Retrying in 0.5 seconds... 2022-09-14 17:12:25,374 - [INFO] - [ServiceAlarmMonitoringTask:27] - Starting alert pusher task for camera: "doorbell"
the camera is: HNDB302-W Firmware V1.4.62 build 180809
The rest of the functions work quite welll.
дякую за гарний софт!
The text was updated successfully, but these errors were encountered: