C300(X) DC
- class SolixBLE.C300DC(ble_device: BLEDevice)
C300(X) DC Power Station.
Use this class to connect and monitor a C300(X) DC power station. This model is also known as the A1728.
- __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.
- 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.
- 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_capacity: int
Current battery capacity in mAh.
- Returns:
Current battery capacity or default int value.
- property battery_health: int
Battery health.
- Returns:
Percentage battery health or default int value.
- property battery_percentage: int
Battery Percentage.
- Returns:
Percentage charge of battery or default int value.
- property charging_status: ChargingStatus
Charging status of the device.
- Returns:
Status of charging.
- 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 dc_12v_auto_on: bool
Configured DC Port Auto On.
- Returns:
Status of the DC auto on mode.
- property dc_port: PortStatus
DC Port Status.
- Returns:
Status of the DC port.
- property dc_power_out: int
DC Power Out.
- Returns:
DC power out or default int value.
- property dc_timer: datetime | None
Timestamp of DC timer.
- Returns:
Timestamp of when DC timer expires or None.
- property dc_timer_remaining: int
Time remaining on DC timer.
- Returns:
Seconds remaining or default int value.
- property device_overload: PortOverload
Device overload status.
- Returns:
Device overload status or default int value.
- property device_timeout: int
Configured device timeout in minutes.
- Returns:
Configured device timeout or default int value.
- property display_mode: LightStatus
Configured display backlight brightness.
- Returns:
Configured display backlight brightness.
- property display_timeout: int
Configured display timeout in seconds.
- Returns:
Configured display timeout 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 is_display_on: bool
Display on status.
- Returns:
Status of the display.
- property last_update: datetime | None
Timestamp of last telemetry data update from device.
- Returns:
Timestamp of last update or None.
- property light: LightStatus
Light Status.
- Returns:
Status of the light bar.
- property light_timeout: int
Configured light timeout in minutes.
- Returns:
Configured light timeout or default int value.
- 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 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
Serial number.
- Returns:
The serial number of the device.
- property software_version: str
Main software version.
- Returns:
Firmware version or default str value.
- property solar_port: PortStatus
Solar Port Status.
- Returns:
Status of the solar port.
- 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_unit: TemperatureUnit
Configured temperature unit (returned temperature is always in degrees C).
- Returns:
Configured temperature unit 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.
- property usb_c3_power: int
USB C3 Power.
- Returns:
USB port C3 power or default int value.
- property usb_c4_power: int
USB C4 Power.
- Returns:
USB port C4 power or default int value.
- property usb_port_a1: PortStatus
USB A1 Port Status.
- Returns:
Status of the USB A1 port.
- property usb_port_a2: PortStatus
USB A2 Port Status.
- Returns:
Status of the USB A2 port.
- property usb_port_c1: PortStatus
USB C1 Port Status.
- Returns:
Status of the USB C1 port.
- property usb_port_c2: PortStatus
USB C2 Port Status.
- Returns:
Status of the USB C2 port.
- property usb_port_c3: PortStatus
USB C3 Port Status.
- Returns:
Status of the USB C3 port.
- property usb_port_c4: PortStatus
USB C4 Port Status.
- Returns:
Status of the USB C4 port.