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

Integration logs unexpected messages #1426

Open
RMUtter1 opened this issue Dec 10, 2024 · 0 comments
Open

Integration logs unexpected messages #1426

RMUtter1 opened this issue Dec 10, 2024 · 0 comments

Comments

@RMUtter1
Copy link

It's entirely possible that I''m misinterpreting this, but from here, it appears that the OCPP integration has gone rogue where logging messages is concerned.

My config.yaml contains no references to the logger. The HA documentation claims that no log message with an error level below WARNING should appear in the log if this is the case. It is the case for every integration installed here, except for the OCPP integration. Here's a recent excerpt from the log.

++++++++++

2024-12-10 12:19:59.054 INFO (MainThread) [ocpp] GRS-1700003D6FF: receive message [3,"6015a132-ecd5-4e60-9715-93aa419a64f0",{"status":"NotSupported"}]
2024-12-10 12:19:59.056 INFO (MainThread) [ocpp] GRS-1700003D6FF: send [2,"1c9e504a-26aa-45b1-adbd-0ab10d163b0a","ChangeConfiguration",{"key":"MeterValuesSampledData","value":"Voltage"}]
2024-12-10 12:19:59.379 INFO (MainThread) [ocpp] GRS-1700003D6FF: receive message [3,"1c9e504a-26aa-45b1-adbd-0ab10d163b0a",{"status":"NotSupported"}]
2024-12-10 12:19:59.380 INFO (MainThread) [ocpp] GRS-1700003D6FF: send [2,"b7314751-18b1-4b47-b535-89b848c70886","GetConfiguration",{"key":["MeterValuesSampledData"]}]
2024-12-10 12:19:59.844 INFO (MainThread) [ocpp] GRS-1700003D6FF: receive message [3,"b7314751-18b1-4b47-b535-89b848c70886",{"configurationKey":],"unknownKey":["MeterValuesSampledData"]}]
2024-12-10 12:19:59.844 ERROR (MainThread) [ocpp] Unable to parse message: '[3,"b7314751-18b1-4b47-b535-89b848c70886",{"configurationKey":],"unknownKey":["MeterValuesSampledData"]}]', it doesn't seem to be valid OCPP: FormatViolationError: Payload for Action is syntactically incorrect or structure for Action, {'cause': 'Message is not valid JSON', 'ocpp_message': '[3,"b7314751-18b1-4b47-b535-89b848c70886",{"configurationKey":],"unknownKey":["MeterValuesSampledData"]}]'}
Traceback (most recent call last):
File "/usr/local/lib/python3.13/site-packages/ocpp/messages.py", line 83, in unpack
msg = json.loads(msg)
File "/usr/local/lib/python3.13/json/init.py", line 346, in loads
return _default_decoder.decode(s)
~~~~~~~~~~~~~~~~~~~~~~~^^^
File "/usr/local/lib/python3.13/json/decoder.py", line 344, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/json/decoder.py", line 362, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 63 (char 62)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/lib/python3.13/site-packages/ocpp/charge_point.py", line 249, in route_message
msg = unpack(raw_msg)
File "/usr/local/lib/python3.13/site-packages/ocpp/messages.py", line 85, in unpack
raise FormatViolationError(
details={"cause": "Message is not valid JSON", "ocpp_message": msg}
)
ocpp.exceptions.FormatViolationError: FormatViolationError: Payload for Action is syntactically incorrect or structure for Action, {'cause': 'Message is not valid JSON', 'ocpp_message': '[3,"b7314751-18b1-4b47-b535-89b848c70886",{"configurationKey":],"unknownKey":["MeterValuesSampledData"]}]'}
2024-12-10 12:20:09.689 WARNING (MainThread) [custom_components.ocpp] Skipping websocket subprotocol validation
2024-12-10 12:20:11.065 INFO (MainThread) [ocpp] GRS-1700003D6FF: receive message [2,"1481789074","BootNotification",{"chargePointModel":"Grizzl-E Smart","chargePointVendor":"UnitedChargers","chargePointSerialNumber":"GRS-1700003d6ff","firmwareVersion":"GWM-07.027-03_GCW-10.22-05.7","meterType":""}]
2024-12-10 12:20:11.068 INFO (MainThread) [ocpp] GRS-1700003D6FF: send [3,"1481789074",{"currentTime":"2024-12-10T17:20:11Z","interval":3600,"status":"Accepted"}]
2024-12-10 12:20:11.692 INFO (MainThread) [ocpp] GRS-1700003D6FF: send [2,"2c9fb1d6-dc1a-4def-b2dc-fb571026432b","GetConfiguration",{"key":["SupportedFeatureProfiles"]}]
2024-12-10 12:20:11.907 INFO (MainThread) [ocpp] GRS-1700003D6FF: receive message [2,"1481789075","StatusNotification",{"connectorId":0,"errorCode":"NoError","status":"Available"}]

++++++++++

The ERROR and WARNING messages are to be expected. Is there a reason why the INFO messages also appear?

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

No branches or pull requests

1 participant