C1000(X)

class SolixBLE.C1000(ble_device: BLEDevice)

C1000(X) Power Station.

Use this class to connect and monitor a C1000(X) power station. This model is also known as the A1761.

__init__(ble_device: BLEDevice) None

Initialise device object. Does not connect automatically.

add_callback(function: Callable[[], None]) None

Register a callback to be run on state updates.

Triggers include changes to pretty much anything, including, battery percentage, output power, solar, connection status, etc.

Parameters:

function – Function to run on state changes.

async connect(max_attempts: int = 3, run_callbacks: bool = True) bool

Connect to device.

This will connect to the device, determine if it is supported and subscribe to status updates, returning True if successful.

Parameters:
  • max_attempts – Maximum number of attempts to try to connect (default=3).

  • run_callbacks – Execute registered callbacks on successful connection (default=True).

async disconnect() None

Disconnect from device and reset internal state.

Disconnects from device, resets internal state, including connection attempts, cancels the automatic reconnection task and will not execute state changes callbacks.

async get_status_update() dict[str, bytes]

Request and retrieve a status update from the device.

Raises:
  • ConnectionError – If not connected to device.

  • TimeoutError – If no response from device.

  • BleakError – If command transmission fails.

Returns:

Dictionary containing telemetry parameters.

remove_callback(function: Callable[[], None]) None

Remove a registered state change callback.

Parameters:

function – Function to remove from callbacks.

Raises:

ValueError – If callback does not exist.

async set_display_mode(mode: LightStatus) None

Set the status/mode of the LCD display.

Parameters:

mode – Mode/status to set display to (off/low/med/high).

Raises:
  • ValueError – If requested mode is invalid.

  • ConnectionError – If not connected to device.

  • BleakError – If command transmission fails.

async set_display_timeout(timeout: DisplayTimeout) None

Set the status/mode of the LCD display.

Parameters:

mode – Mode/timeout to set display to (30s, 5m, 30m, etc).

Raises:
  • ValueError – If requested mode is invalid.

  • ConnectionError – If not connected to device.

  • BleakError – If command transmission fails.

async set_light_mode(mode: LightStatus) None

Set the light mode of the LED bar.

Parameters:

mode – Mode to set light bar to.

Raises:
  • ValueError – If requested mode is invalid.

  • ConnectionError – If not connected to device.

  • BleakError – If command transmission fails.

async turn_ac_off() None

Turn the AC output off.

Raises:
  • ConnectionError – If not connected to device.

  • BleakError – If command transmission fails.

async turn_ac_on() None

Turn the AC output on.

Raises:
  • ConnectionError – If not connected to device.

  • BleakError – If command transmission fails.

async turn_dc_off() None

Turn the DC output off.

Raises:
  • ConnectionError – If not connected to device.

  • BleakError – If command transmission fails.

async turn_dc_on() None

Turn the DC output on.

Raises:
  • ConnectionError – If not connected to device.

  • BleakError – If command transmission fails.

async turn_display_off() None

Turn the display off.

Raises:
  • ConnectionError – If not connected to device.

  • BleakError – If command transmission fails.

async turn_display_on() None

Turn the display on.

Raises:
  • ConnectionError – If not connected to device.

  • BleakError – If command transmission fails.

property ac_output: PortStatus

AC Port Status.

PortStatus.NOT_CONNECTED signifies off. PortStatus.OUTPUT signifies on.

Returns:

Status of the AC port.

property ac_power_in: int

AC Power In.

Returns:

Total AC power in or default int value.

property ac_power_out: int

AC Power Out.

Returns:

Total AC power out or default int value.

property ac_timer: datetime | None

Timestamp of AC timer.

Returns:

Timestamp of when AC timer expires or None.

property ac_timer_remaining: int

Time remaining on AC timer.

Returns:

Seconds remaining or default int value.

property address: str

MAC address of device.

Returns:

The Bluetooth MAC address of the device.

property available: bool

Connected to device and data is available.

Returns:

True/False if the device is connected and sending telemetry.

property battery_health: int

Battery health as a percentage.

Returns:

Percentage of battery health or default int value.

property battery_health_expansion: int

Battery health as a percentage for expansion battery.

Returns:

Percentage of expansion battery health or 0 if not present or default int value.

property battery_percentage: int

Battery Percentage.

Returns:

Percentage charge of battery or default int value.

property battery_percentage_expansion: int

Battery Percentage of the expansion battery.

Returns:

Percentage charge of expansion battery or 0 if not present or default int value.

property connected: bool

Connected to device.

This does not mean that an encrypted connection has been established or that any data values have been populated, use the available property to determine that.

Returns:

True/False if connected to device.

property days_remaining: int

Time remaining to full/empty.

Note that any partial days are overflowed into the hours remaining. Use time_remaining if you want hours to be included.

Returns:

Days remaining or default int value.

property hours_remaining: float

Time remaining to full/empty.

Note that any hours over 24 are overflowed to the days remaining. Use time_remaining if you want days to be included.

Returns:

Hours remaining or default float value.

property last_update: datetime | None

Timestamp of last telemetry data update from device.

Returns:

Timestamp of last update or None.

property name: str

Bluetooth name of the device.

Returns:

The name of the device or default string value.

property negotiated: bool

Has an encrypted session been successfully negotiated.

This does not mean that any data values have been populated, use the available property to determine that.

Returns:

True/False if session has been negotiated and connected.

property num_expansion: int

Number of expansion batteries.

Returns:

Number of expansion batteries or default int value.

property power_in: int

Total Power In.

Returns:

Total power in or default int value.

property power_out: int

Total Power Out.

Returns:

Total power out or default int value.

property serial_number: str

Device serial number.

Returns:

Device serial number or default str value.

property software_version: str

Main software version.

Returns:

Firmware version or default str value.

property software_version_controller: str

Software version of the controller.

Returns:

Firmware version or default str value.

property software_version_expansion: str

Software version of any expansion batteries.

If there is no expansion battery then it will be “0”.

Returns:

Firmware version or default str value.

property solar_power_in: int

Solar Power In.

Returns:

Total solar power in or default int value.

property temperature: int

Temperature of the unit (C).

Returns:

Temperature of the unit in degrees C.

property temperature_expansion: int

Temperature of the expansion battery if present (C).

Returns:

Temperature of expansion battery in degrees C or 0 if not present or default int value.

property time_remaining: float

Time remaining to full/empty in hours.

Returns:

Hours remaining or default float value.

property timestamp_remaining: datetime | None

Timestamp of when device will be full/empty.

Returns:

Timestamp of when will be full/empty or None.

property usb_a1_power: int

USB A1 Power.

Returns:

USB port A1 power or default int value.

property usb_a2_power: int

USB A2 Power.

Returns:

USB port A2 power or default int value.

property usb_c1_power: int

USB C1 Power.

Returns:

USB port C1 power or default int value.

property usb_c2_power: int

USB C2 Power.

Returns:

USB port C2 power or default int value.