Arc requests

arc_add_to_project

Add device to project.

Request

Key

Value

cmd

“arc_add_to_project”

data

arc_add_to_project data

Data

Key

Type

Required

Valid values

device_id

String

Yes

Device id for a connected Arc or Ace device.

{
    "device_id": "Arc512031204843494E3130393033313036"
}

Response

Key

Value

cmd

arc_add_to_project

arc_calibrate

Perform internal calibration of an Arc device.

Request

Key

Value

cmd

“arc_calibrate”

data

arc_calibrate data

Data

Key

Type

Required

Valid values

device_id

String

Yes

Device id for a connected Arc device.

{
    "device_id": "Arc512031204843494E3130393033313036"
}

Response

Key

Value

cmd

arc_calibrate

arc_enable_5v

Enable 5V in expansion port.

Request

Key

Value

cmd

“arc_enable_5v”

data

arc_enable_5v data

Data

Key

Type

Required

Valid values

device_id

String

Yes

Device id for a connected Arc device.

enable

Boolean

Yes

True enables 5V output, false disables it.

{
    "device_id": "Arc512031204843494E3130393033313036",
    "enable": true
}

Response

Key

Value

cmd

arc_enable_5v

arc_enable_channel

Enable or disable measurement channel.

Available channels

Channel

Description

Unit

mc

Main Current

A

mp

Main Power

W

mv

Main Voltage

V

ac

ADC Current

A

ac

ADC Power

W

av

ADC Voltage

V

sp

Sense+ Voltage

V

sn

Sense- Voltage

V

vb

VBUS

V

vj

DC Jack

V

tp

Temperature

°C

rx

UART logs

text

i1

GPI1

Digital

i2

GPI2

Digital

Request

Key

Value

cmd

“arc_enable_channel”

data

arc_enable_channel data

Data

Key

Type

Required

Valid values

device_id

String

Yes

Device id for a connected Arc device.

channel

String

Yes

Channel.

enable

Boolean

Yes

True to enable and false to disable channel.

{
    "device_id": "Arc512031204843494E3130393033313036",
    "channel": "mc",
    "enable": true
}

Response

Key

Value

cmd

“arc_enable_channel”

arc_enable_exp_port

Enables the expansion port.

Required to be enabled to use digital pins (GPO, GPI, RX and TX).

Request

Key

Value

cmd

“arc_enable_exp_port”

data

arc_enable_exp_port data

Data

Key

Type

Required

Valid values

device_id

String

Yes

Device id for a connected Arc device.

enable

Boolean

Yes

True to enable and false to disable exp port.

{
    "device_id": "Arc512031204843494E3130393033313036",
    "enable": true
}

Response

Key

Value

cmd

“arc_enable_exp_port”

arc_enable_uart

Enables RX and TX pins to be a UART.

Required to be disabled to use RX and TX pins as GPI/GPO.

Request

Key

Value

cmd

“arc_enable_uart”

data

arc_enable_uart data

Data

Key

Type

Required

Valid values

device_id

String

Yes

Device id for a connected Arc device.

enable

Boolean

Yes

True to enable and false to disable UART.

{
    "device_id": "Arc512031204843494E3130393033313036",
    "enable": true
}

Response

Key

Value

cmd

“arc_enable_uart”

arc_get_adc_resistor

Get adc resistor value.

Request

Key

Value

cmd

“arc_get_adc_resistor”

data

arc_get_adc_resistor data

Data

Key

Type

Required

Valid values

device_id

String

Yes

Device id for a connected Arc device.

{
    "device_id": "Arc512031204843494E3130393033313036"
}

Response

Key

Value

cmd

“arc_get_adc_resistor”

data

arc_get_adc_resistor data

Data

Key

Type

Required

Description

value

Number

Yes

Resistance in Ω.

{
    "value": 4.7
}

arc_get_4wire

Get the 4-wire measurement state. (available from otii version 2.7.1)

Request

Key

Value

cmd

“arc_get_4wire”

data

arc_get_4wire data

Data

Key

Type

Required

Valid values

device_id

String

Yes

Device id for a connected Arc device.

