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

_system_inverter_data fails if GetInverterRealtimeData.cgi reports None as Value #16

Open
rikuriva opened this issue Dec 3, 2023 · 1 comment · May be fixed by #17
Open

_system_inverter_data fails if GetInverterRealtimeData.cgi reports None as Value #16

rikuriva opened this issue Dec 3, 2023 · 1 comment · May be fixed by #17
Labels
bug Something isn't working

Comments

@rikuriva
Copy link

rikuriva commented Dec 3, 2023

Symo GEN24 10.0 Plus reports None for GetInverterRealtimeData.cgi?Scope=System as shown below.
And then the method _system_inverter_data fails with an Exception in (for example)
sensor["energy_day"]["value"] += data["DAY_ENERGY"]["Values"][i]

I can not say if this is the case because the GEN24 never reports data
or if there is currently no data because there is no production because of snow on my modules.

In my opinion None should be handled as 0.0 in _system_inverter_data

Thanks

Result for a call to GetInverterRealtimeData.cgi?Scope=System:
{
"Body": {
"Data": {
"DAY_ENERGY": {
"Unit": "Wh",
"Values": {
"1": None
}
},
"PAC": {
"Unit": "W",
"Values": {
"1": 0.0
}
},
"TOTAL_ENERGY": {
"Unit": "Wh",
"Values": {
"1": 398373.85305555555
}
},
"YEAR_ENERGY": {
"Unit": "Wh",
"Values": {
"1": None
}
}
}
},
"Head": {
"RequestArguments": {
"Scope": "System"
},
"Status": {
"Code": 0,
"Reason": "",
"UserMessage": ""
},
"Timestamp": "2023-12-03T18:37:16+00:00"
}
}

@nielstron
Copy link
Owner

Hi @rikuriva
Thanks for reporting this. Has there been an update regarding the snow situation? I guess either way, the package should support handling "None" as values there.

@nielstron nielstron added the bug Something isn't working label Feb 3, 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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants