Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Settings entities unavailable (Error setting firmware specific settings) #97

Open
DvdEnde opened this issue Jun 10, 2024 · 12 comments
Open
Labels
bug Something isn't working upstream Issue is related to implementation in a upstream dependency

Comments

@DvdEnde
Copy link

DvdEnde commented Jun 10, 2024

After restarting HA today I received following warning:

This error originated from a custom integration.

Logger: custom_components.sessy.number
Source: custom_components/sessy/number.py:102
integration: Sessy (documentation, issues)
First occurred: 1:43:13 PM (1 occurrences)
Last logged: 1:43:13 PM

Error setting firmware specific settings: 'NoneType' object has no attribute 'get'

@PimDoos
Copy link
Owner

PimDoos commented Jun 10, 2024

What firmware version are you on? This error should only occur if your Sessy firmware is not equal to the lastest version (in this case: 1.6.8), and thus does not support all feature the integration is expecting.

@DvdEnde
Copy link
Author

DvdEnde commented Jun 10, 2024 via email

@PimDoos
Copy link
Owner

PimDoos commented Jun 10, 2024

Does the issue occur consistently between reloads of the integration?

@DvdEnde
Copy link
Author

DvdEnde commented Jun 10, 2024 via email

@Tazzios
Copy link

Tazzios commented Sep 19, 2024

Same here with 1.7.2 and 0.7.0 complete reboot did not help.

Also some extra errors like not avialabe sensors/settings.

attached the HA log with some errors:
error_log.txt

@Torch1969
Copy link

Torch1969 commented Sep 19, 2024

Same here firmware 1.7.2 and ha-Sessy on 0.7.0 (but also on 0.6.3)
Schermafbeelding 2024-09-19 om 20 48 47
Log:
Deze fout is ontstaan door een aangepaste integratie.

Logger: custom_components.sessy.switch
Bron: custom_components/sessy/switch.py:49
integratie: Sessy (documentatie, problemen)
Eerst voorgekomen: 20:28:10 (1 gebeurtenissen)
Laatst gelogd: 20:28:10

Error setting firmware specific settings: 'NoneType' object has no attribute 'get'

Also:
Deze fout is ontstaan door een aangepaste integratie.

Logger: custom_components.sessy.number
Bron: custom_components/sessy/number.py:102
integratie: Sessy (documentatie, problemen)
Eerst voorgekomen: 20:28:10 (1 gebeurtenissen)
Laatst gelogd: 20:28:10

Error setting firmware specific settings: 'NoneType' object has no attribute 'get'

but also:
Deze fout is ontstaan door een aangepaste integratie.

Logger: custom_components.sessy.sessyentity
Bron: custom_components/sessy/sessyentity.py:62
integratie: Sessy (documentatie, problemen)
Eerst voorgekomen: 20:32:10 (20 gebeurtenissen)
Laatst gelogd: 20:52:10

Updating entity 'Stop Time' failed for 20 consecutive attempts. Exception occured: 'Key enabled_time has no value in cache SessyApiCommand.SYSTEM_SETTINGS'
Updating entity 'Minimum Power' failed for 25 consecutive attempts. Exception occured: 'Key min_power has no value in cache SessyApiCommand.SYSTEM_SETTINGS'
Updating entity 'Maximum Power' failed for 25 consecutive attempts. Exception occured: 'Key max_power has no value in cache SessyApiCommand.SYSTEM_SETTINGS'
Updating entity 'Start Time' failed for 25 consecutive attempts. Exception occured: 'Key enabled_time has no value in cache SessyApiCommand.SYSTEM_SETTINGS'
Updating entity 'Stop Time' failed for 25 consecutive attempts. Exception occured: 'Key enabled_time has no value in cache SessyApiCommand.SYSTEM_SETTINGS'

@PimDoos
Copy link
Owner

PimDoos commented Sep 19, 2024

Error setting firmware specific settings is thrown when the setup for the noise level and eco settings entities fails.

Looks like the integration is not able to access system settings on the Sessy API. This could have a few different causes.

  • Credentials: Are you sure the username and password are correct (both 8 characters, uppercase)? Without the correct credentials, only Power Status is available.
  • Network: Unstable connectivity between Sessy and Home Assistant might cause trouble. However, I would expect the issues to then be spread across all entities, not just these few.
  • Event loop: @Tazzios Your log shows Detected blocking call to open with [...] inside the event loop by custom integration 'nordpool'. This is known to break latency-sensitive operations. Can you try to disable the nordpool integration and see if that fixes anything?

Can you enable debug logging on the Sessy integration and reload it? This might reveal some more information about why the request to system settings fails.

I'm also interested to see whether the fieldnames mentioned in the error are present and contain values when you browse to the local api at http://sessy-xxxx.local/api/v1/system/settings

@Tazzios
Copy link

Tazzios commented Sep 20, 2024

A the local api, http://sessy-xxxx.local/api/v1/system/settings

I saw an error about eco hours (forgot to copy it ). After I set an value (2) at ecomode 'aantal laaduren' on portal.sessy.nl.
after that (and a complete reboot) i see:

{
	"status":	"ok",
	"p1_hostname":	"192.168.3.49",
	"pv_hostname":	"",
	"group_current":	16,
	"phase_current":	30,
	"group_sessys":	1,
	"phase_sessys":	1,
	"total_sessys":	1,
	"active_phase":	1,
	"min_power":	700,
	"max_power":	2200,
	"disable_noise_level":	false,
	"allowed_noise_level":	5,
	"enabled_time":	"00:00-23:59",
	"sessy_enabled":	true,
	"cloud_enabled":	true,
	"eco_charge_hours":	2,
	"eco_charge_power":	50,
	"eco_nom_charge":	true
} 

After a complete reboot it was working. Northpool is still on.

So it seems (in my case) the API from Sessy was broken because of a missing value from the ecomode(which i never used).

@Torch1969
Copy link

Torch1969 commented Sep 20, 2024

A the local api, http://sessy-xxxx.local/api/v1/system/settings

I saw an error about eco hours (forgot to copy it ). After I set an value (2) at ecomode 'aantal laaduren' on portal.sessy.nl. after that (and a complete reboot) i see:

{
	"status":	"ok",
	"p1_hostname":	"192.168.3.49",
	"pv_hostname":	"",
	"group_current":	16,
	"phase_current":	30,
	"group_sessys":	1,
	"phase_sessys":	1,
	"total_sessys":	1,
	"active_phase":	1,
	"min_power":	700,
	"max_power":	2200,
	"disable_noise_level":	false,
	"allowed_noise_level":	5,
	"enabled_time":	"00:00-23:59",
	"sessy_enabled":	true,
	"cloud_enabled":	true,
	"eco_charge_hours":	2,
	"eco_charge_power":	50,
	"eco_nom_charge":	true
} 

After a complete reboot it was working. Northpool is still on.

So it seems (in my case) the API from Sessy was broken because of a missing value from the ecomode(which i never used).

@PimDoos I see this error too:
{ "status": "error", "error": "Error whilst reading power.eco_charge_hrs" }

Like @Tazzios i also entered a value for charge hours in Sessy portal for eco mode (hard to find, you first have to change your strategy from api to eco and then you can enter a value for charging hours and save it, then switch back to strategy api). The the above url to /system/settings works and a reload of home assistant integration fixed the errors.

so problem solved, but hard to find…..

@PimDoos
Copy link
Owner

PimDoos commented Sep 20, 2024

@MartijnCharged can you have a look at this? Looks like the eco settings are not always properly initialized on all Sessy's.

@MartijnCharged
Copy link
Contributor

MartijnCharged commented Sep 23, 2024

The initialization of the settings occurs when eco mode is selected as the active strategy, or when saving from the web page / portal.
The settings api is not listed in the api docs, so we do not officially support calls to the settings endpoint.
There are plans to add setting to the list of supported api's.

@PimDoos
Copy link
Owner

PimDoos commented Sep 23, 2024

OK so for now the solution is to just save the settings from the portal, which fixes the state of the local settings. In the long term we'll have to await a more official API for more stable access to settings.
In the mean time I'll see if I can do anything to streamline the initialization of the settings entities, e.g. an error message which notifies you of the temporary solution.

@PimDoos PimDoos changed the title Error setting firmware specific settings: 'NoneType' object has no attribute 'get' Settings entities unavailable (Error setting firmware specific settings) Sep 23, 2024
@PimDoos PimDoos added bug Something isn't working upstream Issue is related to implementation in a upstream dependency labels Sep 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working upstream Issue is related to implementation in a upstream dependency
Projects
None yet
Development

No branches or pull requests

5 participants