You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have a hikvision cam that we use for wildlife detection.
The system works by sending a GET request, upon which the camera returns a form-data response (mix of xml and binary data) for each event.
Time between events may take hours/days. In between, is there a way to detect if the stream is disconnected (with a callback or event hook maybe?)
The idea is that if the connection is dropped, we can restart the stream (we have to use a flaky 4G connection and sometimes the signal drops out)
We use something like
async with client.stream(
method, full_url, timeout=timeout, **data
) as response:
#(process the response)....
# somewhere here we need to detect if the stream is disrupted
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
We have a hikvision cam that we use for wildlife detection.
The system works by sending a GET request, upon which the camera returns a form-data response (mix of xml and binary data) for each event.
Time between events may take hours/days. In between, is there a way to detect if the stream is disconnected (with a callback or event hook maybe?)
The idea is that if the connection is dropped, we can restart the stream (we have to use a flaky 4G connection and sometimes the signal drops out)
We use something like
Beta Was this translation helpful? Give feedback.
All reactions