Recording requests

recording_delete

Delete a recording.

Request

Key

Value

cmd

“recording_delete”

data

recording_delete data

Data

Key

Type

Required

Valid values

recording_id

Number

Yes

Recording id for the recording to delete

Response

Key

Value

cmd

“recording_delete”

recording_downsample_channel

Downsample all recordings on a channel.

Channels available for downsampling

Channel

Description

Unit

mc

Main Current

A

mv

Main Voltage

V

me

Main Energy

J

ac

ADC Current

A

av

ADC Voltage

V

ae

ADC Energy

J

sp

Sense+ Voltage

V

sn

Sense- Voltage

V

vb

VBUS

V

vj

DC Jack

V

tp

Temperature

°C

Request

Key

Value

cmd

“recording_downsample_channel”

data

recording_downsample_channel data

Data

Key

Type

Required

Valid values

recording_id

Number

Yes

Recording id.

device_id

String

Yes

Id of capturing device.

channel

String

Yes

Channel name.

factor

Number

Yes

Factor to downsample channel with.

{
    "recording_id": 1,
    "device_id": "Arc512031204843494E3130393033313036",
    "channel": "mc",
    "factor": 2
}

Response

Key

Value

cmd

“recording_downsample_channel”

@see arc_enable_channel

recording_get_channel_data_count

Get number of data entries in a channel for a specific recording.

Request

Key

Value

cmd

“recording_get_channel_data_count”

data

recording_get_channel_data_count data

Data

Key

Type

Required

Valid values

recording_id

Number

Yes

Recording id.

device_id

String

Yes

Id of capturing device.

channel

String

Yes

Channel name.

{
    "recording_id": 0,
    "device_id": "Arc512031204843494E3130393033313036",
    "channel": "mc"
}

Response

Key

Value

cmd

“recording_get_channel_data_count”

data

recording_get_channel_data_count data

Data

Key

Type

Required

Description

count

Number

Yes

Number of data entries in channel.

{
    "count": 332
}

@see arc_enable_channel

recording_get_channel_data

Get data entries from a specified channel of a specific recording.

Request

Key

Value

cmd

“recording_get_channel_data”

data

recording_get_channel_data data

Data

Key

Type

Required

Valid values

recording_id

Number

Yes

Recording id.

device_id

String

Yes

Device id of the capturing device.

channel

String

Yes

The channel name.

index

Number

Yes

Start index to fetch data entries from, first index at 0.

count

Number

Yes

Number of data entries to fetch.

{
    "recording_id": 0,
    "device_id": "Arc512031204843494E3130393033313036",
    "channel": "mc",
    "index": 3,
    "count": 23
}

Response

Key

Value

cmd

“recording_get_channel_data”

data

recording_get_channel_data data

Data for analog values

Key

Type

Required

Description

data_type

String

Yes

Set to “analog”.

timestamp

Number

Yes

Timestamp in seconds of first sample.

interval

Number

Yes

Interval in seconds between each sample.

values

Array

Yes

Array of samples.

{
    "data_type": "analog",
    "timestamp": 3.250,
    "interval": 0.00025,
    "values": [0.002453, 0.002675, 0.001945, 0.002444]
}

Data for gpi channels

Key

Type

Required

Description

data_type

String

Yes

Set to “digital”.

values

Array

Yes

Array with value objects.

Value object

Key

Type

Required

Description

timestamp

Number

Yes

Timestamp in seconds.

value

Boolean

Yes

Digital value.

Gpi channel example
{
    "data_type": "digital",
    "values": [{
        "timestamp": 0.001,
        "value": true
    }, {
        "timestamp": 2.132,
        "value": false
    }]
}

Data for the rx channel

Key

Type

Required

Description

data_type

String

Yes

Set to “log”.

values

Array

Yes

Array with value objects.

Value object

Key

Type

Required

Description

timestamp

Number

Yes

Timestamp in seconds.

value

String

Yes

Log text.

{
    "data_type": "log",
    "values": [{
        "timestamp": 0.001,
        "value": "Device booting"
    }, {
        "timsestamp": 2.132,
        "value": "Going to sleep"
    }]
}

@see otii_get_channel_data_count arc_enable_channel

recording_get_channel_data_index

Get the index in a channel for a specific recording for the given timestamp.

Request

Key

Value

cmd

“recording_get_channel_data_index”

data

recording_get_channel_data_index data

Data

Key

Type

Required

Valid values

recording_id

Number

Yes

Recording id.

device_id

String

Yes

Id of capturing device.

channel

String

Yes

Channel name.

timestamp

Number

Yes

Timestamp in s.

{
    "recording_id": 0,
    "device_id": "Arc512031204843494E3130393033313036",
    "channel": "mc",
    "timestamp": 0.00250
}

Response

Key

Value

cmd

“recording_get_channel_data_index”

data

recording_get_channel_data_index data

Data

Key

Type

Required

Description

index

Number

Yes

The index for the specified timestamp.

{
    "index": 332
}

@see arc_enable_channel

recording_get_channel_info

Requires Otii 3

Get channel info for a specific recording.

Request

Key

Value

cmd

“recording_get_channel_info”

data

recording_get_channel_info data

Data

Key

Type

Required

Valid values

recording_id

Number

Yes

Recording id.

device_id

String

Yes

Id of capturing device.

channel

String

Yes

Channel name.

{
    "recording_id": 0,
    "device_id": "Arc512031204843494E3130393033313036",
    "channel": "mc",
}

Response

Key

Value

cmd

“recording_get_channel_info”

data

recording_get_channel_info data

Data

Key

Type

Required

Description

offset

Number

Yes

The offset of the recording in seconds.

from

Number

Yes

The start of the recording in seconds.

to

Number

Yes

The end of the recording in seconds.

sample_rate

Number

Yes

The sample rate of the recording.

{
    "offset": 0.0,
    "from": 0.0
    "to": 5.34,
    "sample_rate": 4000
}

@see arc_enable_channel

recording_get_channel_statistics

Requires Otii 3

Get channel statistics for a specific recording for the given time interval.

Request

Key

Value

cmd

“recording_get_channel_statistics”

data

recording_get_channel_statistics data

Data

Key

Type

Required

Valid values

recording_id

Number

Yes

Recording id.

device_id

String

Yes

Id of capturing device.

channel

String

Yes

Channel name.

from

Number

Yes

The start of the interval for the statistics.

to

Number

Yes

The end of the interval for the statistics.

{
    "recording_id": 0,
    "device_id": "Arc512031204843494E3130393033313036",
    "channel": "mc",
}

Response

Key

Value

cmd

“recording_get_channel_statistics”

data

recording_get_channel_statistics data

Data

Key

Type

Required

Description

min

Number

Yes

The minimum value in the selected interval.

max

Number

Yes

The maximum value in the selected interval.

average

Number

Yes

The average value in the selected interval.

energy

Number

Yes

The energy consumed in the interval (if applicable).

{
    "min": -0,00565853156149387,
    "max": 0,476982802152634,
    "average": 0,0561770809812117,
    "energy": 0,000290418408670424
}

@see arc_enable_channel

recording_get_offset

Returns the offset of the recording.

Request

Key

Value

cmd

“recording_get_offset”

data

recording_get_offset data

Data

Key

Type

Required

Valid values

recording_id

Number

Yes

Recording id.

{
    "recording_id": 0
}

Response

Key

Value

cmd

“recording_get_offset”

data

recording_get_offset data

Data

Key

Type

Required

Description

offset

Number

Yes

The current offset of the log.

{
    "offset": 1254
}

recording_rename

Rename recording.

Request

Key

Value

cmd

“recording_rename”

data

recording_rename data

Data

Key

Type

Required

Valid values

recording_id

Number

Yes

Recording id.

name

String

Yes

New name of recording.

{
    "recording_id": 0,
    "name": "First recording"
}

Response

Key

Value

cmd

“recording_rename”