mysolenso.services.dtu.selectall - DTU Select All
Service for retrieving the DTU and associated microinverter list.
This module provides MySolensoDTUSelectAll, which wraps the
dtu_select_all Solenso endpoint. One call returns the primary DTU record
and the complete list of microinverters attached through the repeater layer.
- class mysolenso.services.dtu.selectall.MySolensoDTUSelectAll(parent)[source]
Bases:
objectRetrieve the DTU and all associated microinverters for a station.
Call
dtu_select_all_refresh()to populate the data, then access the properties below. The active station is inherited from the parentMySolensoobject; useset_station()to query a different station without rebuilding the whole client.- 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 DTU queries.
- Parameters:
- Raises:
MySolensoException – If the requested station ID is not found in the account.
- Return type:
- dtu_select_all_refresh()[source]
Force a fresh fetch of the DTU and microinverter data from the API.
Equivalent to calling
_get_dtu_select_all()directly. Use this method to update the cached data without switching station.- Return type:
- property all_data: dict
Raw API response for the DTU select-all endpoint.
- Returns:
Full response dictionary containing the
dturecord and therepeater_listwith its nestedmicroslist. Example:{ "dtu": { "id": 1238090, "sn": "D0900999H", "dev_type": 1, "vc": "289" }, "repeater_list": [ { "id": 0, "sn": "", "dev_type": 2, "inv_id": null, "inv_sn": null, "inv_type": null, "micros": [ { "sn": "A900016B1", "id": 9988920, "vc": "2BD", "dev_type": 3, "port_array": [ 1, 2 ] }, { "sn": "A900016B2", "id": 9988930, "vc": "23D", "dev_type": 3, "port_array": [ 1, 2 ] }, { "sn": "A900016B3", "id": 9988910, "vc": "212", "dev_type": 3, "port_array": [ 1, 2 ] }, { "sn": "A900016B4", "id": 9988940, "vc": "22L", "dev_type": 3, "port_array": [ 1, 2 ] }, { "sn": "A900016B5", "id": 9988950, "vc": "2L2", "dev_type": 3, "port_array": [ 1, 2 ] } ] } ] }
- Return type:
- property list_micros: list[dict]
serial number and internal ID only.
- Returns:
Each item contains only
snandid. Example:[ {"sn": "A900016B1", "id": 9988920}, {"sn": "A900016B2", "id": 9988930}, ... ]
- Return type:
- Raises:
ValueError – If the internal data store is uninitialised or empty (i.e.
dtu_select_all_refresh()has not been called yet).- Type:
Minimal microinverter projection