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

Exception in message_received when handling msg on 'panasonic_heat_pump/stats' #204

Closed
MorVes opened this issue May 12, 2024 · 5 comments
Closed

Comments

@MorVes
Copy link

MorVes commented May 12, 2024

Home-Assistant:
Core: 2024.5.3
Supervisor: 2024.05.1
Operating System: 12.3

Heishamon Firmware 3.2.3
heishamon-homeassistant version: 1.7.3

I get the following error in my log:

Logger: homeassistant.util.logging
Source: util/logging.py:98
First occurred: 07:02:04 (28 occurrences)
Last logged: 07:13:35

Exception in message_received when handling msg on 'panasonic_heat_pump/stats': '{"uptime":587504732,"voltage":3.39,"free memory":69,"free heap":27200,"wifi":100,"mqtt reconnects":14366,"total reads":117471,"good reads":117410,"bad crc reads":4,"bad header reads":2728,"too short reads":0,"too long reads":10,"timeout reads":47,"v0��panasonic_he' 
Traceback (most recent call last): 
File "/config/custom_components/aquarea/sensor.py", line 485, in message_received self._attr_native_value = self.entity_description.state(message.payload) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 
File "/config/custom_components/aquarea/definitions.py", line 1600, in <lambda> state=lambda json_doc: ms_to_secs(read_stats_json("uptime", json_doc)), ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 
File "/config/custom_components/aquarea/definitions.py", line 1005, in read_stats_json field_value = json.loads(json_doc).get(field_name, None) ^^^^^^^^^^^^^^^^^^^^ 
File "/usr/local/lib/python3.12/json/__init__.py", line 346, in loads return _default_decoder.decode(s) ^^^^^^^^^^^^^^^^^^^^^^^^^^ 
File "/usr/local/lib/python3.12/json/decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 
File "/usr/local/lib/python3.12/json/decoder.py", line 353, in raw_decode obj, end = self.scan_once(s, idx) ^^^^^^^^^^^^^^^^^^^^^^ json.decoder.JSONDecodeError: Invalid control character at: line 1 column 251 (char 250)

Exception in message_received when handling msg on 'panasonic_heat_pump/stats': '{"uptime":587504732,"voltage":3.39,"free memory":69,"free heap":27200,"wifi":100,"mqtt reconnects":14366,"total reads":117471,"good reads":117410,"bad crc reads":4,"bad header reads":2728,"too short reads":0,"too long reads":10,"timeout reads":47,"v0��panasonic_he' Traceback (most recent call last): File "/config/custom_components/aquarea/update.py", line 113, in message_received field_value = json.loads(message.payload).get("version", None) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/json/__init__.py", line 346, in loads return _default_decoder.decode(s) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/json/decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/json/decoder.py", line 353, in raw_decode obj, end = self.scan_once(s, idx) ^^^^^^^^^^^^^^^^^^^^^^ json.decoder.JSONDecodeError: Invalid control character at: line 1 column 251 (char 250)
Exception in message_received when handling msg on 'panasonic_heat_pump/stats': '{"uptime":588195646,"voltage":3.39,"free memory":64,"free heap":25304,"wifi":100,"mqtt reconnects":14382,"total reads":117609,"good reads":117548,"bad crc reads":4,"bad header reads":2728,"too short reads":0,"too long reads":10,"timeout rea0��panasonic_heat_pump/L' Traceback (most recent call last): File "/config/custom_components/aquarea/sensor.py", line 485, in message_received self._attr_native_value = self.entity_description.state(message.payload) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/aquarea/definitions.py", line 1005, in read_stats_json field_value = json.loads(json_doc).get(field_name, None) ^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/json/__init__.py", line 346, in loads return _default_decoder.decode(s) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/json/decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/json/decoder.py", line 353, in raw_decode obj, end = self.scan_once(s, idx) ^^^^^^^^^^^^^^^^^^^^^^ json.decoder.JSONDecodeError: Invalid control character at: line 1 column 242 (char 241)
Exception in message_received when handling msg on 'panasonic_heat_pump/stats': '{"uptime":588195646,"voltage":3.39,"free memory":64,"free heap":25304,"wifi":100,"mqtt reconnects":14382,"total reads":117609,"good reads":117548,"bad crc reads":4,"bad header reads":2728,"too short reads":0,"too long reads":10,"timeout rea0��panasonic_heat_pump/L' Traceback (most recent call last): File "/config/custom_components/aquarea/sensor.py", line 485, in message_received self._attr_native_value = self.entity_description.state(message.payload) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/aquarea/definitions.py", line 1600, in <lambda> state=lambda json_doc: ms_to_secs(read_stats_json("uptime", json_doc)), ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/aquarea/definitions.py", line 1005, in read_stats_json field_value = json.loads(json_doc).get(field_name, None) ^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/json/__init__.py", line 346, in loads return _default_decoder.decode(s) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/json/decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/json/decoder.py", line 353, in raw_decode obj, end = self.scan_once(s, idx) ^^^^^^^^^^^^^^^^^^^^^^ json.decoder.JSONDecodeError: Invalid control character at: line 1 column 242 (char 241)
Exception in message_received when handling msg on 'panasonic_heat_pump/stats': '{"uptime":588195646,"voltage":3.39,"free memory":64,"free heap":25304,"wifi":100,"mqtt reconnects":14382,"total reads":117609,"good reads":117548,"bad crc reads":4,"bad header reads":2728,"too short reads":0,"too long reads":10,"timeout rea0��panasonic_heat_pump/L' Traceback (most recent call last): File "/config/custom_components/aquarea/update.py", line 113, in message_received field_value = json.loads(message.payload).get("version", None) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/json/__init__.py", line 346, in loads return _default_decoder.decode(s) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/json/decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/json/decoder.py", line 353, in raw_decode obj, end = self.scan_once(s, idx) ^^^^^^^^^^^^^^^^^^^^^^ json.decoder.JSONDecodeError: Invalid control character at: line 1 column 242 (char 241)
@geduxas
Copy link
Contributor

geduxas commented May 12, 2024

Is it possible that in your heishamon config mqtt name has some unusual characters in front?

@kamaradclimber
Copy link
Owner

With a software like MQTTExplorer, could you look at the messages sent in panasonic_heat_pump/stats and post it here?

@MorVes
Copy link
Author

MorVes commented May 12, 2024

Thank you for your suggestions.
I've restarted Heishamon and got this from MQTT-Explorer:

{"uptime":19695689,"voltage":3.39,"free memory":75,"free heap":29432,"wifi":100,"mqtt reconnects":114,"total reads":3941,"good reads":3941,"bad crc reads":0,"bad header reads":0,"too short reads":0,"too long reads":0,"timeout reads":0,"version":"3.2.3"}

@kamaradclimber
Copy link
Owner

I've opened Egyras/HeishaMon#491 for the same issue (it happens to me as well).
I think the issue is upstream but will leave this issue open for the time being.

@kamaradclimber
Copy link
Owner

I'll close this one in favor of the issue on the main repository. I was able to see those lines directly on the mqtt server so I don't think it is linked to the HA integration.

@kamaradclimber kamaradclimber closed this as not planned Won't fix, can't repro, duplicate, stale Jul 18, 2024
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

3 participants