The openculture SDK is a typed REST client — it calls the same
endpoints as the REST tab.
Namespace: h.valves — 11 endpoints.
fromopencultureimportHabitatClientwithHabitatClient("http://mistyforest.local:8000")ash:# List all valvesvalves=h.valves.list()# Get a single valve by addressvalve=h.valves.get_valve_status(0)# Move to a specific port positionh.valves.move_valve(0,request=ValveMoveRequest(...))
All request and response shapes are in openculture.client.habitat.models.
Endpoint reference
Habitat API — smartvalve 0.1.0
REST API for the Habitat tissue-culture automation platform by Open Culture Science. All endpoints accept and return JSON.
⚠️This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.Schema of the response body
{"items":{"$ref":"#/components/schemas/ValveStatus"},"type":"array","title":"Response List Valves Valves Get"}
⚠️This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.Schema of the response body
{"properties":{"addr":{"type":"integer","title":"Addr"},"name":{"type":"string","title":"Name","default":""},"ready":{"type":"boolean","title":"Ready"},"initialized":{"type":"boolean","title":"Initialized"},"error_code":{"type":"integer","title":"Error Code"},"error_message":{"type":"string","title":"Error Message"},"valve_position":{"type":"integer","title":"Valve Position"},"valve_type":{"type":"string","title":"Valve Type"},"temperature_f":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Temperature F"},"voltage":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Voltage"},"operating_time_min":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Operating Time Min"},"firmware":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Firmware"}},"type":"object","required":["addr","ready","initialized","error_code","error_message","valve_position","valve_type"],"title":"ValveStatus","description":"Full SmartValve status — valve-only, no plunger/syringe fields."}
⚠️This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.Schema of the response body
⚠️This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.Schema of the response body
⚠️This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.Schema of the request body
{"properties":{"direction":{"$ref":"#/components/schemas/habitat__models__smartvalve__InitDirection","default":"cw"},"speed":{"type":"integer","maximum":25.0,"minimum":4.0,"title":"Speed","description":"Init speed code","default":10},"input_port":{"type":"integer","minimum":0.0,"title":"Input Port","description":"Init input port (0=default)","default":0},"output_port":{"type":"integer","minimum":0.0,"title":"Output Port","description":"Init output port (0=default)","default":0}},"type":"object","title":"InitRequest","description":"Request body for valve initialization."}
⚠️This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.Schema of the response body
{"properties":{"success":{"type":"boolean","title":"Success"},"addr":{"type":"integer","title":"Addr"},"message":{"type":"string","title":"Message","default":""},"data":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Data"},"error_code":{"type":"integer","title":"Error Code","default":0},"error_message":{"type":"string","title":"Error Message","default":""}},"type":"object","required":["success","addr"],"title":"CommandResponse","description":"Generic response from a valve command."}
⚠️This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.Schema of the response body
⚠️This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.Schema of the response body
{"items":{"$ref":"#/components/schemas/habitat__models__smartvalve__CommandResponse"},"type":"array","title":"Response Initialize All Valves Initialize All Post"}
POST /valves/{addr}/move
Rotate the SmartValve to a port
Description
Rotates the SmartValve (standalone, not pump-attached) to a port. Uses the same Cavro serial protocol as CENTRIS valves — in fact the two can share an RS-232 daisy chain. Blocks until the firmware reports the rotation complete (~300 ms typical).
Preconditions: valve initialized; port within max range. Sets device_state.valve_position on success (Fork 1).
Input parameters
Parameter
In
Type
Default
Nullable
Description
addr
path
integer
No
Request body
{"port":0,"direction":"string"}
⚠️This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.Schema of the request body
{"properties":{"port":{"type":"integer","maximum":12.0,"minimum":1.0,"title":"Port","description":"Target port number"},"direction":{"type":"string","title":"Direction","description":"Rotation direction: 'cw' (I command) or 'ccw' (O command)","default":"cw"}},"type":"object","required":["port"],"title":"ValveMoveRequest","description":"Request body for valve movement."}
⚠️This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.Schema of the response body
{"properties":{"success":{"type":"boolean","title":"Success"},"addr":{"type":"integer","title":"Addr"},"message":{"type":"string","title":"Message","default":""},"data":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Data"},"error_code":{"type":"integer","title":"Error Code","default":0},"error_message":{"type":"string","title":"Error Message","default":""}},"type":"object","required":["success","addr"],"title":"CommandResponse","description":"Generic response from a valve command."}
⚠️This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.Schema of the response body
⚠️This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.Schema of the response body
⚠️This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.Schema of the response body
{"properties":{"success":{"type":"boolean","title":"Success"},"addr":{"type":"integer","title":"Addr"},"message":{"type":"string","title":"Message","default":""},"data":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Data"},"error_code":{"type":"integer","title":"Error Code","default":0},"error_message":{"type":"string","title":"Error Message","default":""}},"type":"object","required":["success","addr"],"title":"CommandResponse","description":"Generic response from a valve command."}
⚠️This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.Schema of the response body
⚠️This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.Schema of the response body
{"properties":{"success":{"type":"boolean","title":"Success"},"addr":{"type":"integer","title":"Addr"},"message":{"type":"string","title":"Message","default":""},"data":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Data"},"error_code":{"type":"integer","title":"Error Code","default":0},"error_message":{"type":"string","title":"Error Message","default":""}},"type":"object","required":["success","addr"],"title":"CommandResponse","description":"Generic response from a valve command."}
⚠️This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.Schema of the response body
⚠️This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.Schema of the response body
{"items":{"$ref":"#/components/schemas/habitat__models__smartvalve__CommandResponse"},"type":"array","title":"Response Terminate All Valves Terminate All Post"}
GET /valves/{addr}/diagnostics
Valve diagnostics
Description
Get diagnostic information: temperature, voltage, operating time, firmware.
Input parameters
Parameter
In
Type
Default
Nullable
Description
addr
path
integer
No
Responses
Schema of the response body
{"type":"object","additionalProperties":true,"title":"Response Get Diagnostics Valves Addr Diagnostics Get"}
⚠️This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.Schema of the response body
Optional top plunger speed in µL/s to apply before the move. When omitted, the firmware's previously-set speed is used.
AtomicCallRequest
Name
Type
Description
params
Atomic parameters keyed by the names declared in the manifest.
AtomicManifest
Name
Type
Description
authored_by
string
belongs_to_routines
Array<string>
blocking
description
string
device_kind
string
emits_metrics
Array<string>
Advisory list of metric names this atomic is expected to emit. Not populated by any atomic today and not enforced or cross-checked against the telemetry layer -- agent-read-only metadata, not a live emission guarantee.
estimated_fluid_volume_ul
estimated_wear
string
Advisory relative wear estimate. Not derived from any measurement and not read by the runtime -- agent-read-only metadata for planning, not a calibrated cost model.
Advisory pointer to the atomic that would undo this one. Not populated by any atomic today and not enforced or invoked by the runtime -- agent-read-only metadata, not a guarantee a reverse operation exists or is registered.
Optional one-shot post-init plunger gap in increments. If provided, ``set_init_gap`` is called BEFORE the Z command on this initialization only. ``None`` means use the previously-configured gap (firmware default ~1600 if never set). DANGER: see ``POST /pumps/{addr}/init-gap`` for hazard details. This path requires ``gap_increments >= 100`` (the safety floor) — there is no override field on this endpoint. Use the dedicated ``/init-gap`` endpoint with ``override_safety_floor=true`` if you must persist a sub-floor value before initialization.
input_port
integer
Distribution-valve input port for homing. Use ``0`` (or omit) for auto-selection from the pump YAML ``port_map``: first waste role, else first port not listed in the map, else port 1. JSON may use the field name ``init_port`` as an alias.