nathanmarlor/foxess_em

Cannot add integration to HA using Fox Cloud

Closed this issue · 2 comments

Description

Getting error message "Error - please check username and password" when trying to add the integration to HA using HACS at the Fox Cloud credential step.
(No configuration is saved because the failure happens during the wizard, so cannot provide the configuration - but the error is reproducible easily.)
Attempted to add this config to get debug logs, but did not seem to be very effective:

logger:
  default: info
  logs:
    custom_components.foxess_em: debug

Version of the custom_component

v1.7.6n2

Configuration

#(Yaml configuration not applicable - cannot get this far to have any configuration as it fails during adding the integration)

Describe the bug

When adding the integration after HACS has downloaded it, the wizard loads, asking for Solcast API key. The next selection is made: Fox Cloud. All good so far, then after entering the credentials for Fox Cloud, it skips back to the credential screen saying that an error occurred.
In the HA > System > Logs section, this items appears at the top of the screen:

Logger: custom_components.foxess_em.config_flow
Source: custom_components/foxess_em/config_flow.py:287
Integration: FoxESS - Energy Management ([documentation](https://github.com/nathanmarlor/foxess_em), [issues](https://github.com/nathanmarlor/foxess_em/issues))
First occurred: 09:34:00 (1 occurrences)
Last logged: 09:34:00

'NoneType' object is not subscriptable

There are two other errors that only show up on the larger screen when you expand it.

Debug log

2023-05-14 09:33:47.524 DEBUG (MainThread) [custom_components.foxess_em.forecast] Retrieving available sites
2023-05-14 09:33:59.478 DEBUG (MainThread) [custom_components.foxess_em.fox] Logging into Fox Cloud
2023-05-14 09:33:59.478 DEBUG (MainThread) [custom_components.foxess_em.fox] Issuing request to (https://www.foxesscloud.com/c/v0/user/login) with params: {'user': '[redacted]', 'password': '[redacted]'}
2023-05-14 09:34:00.615 WARNING (MainThread) [custom_components.foxess_em.config_flow] 'NoneType' object is not subscriptable

Thanks, I think Fox have changed something relating to the login procedure. I'll have a look next week.