{
    "device_id": "Arc512031204843494E3130393033313036"
}

Response

Key

Value

cmd

“arc_get_4wire”

data

arc_get_4wire data

Data

Key

Type

Required

Description

value

String

Yes

The current state, “cal_invalid”, “disabled”, “inactive” or “active”.

{
    "value": true
}

@see arc_set_4wire *

arc_get_exp_voltage

Get the voltage of the expansion port.

Request

Key

Value

cmd

“arc_get_exp_voltage”

data

arc_get_exp_voltage data

Data

Key

Type

Required

Valid values

device_id

String

Yes

Device id for a connected Arc device.

{
    "device_id": "Arc512031204843494E3130393033313036"
}

Response

Key

Value

cmd

“arc_get_exp_voltage”

data

arc_get_exp_voltage data

Data

Key

Type

Required

Description

value

Number

Yes

Expansion port voltage in V.

{
    "value": 3.4
}

arc_get_gpi

Get the state of a GPI pin.

Requires expansion port to be enabled.

Request

Key

Value

cmd

“arc_get_gpi”

data

arc_get_gpi data

Data

Key

Type

Required

Valid values

device_id

String

Yes

Device id for a connected Arc device.

pin

Number

Yes

Id of the GPI pin, 1 or 2.

{
    "device_id": "Arc512031204843494E3130393033313036",
    "pin": 1
}

Response

Key

Value

cmd

“arc_get_gpi”

data

arc_get_gpi data

Data

Key

Type

Required

Description

value

Boolean

Yes

The state of the GPI pin.

{
    "value": true
}

arc_get_main

Get main power status.

Request

Key

Value

cmd

“arc_get_main”

data

arc_get_main data

Data

Key

Type

Required

Valid values

device_id

String

Yes

Device id for a connected Arc device.

{
    "device_id": "Arc512031204843494E3130393033313036"
}

Response

Key

Value

cmd

“arc_get_main”

data

arc_get_main data

Data

Key

Type

Required

Description

value

Bool

Yes

True if power is on, otherwise False

{
    "value": true
}

arc_get_main_voltage

Get main voltage value.

Request

Key

Value

cmd

“arc_get_main_voltage”

data

arc_get_main_voltage data

Data

Key

Type

Required

Valid values

device_id

String

Yes

Device id for a connected Arc device.

{
    "device_id": "Arc512031204843494E3130393033313036"
}

Response

Key

Value

cmd

“arc_get_main_voltage”

data

arc_get_main_voltage data

Data

Key

Type

Required

Description

value

Number

Yes

Voltage in V.

{
    "value": 3.4
}

arc_get_max_current

Get the max allowed current.

Request

Key

Value

cmd

“arc_get_max_current”

data

arc_get_max_current data

Data

Key

Type

Required

Valid values

device_id

String

Yes

Device id for a connected Arc device.

{
    "device_id": "Arc512031204843494E3130393033313036"
}

Response

Key

Value

cmd

“arc_get_max_current”

data

arc_get_max_current data

Data

Key

Type

Required

Description

value

Number

Yes

The max current in A.

{
    "value": 0.564
}

arc_get_range

Get the current measurement range on the main output.

Request

Key

Value

cmd

“arc_get_range”

data

arc_get_range data

Data

Key

Type

Required

Valid values

device_id

String

Yes

Device id for a connected Arc device.

{
    "device_id": "Arc512031204843494E3130393033313036"
}

Response

Key

Value

cmd

“arc_get_range”

data

arc_get_range data

Data

Key

Type

Required

Description

range

String

Yes

The current range, “low” or “high”

{
    "range": "high"
}

arc_get_rx

The RX pin can be used as a GPI when the UART is disabled.

Requires expansion port to be enabled.

Request

Key

Value

cmd

“arc_get_rx”

data

arc_get_rx data

Data

Key

Type

Required

Valid values

device_id

String

Yes

Device id for a connected Arc device.

{
    "device_id": "Arc512031204843494E3130393033313036"
}

Response

Key

Value

cmd

“arc_get_rx”

data

arc_get_rx data

Data

Key

Type

Required

Description

value

Bool

Yes

The state of the RX pin.

{
    "value": true
}

@see arc_enable_exp_port arc_enable_uart

arc_get_src_cur_limit_enabled

Get current state of voltage source current limiting. (available from otii version 2.7.1)

Request

Key

Value

cmd

“arc_get_src_cur_limit_enabled”

data

arc_get_src_cur_limit_enabled data

Data

Key

Type

Required

Valid values

device_id

String

Yes

Device id for a connected Arc device.

{
    "device_id": "Arc512031204843494E3130393033313036"
}

Response

Key

Value

cmd

“arc_get_src_cur_limit_enabled”

data

arc_get_src_cur_limit_enabled data

Data

Key

Type

Required

Description

enabled

Boolean

Yes

True if set to constant current, false if set to cut-off.

{
    "enabled": true
}

@see arc_set_src_cur_limit_enabled

arc_get_supply_mode

Get current supply mode.

Request

Key

Value

cmd

“arc_get_supply_mode”

data

arc_get_supply_mode data

Data

Key

Type

Required

Valid values

device_id

String

Yes

Device id for a connected Arc device.

{
    "device_id": "Arc512031204843494E3130393033313036"
}

Response

Key

Value

cmd

“arc_get_supply_mode”

data

arc_get_supply_mode data

Data

Key

Type

Required

Description

supply_mode

Number

Yes

“power-box” or “battert-emulator”

{
    "supply_mode": "power-box"
}

arc_get_uart_baudrate

Get the UART baud rate.

Request

Key

Value

cmd

“arc_get_uart_baudrate”

data

arc_get_uart_baudrate data

Data

Key

Type

Required

Valid values

device_id

String

Yes

Device id for a connected Arc device.

{
    "device_id": "Arc512031204843494E3130393033313036"
}

Response

Key

Value

cmd

“arc_get_uart_baudrate”

data

arc_get_uart_baudrate data

Data

Key

Type

Required

Description

value

Number

Yes

The requested baud rate.

{
    "value": 115200
}

arc_get_value

Get value from specified channel.

Command not available for the rx channel.

Request

Key

Value

cmd

“arc_get_value”

data

arc_get_value data

Data

Key

Type

Required

Valid values

device_id

String

Yes

Device id for a connected Arc device.

channel

String

Yes

The channel name.

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

Response

Key

Value

cmd

“arc_get_value”

data

arc_get_value data

Data

Key

Type

Required

Description

value

Number

Yes

The value in A, V, °C and Digital.

{
    "value": 0.0375
}

@see arc_enable_channel

arc_get_version

Get hardware and firmware versions of device.

Request

Key

Value

cmd

“arc_get_version”

data

arc_get_version data

Data

Key

Type

Required

Valid values

device_id

String

Yes

Device id for a connected Arc device.

{
    "device_id": "Arc512031204843494E3130393033313036"
}

Response

Key

Value

cmd

“arc_get_version”

data

arc_get_version data

Data

Key

Type

Required

Description

hw_version

String

Yes

The hardware version.

fw_version

String

Yes

The firmware version.

{
    "hw_version": "1.2",
    "fw_version": "1.0.8"
}

arc_is_connected

Check if a device is connected

Request

Key

Value

cmd

“arc_is_connected”

data

arc_is_connected data

Data

Key

Type

Required

Valid values

device_id

String

Device id

{
    "device_id": "Arc512031204843494E3130393033313036"
}

Response

Key

Value

cmd

“arc_is_connected”

data

arc_is_connected data

Data

Key

Type

Required

Description

connected

Boolean

Yes

True if device is connected

{
    "connected": true
}

arc_get_4wire

Get the 4-wire measurement state. (available from otii version 2.7.1)

Request

Key

Value

cmd

“arc_get_4wire”

data

arc_get_4wire data

Data

Key

Type

Required

Valid values

device_id

String

Yes

Device id for a connected Arc device.

{
    "device_id": "Arc512031204843494E3130393033313036"
}

Response

Key

Value

cmd

“arc_get_4wire”

data

arc_get_4wire data

Data

Key

Type

Required

Description

value

String

Yes

The current state, “cal_invalid”, “disabled”, “inactive” or “active”.

{
    "value": true
}

@see arc_set_4wire

arc_set_adc_resistor

Set the value of the shunt resistor for the ADC.

Request

Key

Value

cmd

“arc_set_adc_resistor”

data

arc_set_adc_resistor data

Data

Key

Type

Required

Valid values

device_id

String

Yes

Device id for a connected arc.

value

Number

Yes

The ADC resistor in Ω (0.001 to 22Ω).

{
    "device_id": "Arc512031204843494E3130393033313036",
    "value": 4.7
}

Response

Parameter

Value

cmd

“arc_set_adc_resistor”

arc_set_exp_voltage

Set the voltage of the expansion port.

Request

Key

Value

cmd

“arc_set_exp_voltage”

data

arc_set_exp_voltage data

Data

Key

Type

Required

Valid values

device_id

String

Yes

Device id for a connected arc.

value

Number

Yes

Voltage in V (1.2 - 5V).

{
    "device_id": "Arc512031204843494E3130393033313036",
    "value": 2.7
}

Response

Parameter

Value

cmd

“arc_set_exp_voltage”

arc_set_gpo

Set the state of a GPO.

Requires expansion port to be enabled.

Request

Key

Value

cmd

“arc_set_gpo”

data

arc_set_gpo data

Data

Key

Type

Required

Valid values

device_id

String

Yes

Device id for a connected arc.

pin

Number

Yes

Id of the GPI pin, 1 or 2.

value

Boolean

Yes

State of pin

{
    "device_id": "Arc512031204843494E3130393033313036",
    "pin": 1,
    "value": true
}

Response

Parameter

Value

cmd

“arc_set_gpo”

@see arc_enable_exp_port

arc_set_main

Turn on or off main power on a device.

Request

Key

Value

cmd

“arc_set_main”

data

arc_set_main data

Data

Key

Type

Required

Valid values

device_id

String

Yes

Device id for a connected device.

enable

Boolean

Yes

True turns on power, false turns off power.

{
    "device_id": "Arc512031204843494E3130393033313036",
    "enable": true
}

Response

Key

Value

cmd

“arc_set_main”

arc_set_main_current

Set the main current on Arc.

Used when the Otii device is set in constant current mode.

Request

Key

Value

cmd

“arc_set_main_current”

data

arc_set_main_current data

Data

Key

Type

Required

Valid values

device_id

String

Yes

Device id for a connected arc.

value

Number

Yes

Current to set in A.

{
    "device_id": "Arc512031204843494E3130393033313036",
    "value": 0.005
}

Response

Parameter

Value

cmd

“arc_set_main_current”

arc_set_main_voltage

Set the main voltage on Arc.

Used when the Otii device is set in constant voltage mode.

Request

Key

Value

cmd

“arc_set_main_voltage”

data

arc_set_main_voltage data

Data

Key

Type

Required

Valid values

device_id

String

Yes

Device id for a connected arc.

value

Number

Yes

Voltage to set in V.

{
    "device_id": "Arc512031204843494E3130393033313036",
    "value": 2.3
}

Response

Parameter

Value

cmd

“arc_set_main_voltage”

arc_set_max_current

When the current exceeds this value, the main power will cut off.

Request

Key

Value

cmd

“arc_set_max_current”

data

arc_set_max_current data

Data

Key

Type

Required

Valid values

device_id

String

Yes

Device id for a connected arc.

value

Number

Yes

Max current in A.

{
    "device_id": "Arc512031204843494E3130393033313036",
    "value": 0.6
}

Response

Parameter

Value

cmd

“arc_set_max_current”

arc_set_power_regulation

Set power regulation mode.

Request

Key

Value

cmd

“arc_set_power_regulation”

data

arc_set_power_regulation data

Data

Key

Type

Required

Valid values

device_id

String

Yes

Device id for a connected arc.

mode

String

Yes

One of the following: “voltage”, “current”, “inline”, “off”.

{
    "device_id": "Arc512031204843494E3130393033313036",
    "mode": "current"
}

Response

Parameter

Value

cmd

“arc_set_power_regulation”

arc_set_range

Set the main outputs measurement range.

Request

Key

Value

cmd

“arc_set_range”

data

arc_set_range data

Data

Key

Type

Required

Valid values

device_id

String

Yes

Device id for a connected arc.

range

String

Yes

“low” or “high”. “low” will enable auto-range, “high” will force the use of high-range.

{
    "device_id": "Arc512031204843494E3130393033313036",
    "range": "low"
}

Response

Parameter

Value

cmd

“arc_set_range”

arc_set_src_cur_limit_enabled

Enable voltage source current limit (CC) operation. (available from otii version 2.7.1)

Request

Key

Value

cmd

“arc_set_src_cur_limit_enabled”

data

arc_set_src_cur_limit_enabled data

Data

Key

Type

Required

Valid values

device_id

String

Yes

Device id for a connected arc.

enable

Boolean

Yes

True means enable constant current, false means cut-off.

{
    "device_id": "Arc512031204843494E3130393033313036",
    "enable": true
}

Response

Parameter

Value

cmd

“arc_set_src_cur_limit_enabled”

arc_set_supply_battery_emulator

Note: This request requires a battery toolbox license.

Set power supply to battery emulator.

You cannot set both used_capacity and soc at the same time.

Request

Key

Value

cmd

“arc_set_supply_battery_emulator”

data

arc_set_supply_battery_emulator data

Data

Key

Type

Required

Valid values

device_id

String

Yes

Device id for a connected arc

battery_profile_id

String

Yes

Battery profile id, as returned by otii_get_battery_profiles

series

Number

No

Number of batteries in series, defaults to 1

parallel

Number

No

Number of batteries in parallel, defaults to 1

used_capacity

Number

No

Used capacity, defaults to 0

soc

Number

No

State Of Charge in percent, defaults to 100

soc_tracking

Boolean

No

State of Charge tracking, defaults to True

{
    "device_id": "Arc512031204843494E3130393033313036",
    "battery_profile_id": "abcd",
    "series": 1,
    "parallel": 2
}

Response

Parameter

Value

cmd

“arc_set_supply_battery_profile”

@see arc_get_supplies

arc_set_supply_power_box

Set power supply to power box.

Request

Key

Value

cmd

“arc_set_supply_power_box”

data

arc_set_supply_power_box data

Data

Key

Type

Required

Valid values

device_id

String

Yes

Device id for a connected Arc or Ace

{
    "device_id": "Arc512031204843494E3130393033313036",
}

Response

Parameter

Value

cmd

“arc_set_supply_power_box”

arc_set_tx

The TX pin can be used as a GPO when the UART is disabled.

Requires expansion port to be enabled.

Request

Key

Value

cmd

“arc_set_tx”

data

arc_set_tx data

Data

Key

Type

Required

Valid values

device_id

String

Yes

Device id for a connected arc.

value

Boolean

Yes

State of tx pin

{
    "device_id": "Arc512031204843494E3130393033313036",
    "value": true
}

Response

Parameter

Value

cmd

“arc_set_tx”

@see arc_enable_exp_port arc_enable_uart

arc_set_uart_baudrate

Set UART baud rate.

Request

Key

Value

cmd

“arc_set_uart_baudrate”

data

arc_set_uart_baudrate data

Data

Key

Type

Required

Valid values

device_id

String

Yes

Device id for a connected arc.

value

Number

Yes

Baud rate to set.

{
    "device_id": "Arc512031204843494E3130393033313036",
    "value": 115200
}

Response

Parameter

Value

cmd

“arc_set_uart_baudrate”

arc_write_tx

Write data to TX.

Requires expansion port and UART to be enabled.

Request

Key

Value

cmd

“arc_write_tx”

data

arc_write_tx data

Data

Key

Type

Required

Valid values

device_id

String

Yes

Device id for a connected arc.

value

String

Yes

Data to write.

{
    "device_id": "Arc512031204843494E3130393033313036",
    "value": "Start"
}

Response

Parameter

Value

cmd

“arc_write_tx”

@see arc_enable_exp_port arc_enable_uart