You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Measurands autodetection in ocppv16.py assumes that there are no limitations set by charger MeterValuesSampledDataMaxLength key. However, Growatt Thor does have the limit of 5. When the measurands are configured in MeterValuesSampledData command, the OCPP integration sends too many of them. I would expect that the charger declines this request, but it does not, probably causing corruption of charger's internal data structures. After that results of some calls like NumberOfConnectors are returning random values causing further failures (see issue #1452 for example). Also, not all requested measurands are reported back to the server
To Reproduce
Use the integration with Growatt Thor charger
Model: Growatt Thor 11 A/S
FW version: THOR_11AS-V5.2.4-20230307-NOVO
Charger feedback when manually getting/setting the keys:
MeterValuesSampledDataMaxLength = 5
MeterValuesSampledData setting to the following seem to work, despite maximum is 5
Current.Import,Energy.Active.Import.Interval,Energy.Active.Import.Register,Power.Active.Import,SoC,Voltage,Temperature
MeterValuesSampledData setting to OCPP component default leads to partially indeterministic charger behavior
Current.Export,Current.Import,Current.Offered,Energy.Active.Export.Interval,Energy.Active.Export.Register,Energy.Active.Import.Interval,Energy.Active.Import.Register,Energy.Reactive.Export.Interval,Energy.Reactive.Export.Register,Energy.Reactive.Import.Interval,Energy.Reactive.Import.Register,Frequency,Power.Active.Export,Power.Active.Import,Power.Factor,Power.Offered,Power.Reactive.Export,Power.Reactive.Import,RPM,SoC,Temperature,Voltage
Expected behavior
User is warned in the log if MeterValuesSampledDataMaxLength limit is not respected, in case it exists (the key is optional in OCPP v1.6 protocol)
Additional context
Proposal to fix:
check if corresponding sensor is enabled in HASS before trying to autodetect the measurand. This will give the user control to discover which configuration is usable
I can fix the issue but I need:
Agreement that proposed way is ok
Guidance how to check if a HASS sensors is disabled or not
Guidance how to enable the OCPP test system locally. At this moment I receive exception when I try to run pytest (venv cofigured, hass installed)
`
python -m pytest ./tests/
Traceback (most recent call last):
File "/home/pi/sw/ocpp/lib/python3.13/site-packages/_pytest/config/init.py", line 858, in import_plugin import(importspec)
ModuleNotFoundError: No module named 'pytest_homeassistant_custom_component'
`
The text was updated successfully, but these errors were encountered:
Describe the bug
Measurands autodetection in ocppv16.py assumes that there are no limitations set by charger MeterValuesSampledDataMaxLength key. However, Growatt Thor does have the limit of 5. When the measurands are configured in MeterValuesSampledData command, the OCPP integration sends too many of them. I would expect that the charger declines this request, but it does not, probably causing corruption of charger's internal data structures. After that results of some calls like NumberOfConnectors are returning random values causing further failures (see issue #1452 for example). Also, not all requested measurands are reported back to the server
To Reproduce
Use the integration with Growatt Thor charger
Model: Growatt Thor 11 A/S
FW version: THOR_11AS-V5.2.4-20230307-NOVO
Charger feedback when manually getting/setting the keys:
Current.Import,Energy.Active.Import.Interval,Energy.Active.Import.Register,Power.Active.Import,SoC,Voltage,Temperature
Current.Export,Current.Import,Current.Offered,Energy.Active.Export.Interval,Energy.Active.Export.Register,Energy.Active.Import.Interval,Energy.Active.Import.Register,Energy.Reactive.Export.Interval,Energy.Reactive.Export.Register,Energy.Reactive.Import.Interval,Energy.Reactive.Import.Register,Frequency,Power.Active.Export,Power.Active.Import,Power.Factor,Power.Offered,Power.Reactive.Export,Power.Reactive.Import,RPM,SoC,Temperature,Voltage
Expected behavior
User is warned in the log if MeterValuesSampledDataMaxLength limit is not respected, in case it exists (the key is optional in OCPP v1.6 protocol)
Additional context
Proposal to fix:
`
python -m pytest ./tests/
Traceback (most recent call last):
File "/home/pi/sw/ocpp/lib/python3.13/site-packages/_pytest/config/init.py", line 858, in import_plugin
import(importspec)
ModuleNotFoundError: No module named 'pytest_homeassistant_custom_component'
`
The text was updated successfully, but these errors were encountered: