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

Charger reported Rejected while setting MeterValuesSampledData because of too many arguments #1363

Open
netmikey opened this issue Oct 16, 2024 · 1 comment

Comments

@netmikey
Copy link

netmikey commented Oct 16, 2024

Describe the bug
Whenever the OCPP integration starts up, I get the following notification:

Warning: charger reported Rejected while setting MeterValuesSampledData=Current.Import,Current.Offered,Energy.Active.Import.Register,Energy.Reactive.Import.Register,Frequency,Power.Active.Import,Power.Factor,Power.Reactive.Import,Temperature,Voltage

Looking at the manual for my charger's OCPP integration, I see that there is a configuration key called MeterValuesSampledDataMaxLength which is read only and returns a fixed value of 9 for my charger. However, the list requested in MeterValuesSampledData is 10 entries long, so my guess is that this is the reason why setting MeterValuesSampledData is rejected.

Even worse: before attempting to set the list into MeterValuesSampledData, looking at the logs it seems that the integration iterates over the values and sets one after the other (maybe that is the way that other charging stations work). However, in my case, only the MeterValuesSampledData field of the last call (voltage) is actually set in the charger, so all other values are not being sampled. The charger is being reset to this "broken" state each time the integration restarts.

Here's my log:

2024-10-16 13:05:35.640 INFO (MainThread) [ocpp]: send [2,"2caa3518-861d-4f0a-82c4-889b9e86b5f4","ChangeConfiguration",{"key":"MeterValuesSampledData","value":"Current.Import"}]
2024-10-16 13:05:35.682 INFO (MainThread) [ocpp]: receive message [3,"2caa3518-861d-4f0a-82c4-889b9e86b5f4",{"status":"Accepted"}]
2024-10-16 13:05:35.689 INFO (MainThread) [ocpp]: send [2,"ca17f25a-9382-4ad9-a10f-244c217b15ef","ChangeConfiguration",{"key":"MeterValuesSampledData","value":"Current.Offered"}]
2024-10-16 13:05:35.732 INFO (MainThread) [ocpp]: receive message [3,"ca17f25a-9382-4ad9-a10f-244c217b15ef",{"status":"Accepted"}]
2024-10-16 13:05:35.732 INFO (MainThread) [ocpp]: send [2,"5dfd0c8d-587e-4f5e-83f0-96cea6569a72","ChangeConfiguration",{"key":"MeterValuesSampledData","value":"Energy.Active.Import.Register"}]
2024-10-16 13:05:35.772 INFO (MainThread) [ocpp]: receive message [3,"5dfd0c8d-587e-4f5e-83f0-96cea6569a72",{"status":"Accepted"}]
2024-10-16 13:05:35.772 INFO (MainThread) [ocpp]: send [2,"54f802fd-4e4c-49f9-8d49-e71c71ca8563","ChangeConfiguration",{"key":"MeterValuesSampledData","value":"Energy.Reactive.Import.Register"}]
2024-10-16 13:05:35.822 INFO (MainThread) [ocpp]: receive message [3,"54f802fd-4e4c-49f9-8d49-e71c71ca8563",{"status":"Accepted"}]
2024-10-16 13:05:35.823 INFO (MainThread) [ocpp]: send [2,"ae99296a-0f84-4505-88ae-34677c482d3b","ChangeConfiguration",{"key":"MeterValuesSampledData","value":"Frequency"}]
2024-10-16 13:05:35.862 INFO (MainThread) [ocpp]: receive message [3,"ae99296a-0f84-4505-88ae-34677c482d3b",{"status":"Accepted"}]
2024-10-16 13:05:35.863 INFO (MainThread) [ocpp]: send [2,"d1f00617-3ae3-487e-9fcc-b776fb4b6fff","ChangeConfiguration",{"key":"MeterValuesSampledData","value":"Power.Active.Import"}]
2024-10-16 13:05:35.902 INFO (MainThread) [ocpp]: receive message [3,"d1f00617-3ae3-487e-9fcc-b776fb4b6fff",{"status":"Accepted"}]
2024-10-16 13:05:35.903 INFO (MainThread) [ocpp]: send [2,"2cf2f2d5-980c-41c7-adb3-d872780cd3a1","ChangeConfiguration",{"key":"MeterValuesSampledData","value":"Power.Factor"}]
2024-10-16 13:05:35.942 INFO (MainThread) [ocpp]: receive message [3,"2cf2f2d5-980c-41c7-adb3-d872780cd3a1",{"status":"Accepted"}]
2024-10-16 13:05:35.942 INFO (MainThread) [ocpp]: send [2,"9e9a63be-ba7a-40f8-a026-3371747b845a","ChangeConfiguration",{"key":"MeterValuesSampledData","value":"Power.Reactive.Import"}]
2024-10-16 13:05:36.022 INFO (MainThread) [ocpp]: receive message [3,"9e9a63be-ba7a-40f8-a026-3371747b845a",{"status":"Accepted"}]
2024-10-16 13:05:36.022 INFO (MainThread) [ocpp]: send [2,"62b575ce-50e7-4d09-bad9-22d48f6fcf1c","ChangeConfiguration",{"key":"MeterValuesSampledData","value":"Temperature"}]
2024-10-16 13:05:36.062 INFO (MainThread) [ocpp]: receive message [3,"62b575ce-50e7-4d09-bad9-22d48f6fcf1c",{"status":"Accepted"}]
2024-10-16 13:05:36.062 INFO (MainThread) [ocpp]: send [2,"b1030f6e-aebe-4e3a-9b21-908199abb9b8","ChangeConfiguration",{"key":"MeterValuesSampledData","value":"Voltage"}]
2024-10-16 13:05:36.112 INFO (MainThread) [ocpp]: receive message [3,"b1030f6e-aebe-4e3a-9b21-908199abb9b8",{"status":"Accepted"}]
2024-10-16 13:05:36.113 INFO (MainThread) [ocpp]: send [2,"87218414-0140-4615-a673-ed5081eab54e","GetConfiguration",{"key":["MeterValuesSampledData"]}]
2024-10-16 13:05:36.162 INFO (MainThread) [ocpp]: receive message [3,"87218414-0140-4615-a673-ed5081eab54e",{"configurationKey":[{"key":"MeterValuesSampledData","readonly":false,"value":"Voltage"}]}]
2024-10-16 13:05:36.163 INFO (MainThread) [ocpp]: send [2,"e9338b2d-bb9d-4760-9a2d-976b7ffd674e","GetConfiguration",{"key":["MeterValuesSampledData"]}]
2024-10-16 13:05:36.232 INFO (MainThread) [ocpp]: receive message [3,"e9338b2d-bb9d-4760-9a2d-976b7ffd674e",{"configurationKey":[{"key":"MeterValuesSampledData","readonly":false,"value":"Voltage"}]}]
2024-10-16 13:05:36.233 INFO (MainThread) [ocpp]: send [2,"7ec51591-4f60-43fc-8037-0fc2741bded5","ChangeConfiguration",{"key":"MeterValuesSampledData","value":"Current.Import,Current.Offered,Energy.Active.Import.Register,Energy.Reactive.Import.Register,Frequency,Power.Active.Import,Power.Factor,Power.Reactive.Import,Temperature,Voltage"}]
2024-10-16 13:05:36.332 INFO (MainThread) [ocpp]: receive message [3,"7ec51591-4f60-43fc-8037-0fc2741bded5",{"status":"Rejected"}]

To Reproduce
Steps to reproduce the behavior:

  1. Use an Alfen Single S Line charger
  2. Reload the integration (or restart HA)
  3. See the warning

Expected behavior
Should / could the integration query MeterValuesSampledDataMaxLength then remember its value and apply it as the maximum number of elements when attempting to set MeterValuesSampledData?

Screenshots
n/a

Desktop (please complete the following information):

  • OS: macOS
  • Browser chrome
  • Version 129

Additional context
I'm pretty sure I checked the "Automatic detection of OCPP Measurands" checkbox when I set up the integration, so I guess it auto-detected one more measurand than MeterValuesSampledDataMaxLength.

Copy link

Stale issue message

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant