There is the possibility using the Mobile Server protocol to retreive for each cameraId the recorded chunks?

There is the possibility using the Mobile Server protocol to retreive for each cameraId the recorded chunks?

In other words if the the recording of a camera start at T0 and stop at T1 then restart at T3 and stop at T4, there is a command to take the list of recorded chunks of the camera?

T1-T2 → first chunck

T3-T4 > second chunck

Hi Vincenzo,

Yes, there is such possibility.

You should use command “GetSequences”.

You could check the documentation placed at “https://doc.developer.milestonesys.com/mipsdkmobile/” for details about the command (Protocols → Mobile Server protocol → Command Channel → GetSequences)

In short you have to provide at least (as input parameters):

ItemId - ID of the item (camera) (GUID) for which are retrieved;

Sequences.SeqType - Type of the sequences requests – enumeration (Motion, Recording, RecordingWithTrigger);

Time - Central time of sequence request (in milliseconds since Unix epoch);

ItemKind - The kind of item for which the sequences are being requested (Camera, Microphone);

And one of the following groups:

BeforeTime - (optional) Time span in the past (concerning central time) to where sequences to be searched (in seconds). Must be non-negative;

BeforeCount - (optional) Maximal count of sequences to be searched in the time interval from “BeforeTime” to “Time”;

or

AfterTime - (optional) Time span in the future (concerning central time) to where sequences to be searched (in seconds). Must be non-negative;

AfterCount - (optional) Maximal count of sequences to be searched in the time interval from “Time” to “AfterTime”;

Hi Petar,

i used the command that you suggest but i don’t undestand the behavoir.

If i try to search alla sequences of a certain camera i set the Time = 0 and the AfterTime to Now (in seconds) but the Rest it returns 0 records.

After a lot of test i can view the sequences only if the search is 6 days ago to now or viceversa.

What’s is wrong?

Hi Vincenzo,

In general what you tried should work.

I think we are using something similar in mobile / web clients when trying to determine start of the DB (setting AfterCount = 1).

Can you give me a little bit more context in order to try to test it in-house:

  • Mobile server version
  • XPCO/XPE version
  • Recordings for how much time do you have for the particular camera
  • Are the clocks of the machines in sync
  • Sample of your command XML (wireshark will be better in both cases)

Petar,

The mobile Server Version is 12.3a

the clocks are in sync

I don’t now how much time

this is my proof based on SDK example

var getSequencesXMLMessage = generateXMLMessage({

  sequenceId: 1,

  connectionId: connect.connectionId,

  command: 'GetSequences',

  inputParams: {

     CameraId : 'b0e3bfc8-e480-4c05-b3b6-9701d5b3fb70',

     SeqType: 'Recording',

     ItemKind: "Camera" ,

     /\*

     Time : (new Date("May 11, 2019 23:59:00")).getTime() ,

     AfterTime : (((new Date("May 17, 2019 16:30:00")).getTime() ,(new Date("May 11, 2019 23:59:00")).getTime()) /1000),

     AfterCount : 10000000

     /\*

     Time : (new Date("May 17, 2019 16:30:00")).getTime() ,

     BeforeTime : (((new Date("May 17, 2019 16:30:00")).getTime() ,(new Date("May 11, 1019 22:59:00")).getTime()) /1000),

     BeforeCount : 10000000\*/

     Time : 0,

     AfterTime : (new Date()).getTime() /1000,

     AfterCount : 1

  }

});

Hi Vincenzo,

I see your sample is based on DemoApp which is no longer supported.

More over this demo app is removed from the MIP SDK (since 13.1.

I’ll highly encourage you to migrate to the MIP SDK Mobile for Web and SDK integration.

All the new development and updates (as well as new samples) are made in it.

Nevertheless I’ve tried your code, in particular this one:

var getSequences = function() {
	var getSequencesXMLMessage = generateXMLMessage({
		sequenceId: 10,
		connectionId: connect.connectionId,
		command: 'GetSequences',
		inputParams: {
			CameraId : 'A3BA666B-C6F3-42C4-A21C-7DB783E04135',
			SeqType: 'Recording',
			ItemKind: "Camera" ,
			Time : 0,
			AfterTime : (new Date()).getTime() /1000,
			AfterCount : 1
		}
	});
 
	sendCommandRequest(getSequencesXMLMessage, function(response) {
		success(response);
	});

It is working on my side, both on 13.1 and 12.3 version of the Mobile server.

I’ve noticed response is sometimes delayed by the server.

There should be something else.

Hi Petar,

thanks for ypur replay.

In my case the server response returns always 0 sequnces. To find some sequnces i must use a little time interval.

Hi Petar,

there is the possibility using MIP SDK Mobile for Web to delete all export for the user? If not, there is a work around?

Hi Vincenzo,

In order to delete export you have to use “DeleteExport” command.

It requires mandatory parameter “ExportId”, which is ID (Guid) of the export.

Command however accepts two tricky values for ExportId (unfortunately poor documented):

  • 00000000-0000-0000-0000-000000000000 - All Exports for current user
  • A3B9C5FB-FAAD-42C8-AB73-B79D6FFFDBC1 - All exports for all the users. In order this to work it has to be enabled in the Management plug-in trough “View other users exports”

Good morning Petar,
thank you for your help.

[Logo Leonardo_SISTEMI PER LA SICUREZZA E LE INFORMAZIONI_Small]

Vincenzo Di Maro
SW Engineering
HMI Solutions
Leonardo – Società per azioni
Via Giulio Cesare, 105 - Bacoli (NA) - 80070 - Italy
Tel. +39 081 5272846 - +39 081 8180242
vincenzo.dimaro@leonardocompany.commailto:[vincenzo.dimaro@leonardocompany.com](mailto:vincenzo.dimaro@leonardocompany.com)\

Il presente messaggio e-mail e ogni suo allegato devono intendersi indirizzati esclusivamente al destinatario indicato e considerarsi dal contenuto strettamente riservato e confidenziale. Se non siete l’effettivo destinatario o avete ricevuto il messaggio e-mail per errore, siete pregati di avvertire immediatamente il mittente e di cancellare il suddetto messaggio e ogni suo allegato dal vostro sistema informatico. Qualsiasi utilizzo, diffusione, copia o archiviazione del presente messaggio da parte di chi non ne è il destinatario è strettamente proibito e può dar luogo a responsabilità di carattere civile e penale punibili ai sensi di legge.
Questa e-mail ha valore legale solo se firmata digitalmente ai sensi della normativa vigente.

Hi Petar,

i need your help one more time.

When i call GetSequences form 0 to Now i can see , for example, 100 sequences.

In the Milestonene client i con see for the same intervale more then 100 sequnces.

All the camera are setting to record on motion detection. Also we start recording by StartManualRecord order and also by triggering an event related to a rule that start a recording.

I try the 3 king of Type of the sequences in the request but the result is always the same.

The question is.

How i can retereive all the sequemce that i cn see in the Milestone client (playback section)?

Sorry for my little english.

Btw. I see you mentioned “Protocol integration”.

I’m curious why you don’t use directly MIP SDK Mobile ?

Is it because you are making integration for platform that is not supported by the MIP SDK Mobile ?

Something on Java, or Linux may be ?

We are trying to gather more information of what our customers/interrogators need in order to provide them easiest ways for integrations. Including extending supported platforms if needed :slight_smile:

Thanks in advance for your feedback !

Hi Vincenzo,

In general you should get the same result as in the Mobile clients.

If I remember well they make Request with “SeqType” = “Recording” and in opposite direction - from now to 0.

Another difference is that they make multiple requests on chunks of 10 to 20 elements. For “Time” of every next request is used “StartTime” of the earliest received sequence from the previous call.

I’ll check however with mobile developers in order to be sure.

(“SeqType” = “Recording” should get all the recordings, no matter if they are triggered my “Motion” or by “RecordingWithTrigger”, e.g. manual event for start recording)

He Petar,
i will try to retrieve all recordings by calling the service using opposite direction .
I’m waiting for you answer

[Logo Leonardo_SISTEMI PER LA SICUREZZA E LE INFORMAZIONI_Small]

Vincenzo Di Maro
SW Engineering
HMI Solutions
Leonardo – Società per azioni
Via Giulio Cesare, 105 - Bacoli (NA) - 80070 - Italy
Tel. +39 081 5272846 - +39 081 8180242
vincenzo.dimaro@leonardocompany.commailto:[vincenzo.dimaro@leonardocompany.com](mailto:vincenzo.dimaro@leonardocompany.com)\

Il presente messaggio e-mail e ogni suo allegato devono intendersi indirizzati esclusivamente al destinatario indicato e considerarsi dal contenuto strettamente riservato e confidenziale. Se non siete l’effettivo destinatario o avete ricevuto il messaggio e-mail per errore, siete pregati di avvertire immediatamente il mittente e di cancellare il suddetto messaggio e ogni suo allegato dal vostro sistema informatico. Qualsiasi utilizzo, diffusione, copia o archiviazione del presente messaggio da parte di chi non ne è il destinatario è strettamente proibito e può dar luogo a responsabilità di carattere civile e penale punibili ai sensi di legge.
Questa e-mail ha valore legale solo se firmata digitalmente ai sensi della normativa vigente.

Hi Vincenzo,

I’ve consulted with Mobile developers.

Here is an example of parameters used by iOS application when retrieving recordings:

“SeqType” : “RecordingWithTrigger”

“CameraId” : “6edbbea5-12cf-4bc5-a60c-0d1d46882f28”

“BeforeTime” : “2522880000”

“Time” : “2522879999999”

“BeforeCount” : “21”

So I was wrong - sequence type is “RecordingWithTrigger”, but not “Recording”.

More interesting are time constrain parameters.

“Time” is set to somewhere in the future - around 2050-th year.

“BeforeTime” is timespan in seconds which in that case is equal to around 80 years.

In result calculated Begin Timestamp in the server is around 1970-th year.

I suppose there were clock / synchronization problems in order to end up with similar solution.