Skip to content

Conversation

@lrademacher
Copy link

This change makes it possible to pair and control WallMountedThermostat (and probably also for Heating Thermostat Plus, but not tested).
So this is a fix candidate for #4

There is still a problem when parsing new State change messages from the WallMountedThermostat in pymaxcul:

2025-05-28 16:50:37.952 DEBUG (Thread-5) [maxcul._io] Received new moritz message: Z0F7904701561B60000000059012A00D80D
2025-05-28 16:50:38.170 DEBUG (Thread-4) [maxcul._communication] Received message <WallThermostatStateMessage length:f counter:79 flag:4 group_id:0 sender_id:1561b6 receiver_id:0 raw_payload:59012A00D8 mode:manual dstsetting:0 langateway:1 is_locked:1 rferror:0 battery_low:0 desired_temperature:21.0 display_actual_temperature:1 temperature:21.6 until_str:> (13)
2025-05-28 16:50:38.172 ERROR (Thread-4) [maxcul._communication] Exception <isinstance expected 2 arguments, got 4> was raised while parsing message 'Z0F7904701561B60000000059012A00D80D'. Please consider reporting this as a bug.

I am guessing this is related to _communication.py:305:

        elif isinstance(msg, WallThermostatStateMessage, SetTemperatureMessage, WallThermostatControlMessage):
            self._send_ack(msg)

I am guessing, the three types should be changed to a touple like so:

        elif isinstance(msg, (WallThermostatStateMessage, SetTemperatureMessage, WallThermostatControlMessage)):
            self._send_ack(msg)

I am a little bit lost how to change pymaxcul library content in my homeassistant python environment, so I was not able to test this (yet)

@lrademacher
Copy link
Author

lrademacher commented May 29, 2025

Update: I was able to test the bugfix inside pymaxcul. See PR powerpaul17/pymaxcul#1

Unfortunately this still does not work correctly. See the debug logs below on changing setpoint on the WallMountedThermostat from 16.5 to 19 (value change not visualised in homeassistant).
Do you have any hint, whats going wrong here?

2025-05-29 11:16:49.567 DEBUG (Thread-5) [maxcul._io] Received new moritz message: Z0B2905401561B6123456006610
2025-05-29 11:16:49.568 DEBUG (Thread-5) [maxcul._io] Received new moritz message: Z0B2900401561B6160F34006610
2025-05-29 11:16:49.574 DEBUG (Thread-4) [maxcul._communication] Received message <SetTemperatureMessage length:b counter:29 flag:5 group_id:0 sender_id:1561b6 receiver_id:123456 raw_payload:66 desired_temperature:19.0 mode:manual> (16)
2025-05-29 11:16:49.574 DEBUG (Thread-4) [maxcul._communication] Sending message <AckMessage counter:29 sender_id:123456 receiver_id:1561b6 group_id:0 flag:0>
2025-05-29 11:16:49.622 DEBUG (Thread-5) [maxcul._io] Received new moritz message: Z0E290202160F341561B60001190026F0
2025-05-29 11:16:49.670 DEBUG (Thread-5) [maxcul._io] Received new moritz message: Z0B2900401561B6196260006610
2025-05-29 11:16:49.883 DEBUG (Thread-4) [maxcul._communication] Received message <SetTemperatureMessage length:b counter:29 flag:0 group_id:0 sender_id:1561b6 receiver_id:160f34 raw_payload:66 desired_temperature:19.0 mode:manual> (16)
2025-05-29 11:16:50.172 DEBUG (Thread-5) [maxcul._io] Writing command Zs0A2900021234561561B600
2025-05-29 11:16:50.184 DEBUG (Thread-4) [maxcul._communication] Received message <AckMessage length:e counter:29 flag:2 group_id:0 sender_id:160f34 receiver_id:1561b6 raw_payload:01190026 state:ok mode:manual dstsetting:0 langateway:1 is_locked:0 rferror:0 battery_low:0 desired_temperature:19.0 valve_position:0> (240)
2025-05-29 11:16:50.485 DEBUG (Thread-4) [maxcul._communication] Received message <SetTemperatureMessage length:b counter:29 flag:0 group_id:0 sender_id:1561b6 receiver_id:196260 raw_payload:66 desired_temperature:19.0 mode:manual> (16)
2025-05-29 11:16:51.220 WARNING (Thread-5) [maxcul._io] Received error message from CUL stick: 'ZERR30D'
2025-05-29 11:16:54.450 DEBUG (Thread-5) [maxcul._io] Received new moritz message: Z0B2A05401561B6123456006610
2025-05-29 11:16:54.561 DEBUG (Thread-5) [maxcul._io] Received new moritz message: Z0B2A00401561B6196260006611
2025-05-29 11:16:54.640 DEBUG (Thread-4) [maxcul._communication] Received message <SetTemperatureMessage length:b counter:2a flag:5 group_id:0 sender_id:1561b6 receiver_id:123456 raw_payload:66 desired_temperature:19.0 mode:manual> (16)
2025-05-29 11:16:54.641 DEBUG (Thread-4) [maxcul._communication] Sending message <AckMessage counter:2a sender_id:123456 receiver_id:1561b6 group_id:0 flag:0>
2025-05-29 11:16:54.942 DEBUG (Thread-4) [maxcul._communication] Received message <SetTemperatureMessage length:b counter:2a flag:0 group_id:0 sender_id:1561b6 receiver_id:196260 raw_payload:66 desired_temperature:19.0 mode:manual> (17)
2025-05-29 11:16:55.062 DEBUG (Thread-5) [maxcul._io] Writing command Zs0A2A00021234561561B600
2025-05-29 11:16:56.111 WARNING (Thread-5) [maxcul._io] Received error message from CUL stick: 'ZERR30D'

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

Successfully merging this pull request may close these issues.

1 participant