Relay Endpoint

Interface to relay entities on BrainStem modules.

Relay entities can be set, and the voltage read.

Other capabilities may be available, please see the product datasheet.

See the Relay Entity for generic information.

PUT /api/v1/brainstem/(serial_num)/relay/(index)/enable

Set the enable/disable state.

See JSON Schema for Request Object and Response Object

Parameters:
  • serial_num – Serial Number of device to access. Formatted as a hex string (e.g. “0x1234ABCD’). Optional on embedded REST server.

  • index – Index of entity to access. Default is 0.

Request JSON Object:
  • value (boolean) –

    Boolean value to set.

    May be specified as a boolean, integer, or a string (formatted as “True”, “FALSE”, “1”, etc.)

Response JSON Object:
  • response.value (boolean) – Value formatted as a boolean

  • response.rawValue (integer) – Unformatted value

GET /api/v1/brainstem/(serial_num)/relay/(index)/enable

Get the state.

See JSON Schema for Response Object

Parameters:
  • serial_num – Serial Number of device to access. Formatted as a hex string (e.g. “0x1234ABCD’). Optional on embedded REST server.

  • index – Index of entity to access. Default is 0.

Response JSON Object:
  • response.value (boolean) – Value formatted as a boolean

  • response.rawValue (integer) – Unformatted value

GET /api/v1/brainstem/(serial_num)/relay/(index)/voltage

Get the scaled micro volt value with reference to ground.

See JSON Schema for Response Object

Parameters:
  • serial_num – Serial Number of device to access. Formatted as a hex string (e.g. “0x1234ABCD’). Optional on embedded REST server.

  • index – Index of entity to access. Default is 0.

Response JSON Object:
  • response.value (integer) – Value formatted as an integer

  • response.rawValue (integer) – Unformatted value