-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
MOES Thermostat program sensor - State max length is 255 characters #16460
Comments
Hello When i send an order to the thermostat i have this problem Error doing job: Exception in callback MQTT._mqtt_handle_message(<paho.mqtt.cl... 0x7f7b07ec00>) Thank's for the help |
Hello, Error doing job: Exception in callback MQTT._mqtt_handle_message(<paho.mqtt.cl...x7fe4e3565d90>) |
Hello
Mysterious... If some on has solution.... Thank's |
no bug fix for the moment.... |
Yes I have this error too |
I confirmed the issue, too. unable to apply, my old program is visible in the state |
I also have an similar issue since 1.30.0 |
At the moment the only solution is to downgrade Zigbee2mqtt (if you have a backup) |
I did downgrade to 1.29.2. |
For me i prefer wait an update. i m not on the same place than my HA, so it's very diffcult to donwngard without risk.... |
Not possible to modify the program on the zigbee2mqtt web interface/Expose tab. The Apply button is inactive. |
Hello The logs in the last update Error doing job: Exception in callback MQTT._mqtt_handle_message(<paho.mqtt.cl... 0x7f6e00c190>) |
Hi, I'm facing this problem too Here's the traceback from log viewer
|
|
Switching to ZHA works, so may also be a work-around for some. |
Can someone provide the debug log when the state of this device is published? See https://www.zigbee2mqtt.io/guide/usage/debug.html on how to enable debug logging. |
Hello |
I might remember wrong, but I think I tried this and did not get a single extra line of logging. |
Hi @Koenkk, I enabled the debug log, I think this is what you're looking for ? Zigbee2MQTT:info 2023-03-12 18:03:08: MQTT publish: topic 'zigbee2mqtt/Thermostat', payload '{"child_lock":"UNLOCK","current_heating_setpoint":20,"deadzone_temperature":null,"heat":"OFF","linkquality":255,"local_temperature":21.5,"local_temperature_calibration":-4,"max_temperature":45,"max_temperature_limit":null,"min_temperature_limit":1,"preset":"hold","preset_mode":"hold","program":{"saturday_p1_hour":6,"saturday_p1_minute":0,"saturday_p1_temperature":24,"saturday_p2_hour":12,"saturday_p2_minute":0,"saturday_p2_temperature":23,"saturday_p3_hour":14,"saturday_p3_minute":30,"saturday_p3_temperature":22,"saturday_p4_hour":17,"saturday_p4_minute":30,"saturday_p4_temperature":21,"sunday_p1_hour":6,"sunday_p1_minute":0,"sunday_p1_temperature":19,"sunday_p2_hour":12,"sunday_p2_minute":30,"sunday_p2_temperature":20,"sunday_p3_hour":14,"sunday_p3_minute":30,"sunday_p3_temperature":21,"sunday_p4_hour":18,"sunday_p4_minute":30,"sunday_p4_temperature":20,"weekdays_p1_hour":6,"weekdays_p1_minute":0,"weekdays_p1_temperature":20,"weekdays_p2_hour":11,"weekdays_p2_minute":30,"weekdays_p2_temperature":21,"weekdays_p3_hour":13,"weekdays_p3_minute":30,"weekdays_p3_temperature":22,"weekdays_p4_hour":17,"weekdays_p4_minute":30,"weekdays_p4_temperature":23},"running_state":"idle","sensor":"AL","system_mode":"heat"}' |
Hi @Koenkk, I removed one from the network and joined it with debug enabled, hope it helps revealing the issue.
|
The state is long because of the As a workaround you can filter the |
if 255 is really the maximum for the MQTT message content, then tis is way too short. Even without the |
It might be around May 25th 2021, This commit is when the valid_state() function in core.py was changed from using a length of 256 to MAX_LENGTH_STATE_STATE. |
Hi @Koenkk! Regarding this thermostat I would say, that's really great you introduced the option to program the thermostat from Z2M GUI. |
Hello |
I'm still using Zigbee2mqtt version 1.29.2-1, it's the latest version that doesn't have this problem. |
I don't think it's ONLY a limitation of Home Assistant, with the latest version of HA (2023.4.6) and an old version of Z2M (1.29.2-1) this problem doesn't exist. Z2M 1.29.2-1 is the latest version that doesn't have this problem. |
hello
Thank's for your help |
@samourai64, I'm not sure on the FR version unfortunately, in EN, it looks like:
That is it.
A lot better than big red error though :)
Word. The 255 Char limit unfortunately comes form HA max length for state. |
In the Z2M configuration.yaml, I have:
In HA, I also had to disable the 'Program' sensor in the MQTT Device page to prevent an annoying message in the HA System Log. |
` debounce: It's correct? |
@miklosbagi the Changes will be available in the dev branch in a few hours from now. (https://www.zigbee2mqtt.io/advanced/more/switch-to-dev-branch.html) |
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days |
@Koenkk hmm. It seems that on HA 2023.6.1 if the program value is
|
@gorbunovav pushed a fix, could you check if it works? Changes will be available in the dev branch in a few hours from now. (https://www.zigbee2mqtt.io/advanced/more/switch-to-dev-branch.html) |
I still get this exact same error in 1.32.1
Happens every 7 seconds. |
I tried to "reprograming" the device directly with it's buttons. I just tap through until the end the earlier saved program. After that I checked what I see in the z2m and it recovered! Now I see the whole program. -- update: it doesn't solved the problem `Logger: homeassistant.components.mqtt.models Exception raised when updating state of sensor.termosztat_program, topic: 'zigbee2mqtt/Termosztát' with payload: b'{"child_lock":"UNLOCK","current_heating_setpoint":21,"deadzone_temperature":0,"heat":"OFF","last_seen":"2023-07-16T11:41:08+02:00","linkquality":87,"local_temperature":29,"local_temperature_calibration":-2,"max_temperature_limit":25,"min_temperature_limit":5,"preset":"program","preset_mode":"program","program":{"saturday_p1_hour":6,"saturday_p1_minute":30,"saturday_p1_temperature":21.5,"saturday_p2_hour":8,"saturday_p2_minute":0,"saturday_p2_temperature":21.5,"saturday_p3_hour":17,"saturday_p3_minute":0,"saturday_p3_temperature":21.5,"saturday_p4_hour":22,"saturday_p4_minute":0,"saturday_p4_temperature":20,"sunday_p1_hour":6,"sunday_p1_minute":30,"sunday_p1_temperature":21.5,"sunday_p2_hour":8,"sunday_p2_minute":0,"sunday_p2_temperature":21.5,"sunday_p3_hour":17,"sunday_p3_minute":0,"sunday_p3_temperature":21.5,"sunday_p4_hour":22,"sunday_p4_minute":0,"sunday_p4_temperature":20,"weekdays_p1_hour":6,"weekdays_p1_minute":30,"weekdays_p1_temperature":21.5,"weekdays_p2_hour":8,"weekdays_p2_minute":0,"weekdays_p2_temperature":21.5,"weekdays_p3_hour":17,"weekdays_p3_minute":0,"weekdays_p3_temperature":21.5,"weekdays_p4_hour":22,"weekdays_p4_minute":0,"weekdays_p4_temperature":20},"running_state":"idle","sensor":"IN","system_mode":"heat"}' |
I'm facing exactly the same issue here after update to 1.32.1-1. Disabling "program" sensor fixes one thing, but then "max length" errors come. Log is identical to above. |
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days |
issue is still valid |
I also have same issue with MOES Thermostat [BHT-002/BHT-006] The only temporal workaround like posted here (not to overload logs): #19788 (comment) Log: 2024-09-28 15:24:22.646 WARNING (MainThread) [homeassistant.components.mqtt.sensor] Cannot update state for entity sensor.floorheatredbathroom_program after processing payload on topic zigbee2mqtt/FloorHeatRedBathroom. The requested state (941) exceeds the maximum allowed length (255). Fall back to unknown, failed state: {'saturday_p1_hour': 6, 'saturday_p1_minute': 0, 'saturday_p1_temperature': 24, 'saturday_p2_hour': 12, 'saturday_p2_minute': 0, 'saturday_p2_temperature': 23, 'saturday_p3_hour': 14, 'saturday_p3_minute': 30, 'saturday_p3_temperature': 22, 'saturday_p4_hour': 17, 'saturday_p4_minute': 30, 'saturday_p4_temperature': 21, 'sunday_p1_hour': 6, 'sunday_p1_minute': 0, 'sunday_p1_temperature': 19, 'sunday_p2_hour': 12, 'sunday_p2_minute': 30, 'sunday_p2_temperature': 20, 'sunday_p3_hour': 14, 'sunday_p3_minute': 30, 'sunday_p3_temperature': 21, 'sunday_p4_hour': 18, 'sunday_p4_minute': 30, 'sunday_p4_temperature': 20, 'weekdays_p1_hour': 6, 'weekdays_p1_minute': 0, 'weekdays_p1_temperature': 20, 'weekdays_p2_hour': 11, 'weekdays_p2_minute': 30, 'weekdays_p2_temperature': 21, 'weekdays_p3_hour': 13, 'weekdays_p3_minute': 30, 'weekdays_p3_temperature': 22, 'weekdays_p4_hour': 17, 'weekdays_p4_minute': 30, 'weekdays_p4_temperature': 23} |
@Spica2000 if you don' t need "program" you may exclude it from the mqtt message. Open device settings in Z2M, go to settings and add "program" to Filter attributes section as others already mentioned it. Should help. If you need that part, you have to probably wait. |
Thank you for your comment. I don't understand completely what this filter actually does. Seems something with program mode of the thermostat. |
@Spica2000 On actual device you have program memory to keep all your settings for the week. This is a lot of data to transfer in one message on the mqtt protocol. If you don't need to see or change those specific settings on the HA dashboard, you can filter whole "program" from being transferred in every message from your thermostat to Z2M and HA. If you filter it (which means you don't have access on Z2M to those values, and in most cases you don't need to) then you don't overflow your message with big payload and you don't get this warning. |
What happened?
Moes BHT series Thermostat (BHT-002-GCLZB)
Program sensor is unavailable because of the error message in HA logger. Please see below.
What did you expect to happen?
No errors like before in HA logger and available program sensor of the thermostat.
How to reproduce it (minimal and precise)
Updated to 1.30.0
Zigbee2MQTT version
1.30.0
Adapter firmware version
0x26680700
Adapter
ConBee2
Debug log
Logger: homeassistant
Source: core.py:1140
First occurred: 20:05:51 (66 occurrences)
Last logged: 20:17:51
Error doing job: Exception in callback MQTT._mqtt_handle_message(<paho.mqtt.cl...x7fb952085770>)
Error doing job: Exception in callback MQTT._mqtt_handle_message(<paho.mqtt.cl...x7fb9520cd2a0>)
Error doing job: Exception in callback MQTT._mqtt_handle_message(<paho.mqtt.cl...x7fb953bf1a10>)
Error doing job: Exception in callback MQTT._mqtt_handle_message(<paho.mqtt.cl...x7fb953c9e180>)
Error doing job: Exception in callback MQTT._mqtt_handle_message(<paho.mqtt.cl...x7fb953bf3140>)
Traceback (most recent call last):
File "/usr/local/lib/python3.10/asyncio/events.py", line 80, in _run
self._context.run(self._callback, *self._args)
File "/usr/src/homeassistant/homeassistant/components/mqtt/client.py", line 696, in _mqtt_handle_message
self._mqtt_data.state_write_requests.process_write_state_requests()
File "/usr/src/homeassistant/homeassistant/components/mqtt/models.py", line 267, in process_write_state_requests
entity.async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 556, in async_write_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 673, in _async_write_ha_state
self.hass.states.async_set(
File "/usr/src/homeassistant/homeassistant/core.py", line 1480, in async_set
state = State(
File "/usr/src/homeassistant/homeassistant/core.py", line 1140, in init
raise InvalidStateError(
homeassistant.exceptions.InvalidStateError: Invalid state encountered for entity ID: sensor.moes_termosztat_program. State max length is 255 characters.
The text was updated successfully, but these errors were encountered: