mysolenso.services.dtu.find - DTU Find

Service for retrieving detailed information about a single DTU.

This module provides MySolensoDTUFind, which wraps the dtu_find Solenso endpoint. A valid DTU ID must be set via set_dtu() before the data is fetched.

class mysolenso.services.dtu.find.MySolensoDTUFind(parent)[source]

Bases: object

Retrieve the full detail record for a single DTU.

Call set_dtu() with a valid DTU ID to trigger the API request and populate the cached data. The ID is validated against the DTU returned by MySolensoDTUSelectAll.

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)[source]

Switch the active station context (does not refresh data).

Parameters:

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

Raises:

MySolensoException – If the requested station ID is not found.

Return type:

None

set_dtu(id, refresh=True)[source]

Select the DTU to query and optionally fetch its data.

The DTU ID is validated against the record returned by dtu_select_all_refresh().

Parameters:
  • id (int) – Internal numeric ID of the DTU to query.

  • refresh (bool) – When True (default), immediately fetches the DTU detail record from the API.

Raises:

MySolensoException – If the requested DTU ID is not found.

Return type:

None

dtu_find_refresh()[source]

Force a fresh fetch of the DTU detail record from the API.

Return type:

None

property all_data: dict

Raw API response for the DTU find endpoint.

Returns:

Full DTU record including firmware versions, hardware model, rule configuration, and supported microinverter types. Example:

{
    "id": 1238090,
    "sid": 9999999,
    "classify": 1,
    "station_name": "DOE JOHN",
    "gw_sn": "D0900999H",
    "sn": "D0900999H",
    "dev_type": 1,
    "replace_num": 0,
    "create_by": 299988,
    "create_at": "2023-06-27 17:48:02",
    "tz_name": "UTC+01",
    "update_by": 299988,
    "update_at": "2023-06-27 17:48:02",
    "vc": "289",
    "init_soft_ver": "V00.00.06",
    "init_hard_ver": "H12.02.02",
    "init_rf_soft_ver": "256",
    "init_rf_hard_ver": "0",
    "wifi_ver": null,
    "model_info": null,
    "repeater_num": 0,
    "mi_num": 5,
    "rule": {
        "dev_type": 1,
        "version": 3,
        "balance": 1,
        "reflux": 1,
        "repeater": 0,
        "module_count": 99,
        "multiple": 0,
        "sun_spec": 0,
        "power_limit": 7,
        "model": 0,
        "module_no": "HD-Insight",
        "module": "HD-Insight",
        "mi_list": [
            "A21",
            "A11",
            "A22",
            "A01",
            "A12",
            "A23",
            "A02",
            "A13",
            "A03",
            "A15",
            "A05"
        ],
        "sub1g": 0,
        "rule_config": 1,
        "conn_way": 11,
        "inner": 0,
        "pv": 0,
        "series": 0,
        "es": 0,
        "au": 0,
        "hp": 0,
        "lc": 0,
        "ble": 0,
        "data_interval": 0,
        "scan": 0,
        "classify": 1,
        "map": {
            "ut5": 99
        },
        "rep_set": [],
        "un": 0,
        "gen": 0
    },
    "fm": {}
}

Return type:

dict