mysolenso.services.stations.countdevice - Station Count Device

Service for retrieving device count summary data for a station.

This module provides MySolensoStationCountDevice, which wraps the station_count_device Solenso endpoint. One call returns the number of connected devices by type for the active station.

class mysolenso.services.stations.countdevice.MySolensoStationCountDevice(parent)[source]

Bases: object

Retrieve device count summary for the active station.

Exposes individual count properties for each device category. Call station_count_device_refresh() to fetch or update the data.

Parameters:

parent (MySolenso) – The parent client object that holds the authentication context and the active station reference.

Raises:

MySolensoException – If no active station is set on the parent at construction time.

set_station(id, refresh=True)[source]

Switch the active station for device count queries.

Parameters:
  • id (int) – ID of the target station. Must exist in the account’s station list.

  • refresh (bool) – When True (default), immediately re-fetches the device counts for the new station.

Raises:

MySolensoException – If the requested station ID is not found.

Return type:

None

station_count_device_refresh()[source]

Force a fresh fetch of device count data from the API.

Return type:

None

property all_data: dict

Raw API response for the station count device endpoint.

Returns:

Device count summary. Example:

{
    "sn": null,
    "station_num": 1,
    "dtu_num": 1,
    "repeater_num": 0,
    "mi_num": 5,
    "inv_num": 0,
    "au_num": 0,
    "rsd_num": 0,
    "op_num": 0,
    "tran_num": 0,
    "meter_num": 0,
    "bms_num": 0,
    "em_num": 0
}

Return type:

dict

property sn: str

Serial number field from the device count response (may be None).

property station_num: int

Number of PV stations included in the response.

property dtu_num: int

Number of DTUs attached to the station.

property repeater_num: int

Number of repeater devices attached to the station.

property mi_num: int

Number of microinverters (MI) attached to the station.

property au_num: int

Number of AU (auto-upgrade) devices attached to the station.

property rsd_num: int

Number of RSD (rapid shutdown) devices attached to the station.

property op_num: int

Number of OP (optimiser) devices attached to the station.

property tran_num: int

Number of transformer devices attached to the station.

property meter_num: int

Number of energy meters attached to the station.

property bms_num: int

Number of BMS (battery management system) units attached to the station.

property em_num: int

Number of EM (energy manager) units attached to the station.