A
A
accountnujen2022-02-24 22:49:53
PHP
accountnujen, 2022-02-24 22:49:53

Why can the camera return the error "Invalid session in request data!"?

The problem is that the error occurs every time
there is a Dahua HDW2230TP-AS-0280B camera. I make a backup copy of the video to my server every 10 minutes. The request looks like this:

# шаг 1.  curl запрос на создание задачи (id)
$task = reqCam("$urlcam/cgi-bin/mediaFileFind.cgi?action=factory.create");
$id = explode("=",trim($task))[1]; // обрезание ID
# шаг 2. установка поиска видео по заданным $start и $end значениям
reqCam("$urlcam/cgi-bin/mediaFileFind.cgi?action=findFile&object=$id&condition.Channel=1&condition.StartTime=$start&condition.EndTime=$end&condition.Types[0]=dav");
# шаг 3. отображение списка видео
$listvideo = reqCam("$urlcam/cgi-bin/mediaFileFind.cgi?action=findNextFile&object=$id&count=100");

And this code can show about 10 (sometimes more) errors of this kind for 100 iterations:
{"error":{"code":287637505,"message":"Invalid session in request data!"},"result":false}

the error occurs in the second step when I set the search parameters. I can't find any patterns.

How can you fight it?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question