hultenvp / solis-sensor

HomeAssistant integration for the SolisCloud PV Monitoring portal via SolisCloud API
Apache License 2.0
208 stars 42 forks source link

Unable to login to Solis cloud #235

Closed jaakleen closed 1 year ago

jaakleen commented 1 year ago

Discussed in https://github.com/hultenvp/solis-sensor/discussions/226

Originally posted by **robconway** December 7, 2022 I am unable to login to Solis cloud despite following the info, and I have an inverter installed, so I am unclear at the error. Any ideas? My log show: Logger: custom_components.solis.soliscloud_api Source: custom_components/solis/soliscloud_api.py:193 Integration: Solis Inverter ([documentation](https://github.com/hultenvp/solis-sensor/), [issues](https://github.com/hultenvp/solis-sensor/issues)) First occurred: 07:42:06 (1 occurrences) Last logged: 07:42:06 No inverters found
jaakleen commented 1 year ago
async def _get_station_details(self, plant_id: str) -> dict[str, str] | None:
    """
    Fetch Station Details
    """

    params = {
        'id': plant_id
    }
    result = await self._post_data_json(PLANT_DETAIL, params)

    if result[SUCCESS] is True:
        jsondata : dict[str, str] = result[CONTENT]
        if jsondata['code'] == '0':
            return jsondata
        else:
            _LOGGER.info("%s responded with error: %s:%s",PLANT_DETAIL, \
                jsondata['code'], jsondata['msg'])
            result = { SUCCESS: True, MESSAGE:'OK', STATUS_CODE:200, CONTENT:{'code': '0', 'msg': 'success', 'data': {'sno': plant_id, 'latitude':0.0, 'longitude':0.0, 'cityStr': ''}}}
            jsondata : dict[str, str] = result[CONTENT]
            return jsondata
    else:
        _LOGGER.info('Unable to fetch details for Station with ID: %s', plant_id)
    return None
hultenvp commented 1 year ago

Thanks @jaakleen,

Can you enable debug and post the log here?

jaakleen commented 1 year ago

The code I poster is a work-a-round for the issue. The error is stil logged, i am include it here. But because of the work-a-round it continues

Op vr 16 dec. 2022 om 19:03 schreef hultenvp @.***>

Thanks @jaakleen https://github.com/jaakleen,

Can you enable debug and post the log here?

— Reply to this email directly, view it on GitHub https://github.com/hultenvp/solis-sensor/issues/235#issuecomment-1355329626, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANR4KC2HPIKCI6UIXFRXAUDWNSVGFANCNFSM6AAAAAATBAJYNA . You are receiving this because you were mentioned.Message ID: @.***>

alienatedsec commented 1 year ago

@hultenvp I started experiencing the same issue

image

I removed the integration and readded it today; hence why is only one occurrence

spiderpigsam commented 1 year ago

HI, I am also having the same issue followed documentation to the letter, tried uninstall integration and re-install.

This error originated from a custom integration.

Logger: custom_components.solis.soliscloud_api Source: custom_components/solis/soliscloud_api.py:204 Integration: Solis Inverter (documentation, issues) First occurred: 08:15:26 (1 occurrences) Last logged: 08:15:26

No inverters found

Home Assistant 2022.12.7 Supervisor 2022.11.2 Operating System 9.4 Frontend 20221213.1 - latest Ginlong Solis PV portal integration v3.2.1

Sam

spiderpigsam commented 1 year ago

Here is the debug log extract.

`2022-12-21 10:33:40.351 DEBUG (MainThread) [custom_components.solis.soliscloud_api] Response contains unexpected data: {'success': True, 'code': '1', 'msg': '数据异常 请联系管理员', 'data': None}

2022-12-21 10:33:40.351 WARNING (MainThread) [custom_components.solis.soliscloud_api] No inverters found`

hultenvp commented 1 year ago

Fixed in v3.2.2. If you still experience issues, please report in #229

jaakleen commented 1 year ago

Thanks

Op vr 23 dec. 2022 om 12:43 schreef hultenvp @.***>

Closed #235 https://github.com/hultenvp/solis-sensor/issues/235 as completed.

— Reply to this email directly, view it on GitHub https://github.com/hultenvp/solis-sensor/issues/235#event-8102858809, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANR4KC6D37ZP6ZJSAGPORDDWOWF55ANCNFSM6AAAAAATBAJYNA . You are receiving this because you were mentioned.Message ID: @.***>