Controller intermittently not working since update to 0.13.0
Hi,
I have been trying to pin down enough information to give a sensible issue to raise and willing to add some time/debugs in if I can assist.
My issue is that I am finding that after a number of hours of not using the integration, that it no longer fully controls my heater. It is manifesting in some unusual ways. E.g. I cannot change the heater from Off to Heat via the climate control, but interestingly I can turn it to Fan mode. In Fan mode, I can change the fan speed and turn the unit Off and back to Fan mode without issues. However, I still cannot turn it to Heat mode. I can reload the integration and the behaviour persists.
After watching and debugging a little, I have come to realise that if I turn it to heat mode and try again (sometimes a few times), it will eventually allow me to turn it to Heat mode again. Once it shows Heat mode this will allow controlling until another multi-hour gap of use. Here are some logs to try to show the issue - noting that the logs actually seem to show it working, but in real life, the heater did not turn on the first time, but did the second time the integration sent the command.
Firstly, a block of logs to show how this was logging prior to and including the first attempt to change from Off to Heat Mode - in these logs you can see it sending the 2 bytes occasionally, then when it sent 40 bytes - but the mode did not change. Then in the second part (3 mins later), still sending the 2 bytes, and then the 40 byte message to turn the heater on. This time it does work. Noting, that I did nothing more than try the same action in home assistant (changing from Off to Heat Mode on the standard climate control):
2025-09-15 17:33:05.651 DEBUG (RinnaiPollConnection) [pyrinnaitouch.pollconnection] Read 893 bytes from socket
2025-09-15 17:33:05.651 DEBUG (RinnaiPollConnection) [pyrinnaitouch.pollconnection] Receive buffer now has 893 bytes of data to process
2025-09-15 17:33:05.651 DEBUG (RinnaiPollConnection) [pyrinnaitouch.pollconnection] Received sequence number 0
2025-09-15 17:33:05.652 DEBUG (Thread-9 (poll_loop)) [pyrinnaitouch.system_status] We are in HEAT mode
2025-09-15 17:33:05.652 DEBUG (Thread-9 (poll_loop)) [pyrinnaitouch.unit_status] Unit is OFF
2025-09-15 17:33:05.652 DEBUG (Thread-9 (poll_loop)) [custom_components.rinnaitouch.climate] Ext. temp sensor entity name: sensor.dining_ac_measured_value_of_room_temperature_2
2025-09-15 17:33:05.652 DEBUG (Thread-9 (poll_loop)) [custom_components.rinnaitouch.climate] Ext. temp sensor reports: 21
2025-09-15 17:33:05.652 DEBUG (MainThread) [custom_components.rinnaitouch.climate] Internal temperature sensor reports: 999
2025-09-15 17:33:06.649 DEBUG (RinnaiPollConnection) [pyrinnaitouch.pollconnection] Read 893 bytes from socket
2025-09-15 17:33:06.649 DEBUG (RinnaiPollConnection) [pyrinnaitouch.pollconnection] Receive buffer now has 893 bytes of data to process
2025-09-15 17:33:06.649 DEBUG (RinnaiPollConnection) [pyrinnaitouch.pollconnection] Sending idle command
2025-09-15 17:33:06.649 DEBUG (RinnaiPollConnection) [pyrinnaitouch.pollconnection] Sent 2 of 2 bytes
2025-09-15 17:33:06.649 DEBUG (RinnaiPollConnection) [pyrinnaitouch.pollconnection] Received sequence number 0
2025-09-15 17:33:06.650 DEBUG (Thread-9 (poll_loop)) [pyrinnaitouch.system_status] We are in HEAT mode
2025-09-15 17:33:06.650 DEBUG (Thread-9 (poll_loop)) [pyrinnaitouch.unit_status] Unit is OFF
2025-09-15 17:33:06.650 DEBUG (Thread-9 (poll_loop)) [custom_components.rinnaitouch.climate] Ext. temp sensor entity name: sensor.dining_ac_measured_value_of_room_temperature_2
2025-09-15 17:33:06.650 DEBUG (Thread-9 (poll_loop)) [custom_components.rinnaitouch.climate] Ext. temp sensor reports: 21
2025-09-15 17:33:06.650 DEBUG (MainThread) [custom_components.rinnaitouch.climate] Internal temperature sensor reports: 999
2025-09-15 17:33:07.651 DEBUG (RinnaiPollConnection) [pyrinnaitouch.pollconnection] Read 893 bytes from socket
2025-09-15 17:33:07.651 DEBUG (RinnaiPollConnection) [pyrinnaitouch.pollconnection] Receive buffer now has 893 bytes of data to process
2025-09-15 17:33:07.651 DEBUG (RinnaiPollConnection) [pyrinnaitouch.pollconnection] Received sequence number 0
2025-09-15 17:33:07.652 DEBUG (Thread-9 (poll_loop)) [pyrinnaitouch.system_status] We are in HEAT mode
2025-09-15 17:33:07.652 DEBUG (Thread-9 (poll_loop)) [pyrinnaitouch.unit_status] Unit is OFF
2025-09-15 17:33:07.652 DEBUG (Thread-9 (poll_loop)) [custom_components.rinnaitouch.climate] Ext. temp sensor entity name: sensor.dining_ac_measured_value_of_room_temperature_2
2025-09-15 17:33:07.652 DEBUG (Thread-9 (poll_loop)) [custom_components.rinnaitouch.climate] Ext. temp sensor reports: 21
2025-09-15 17:33:07.653 DEBUG (MainThread) [custom_components.rinnaitouch.climate] Internal temperature sensor reports: 999
2025-09-15 17:33:08.651 DEBUG (RinnaiPollConnection) [pyrinnaitouch.pollconnection] Read 893 bytes from socket
2025-09-15 17:33:08.651 DEBUG (RinnaiPollConnection) [pyrinnaitouch.pollconnection] Receive buffer now has 893 bytes of data to process
2025-09-15 17:33:08.651 DEBUG (RinnaiPollConnection) [pyrinnaitouch.pollconnection] Received sequence number 0
2025-09-15 17:33:08.652 DEBUG (Thread-9 (poll_loop)) [pyrinnaitouch.system_status] We are in HEAT mode
2025-09-15 17:33:08.652 DEBUG (Thread-9 (poll_loop)) [pyrinnaitouch.unit_status] Unit is OFF
2025-09-15 17:33:08.652 DEBUG (Thread-9 (poll_loop)) [custom_components.rinnaitouch.climate] Ext. temp sensor entity name: sensor.dining_ac_measured_value_of_room_temperature_2
2025-09-15 17:33:08.652 DEBUG (Thread-9 (poll_loop)) [custom_components.rinnaitouch.climate] Ext. temp sensor reports: 21
2025-09-15 17:33:08.652 DEBUG (MainThread) [custom_components.rinnaitouch.climate] Internal temperature sensor reports: 999
2025-09-15 17:33:09.661 DEBUG (RinnaiPollConnection) [pyrinnaitouch.pollconnection] Read 893 bytes from socket
2025-09-15 17:33:09.661 DEBUG (RinnaiPollConnection) [pyrinnaitouch.pollconnection] Receive buffer now has 893 bytes of data to process
2025-09-15 17:33:09.661 DEBUG (RinnaiPollConnection) [pyrinnaitouch.pollconnection] Received sequence number 0
2025-09-15 17:33:09.662 DEBUG (Thread-9 (poll_loop)) [pyrinnaitouch.system_status] We are in HEAT mode
2025-09-15 17:33:09.662 DEBUG (Thread-9 (poll_loop)) [pyrinnaitouch.unit_status] Unit is OFF
2025-09-15 17:33:09.662 DEBUG (Thread-9 (poll_loop)) [custom_components.rinnaitouch.climate] Ext. temp sensor entity name: sensor.dining_ac_measured_value_of_room_temperature_2
2025-09-15 17:33:09.662 DEBUG (Thread-9 (poll_loop)) [custom_components.rinnaitouch.climate] Ext. temp sensor reports: 21
2025-09-15 17:33:09.662 DEBUG (MainThread) [custom_components.rinnaitouch.climate] Internal temperature sensor reports: 999
2025-09-15 17:33:10.665 DEBUG (RinnaiPollConnection) [pyrinnaitouch.pollconnection] Read 893 bytes from socket
2025-09-15 17:33:10.666 DEBUG (RinnaiPollConnection) [pyrinnaitouch.pollconnection] Receive buffer now has 893 bytes of data to process
2025-09-15 17:33:10.666 DEBUG (RinnaiPollConnection) [pyrinnaitouch.pollconnection] Received sequence number 0
2025-09-15 17:33:10.666 DEBUG (Thread-9 (poll_loop)) [pyrinnaitouch.system_status] We are in HEAT mode
2025-09-15 17:33:10.666 DEBUG (Thread-9 (poll_loop)) [pyrinnaitouch.unit_status] Unit is OFF
2025-09-15 17:33:12.664 DEBUG (RinnaiPollConnection) [pyrinnaitouch.pollconnection] Read 893 bytes from socket
2025-09-15 17:33:12.664 DEBUG (RinnaiPollConnection) [pyrinnaitouch.pollconnection] Receive buffer now has 893 bytes of data to process
2025-09-15 17:33:12.664 DEBUG (RinnaiPollConnection) [pyrinnaitouch.pollconnection] Received sequence number 0
2025-09-15 17:33:12.664 DEBUG (Thread-9 (poll_loop)) [pyrinnaitouch.system_status] We are in HEAT mode
2025-09-15 17:33:12.664 DEBUG (Thread-9 (poll_loop)) [pyrinnaitouch.unit_status] Unit is OFF
2025-09-15 17:33:12.664 DEBUG (Thread-9 (poll_loop)) [custom_components.rinnaitouch.climate] Ext. temp sensor entity name: sensor.dining_ac_measured_value_of_room_temperature_2
2025-09-15 17:33:12.665 DEBUG (Thread-9 (poll_loop)) [custom_components.rinnaitouch.climate] Ext. temp sensor reports: 21
2025-09-15 17:33:12.665 DEBUG (MainThread) [custom_components.rinnaitouch.climate] Internal temperature sensor reports: 999
2025-09-15 17:33:13.566 DEBUG (RinnaiPollConnection) [pyrinnaitouch.pollconnection] Sending command 2
2025-09-15 17:33:13.567 DEBUG (RinnaiPollConnection) [pyrinnaitouch.pollconnection] Sent 40 of 40 bytes
2025-09-15 17:33:13.567 DEBUG (RinnaiPollConnection) [pyrinnaitouch.pollconnection] Sending command 3
2025-09-15 17:33:13.567 DEBUG (RinnaiPollConnection) [pyrinnaitouch.pollconnection] Sent 40 of 40 bytes
2025-09-15 17:33:13.662 DEBUG (RinnaiPollConnection) [pyrinnaitouch.pollconnection] Read 893 bytes from socket
2025-09-15 17:33:13.662 DEBUG (RinnaiPollConnection) [pyrinnaitouch.pollconnection] Receive buffer now has 893 bytes of data to process
2025-09-15 17:33:13.662 DEBUG (RinnaiPollConnection) [pyrinnaitouch.pollconnection] Received sequence number 0
2025-09-15 17:33:13.662 DEBUG (Thread-9 (poll_loop)) [pyrinnaitouch.system_status] We are in HEAT mode
2025-09-15 17:33:13.662 DEBUG (Thread-9 (poll_loop)) [pyrinnaitouch.unit_status] Unit is OFF
2025-09-15 17:33:13.662 DEBUG (Thread-9 (poll_loop)) [custom_components.rinnaitouch.climate] Ext. temp sensor entity name: sensor.dining_ac_measured_value_of_room_temperature_2
2025-09-15 17:33:13.662 DEBUG (Thread-9 (poll_loop)) [custom_components.rinnaitouch.climate] Ext. temp sensor reports: 21
2025-09-15 17:33:13.662 DEBUG (MainThread) [custom_components.rinnaitouch.climate] Internal temperature sensor reports: 999
2025-09-15 17:33:14.747 DEBUG (RinnaiPollConnection) [pyrinnaitouch.pollconnection] Read 893 bytes from socket
2025-09-15 17:33:14.748 DEBUG (RinnaiPollConnection) [pyrinnaitouch.pollconnection] Receive buffer now has 893 bytes of data to process
2025-09-15 17:33:14.748 DEBUG (RinnaiPollConnection) [pyrinnaitouch.pollconnection] Received sequence number 3
2025-09-15 17:33:14.748 DEBUG (Thread-9 (poll_loop)) [pyrinnaitouch.system_status] We are in HEAT mode
2025-09-15 17:33:14.748 DEBUG (Thread-9 (poll_loop)) [pyrinnaitouch.unit_status] Unit is OFF
2025-09-15 17:33:14.748 DEBUG (Thread-9 (poll_loop)) [custom_components.rinnaitouch.climate] Ext. temp sensor entity name: sensor.dining_ac_measured_value_of_room_temperature_2
2025-09-15 17:33:14.748 DEBUG (Thread-9 (poll_loop)) [custom_components.rinnaitouch.climate] Ext. temp sensor reports: 21
2025-09-15 17:33:14.748 DEBUG (MainThread) [custom_components.rinnaitouch.climate] Internal temperature sensor reports: 999
2025-09-15 17:33:15.671 DEBUG (RinnaiPollConnection) [pyrinnaitouch.pollconnection] Read 893 bytes from socket
2025-09-15 17:33:15.671 DEBUG (RinnaiPollConnection) [pyrinnaitouch.pollconnection] Receive buffer now has 893 bytes of data to process
2025-09-15 17:33:15.671 DEBUG (RinnaiPollConnection) [pyrinnaitouch.pollconnection] Received sequence number 3
2025-09-15 17:33:15.672 DEBUG (Thread-9 (poll_loop)) [pyrinnaitouch.system_status] We are in HEAT mode
2025-09-15 17:33:15.672 DEBUG (Thread-9 (poll_loop)) [pyrinnaitouch.unit_status] Unit is OFF
.
.
.
2025-09-15 17:36:32.101 DEBUG (MainThread) [custom_components.rinnaitouch.climate] Internal temperature sensor reports: 999
2025-09-15 17:36:33.101 DEBUG (RinnaiPollConnection) [pyrinnaitouch.pollconnection] Read 893 bytes from socket
2025-09-15 17:36:33.101 DEBUG (RinnaiPollConnection) [pyrinnaitouch.pollconnection] Receive buffer now has 893 bytes of data to process
2025-09-15 17:36:33.101 DEBUG (RinnaiPollConnection) [pyrinnaitouch.pollconnection] Received sequence number 0
2025-09-15 17:36:33.101 DEBUG (Thread-9 (poll_loop)) [pyrinnaitouch.system_status] We are in HEAT mode
2025-09-15 17:36:33.101 DEBUG (Thread-9 (poll_loop)) [pyrinnaitouch.unit_status] Unit is OFF
2025-09-15 17:36:33.101 DEBUG (Thread-9 (poll_loop)) [custom_components.rinnaitouch.climate] Ext. temp sensor entity name: sensor.dining_ac_measured_value_of_room_temperature_2
2025-09-15 17:36:33.101 DEBUG (Thread-9 (poll_loop)) [custom_components.rinnaitouch.climate] Ext. temp sensor reports: 21
2025-09-15 17:36:33.101 DEBUG (MainThread) [custom_components.rinnaitouch.climate] Internal temperature sensor reports: 999
2025-09-15 17:36:34.003 DEBUG (RinnaiPollConnection) [pyrinnaitouch.pollconnection] Sending idle command
2025-09-15 17:36:34.003 DEBUG (RinnaiPollConnection) [pyrinnaitouch.pollconnection] Sent 2 of 2 bytes
2025-09-15 17:36:34.114 DEBUG (RinnaiPollConnection) [pyrinnaitouch.pollconnection] Read 893 bytes from socket
2025-09-15 17:36:34.114 DEBUG (RinnaiPollConnection) [pyrinnaitouch.pollconnection] Receive buffer now has 893 bytes of data to process
2025-09-15 17:36:34.114 DEBUG (RinnaiPollConnection) [pyrinnaitouch.pollconnection] Received sequence number 0
2025-09-15 17:36:34.115 DEBUG (Thread-9 (poll_loop)) [pyrinnaitouch.system_status] We are in HEAT mode
2025-09-15 17:36:34.115 DEBUG (Thread-9 (poll_loop)) [pyrinnaitouch.unit_status] Unit is OFF
2025-09-15 17:36:34.115 DEBUG (Thread-9 (poll_loop)) [custom_components.rinnaitouch.climate] Ext. temp sensor entity name: sensor.dining_ac_measured_value_of_room_temperature_2
2025-09-15 17:36:34.115 DEBUG (Thread-9 (poll_loop)) [custom_components.rinnaitouch.climate] Ext. temp sensor reports: 21
2025-09-15 17:36:34.115 DEBUG (MainThread) [custom_components.rinnaitouch.climate] Internal temperature sensor reports: 999
2025-09-15 17:36:35.111 DEBUG (RinnaiPollConnection) [pyrinnaitouch.pollconnection] Read 893 bytes from socket
2025-09-15 17:36:35.111 DEBUG (RinnaiPollConnection) [pyrinnaitouch.pollconnection] Receive buffer now has 893 bytes of data to process
2025-09-15 17:36:35.111 DEBUG (RinnaiPollConnection) [pyrinnaitouch.pollconnection] Received sequence number 0
2025-09-15 17:36:35.111 DEBUG (Thread-9 (poll_loop)) [pyrinnaitouch.system_status] We are in HEAT mode
2025-09-15 17:36:35.111 DEBUG (Thread-9 (poll_loop)) [pyrinnaitouch.unit_status] Unit is OFF
2025-09-15 17:36:35.111 DEBUG (Thread-9 (poll_loop)) [custom_components.rinnaitouch.climate] Ext. temp sensor entity name: sensor.dining_ac_measured_value_of_room_temperature_2
2025-09-15 17:36:35.111 DEBUG (Thread-9 (poll_loop)) [custom_components.rinnaitouch.climate] Ext. temp sensor reports: 21
2025-09-15 17:36:35.111 DEBUG (MainThread) [custom_components.rinnaitouch.climate] Internal temperature sensor reports: 999
2025-09-15 17:36:36.111 DEBUG (RinnaiPollConnection) [pyrinnaitouch.pollconnection] Read 893 bytes from socket
2025-09-15 17:36:36.111 DEBUG (RinnaiPollConnection) [pyrinnaitouch.pollconnection] Receive buffer now has 893 bytes of data to process
2025-09-15 17:36:36.111 DEBUG (RinnaiPollConnection) [pyrinnaitouch.pollconnection] Received sequence number 0
2025-09-15 17:36:36.111 DEBUG (Thread-9 (poll_loop)) [pyrinnaitouch.system_status] We are in HEAT mode
2025-09-15 17:36:36.111 DEBUG (Thread-9 (poll_loop)) [pyrinnaitouch.unit_status] Unit is OFF
2025-09-15 17:36:36.111 DEBUG (Thread-9 (poll_loop)) [custom_components.rinnaitouch.climate] Ext. temp sensor entity name: sensor.dining_ac_measured_value_of_room_temperature_2
2025-09-15 17:36:36.111 DEBUG (Thread-9 (poll_loop)) [custom_components.rinnaitouch.climate] Ext. temp sensor reports: 21
2025-09-15 17:36:36.112 DEBUG (MainThread) [custom_components.rinnaitouch.climate] Internal temperature sensor reports: 999
2025-09-15 17:36:37.111 DEBUG (RinnaiPollConnection) [pyrinnaitouch.pollconnection] Read 893 bytes from socket
2025-09-15 17:36:37.111 DEBUG (RinnaiPollConnection) [pyrinnaitouch.pollconnection] Receive buffer now has 893 bytes of data to process
2025-09-15 17:36:37.111 DEBUG (RinnaiPollConnection) [pyrinnaitouch.pollconnection] Received sequence number 0
2025-09-15 17:36:37.111 DEBUG (Thread-9 (poll_loop)) [pyrinnaitouch.system_status] We are in HEAT mode
2025-09-15 17:36:37.111 DEBUG (Thread-9 (poll_loop)) [pyrinnaitouch.unit_status] Unit is OFF
2025-09-15 17:36:37.111 DEBUG (Thread-9 (poll_loop)) [custom_components.rinnaitouch.climate] Ext. temp sensor entity name: sensor.dining_ac_measured_value_of_room_temperature_2
2025-09-15 17:36:37.111 DEBUG (Thread-9 (poll_loop)) [custom_components.rinnaitouch.climate] Ext. temp sensor reports: 21
2025-09-15 17:36:37.111 DEBUG (MainThread) [custom_components.rinnaitouch.climate] Internal temperature sensor reports: 999
2025-09-15 17:36:37.813 DEBUG (RinnaiPollConnection) [pyrinnaitouch.pollconnection] Sending command 4
2025-09-15 17:36:37.813 DEBUG (RinnaiPollConnection) [pyrinnaitouch.pollconnection] Sent 40 of 40 bytes
2025-09-15 17:36:37.813 DEBUG (RinnaiPollConnection) [pyrinnaitouch.pollconnection] Sending command 5
2025-09-15 17:36:37.813 DEBUG (RinnaiPollConnection) [pyrinnaitouch.pollconnection] Sent 40 of 40 bytes
2025-09-15 17:36:38.108 DEBUG (RinnaiPollConnection) [pyrinnaitouch.pollconnection] Read 893 bytes from socket
2025-09-15 17:36:38.108 DEBUG (RinnaiPollConnection) [pyrinnaitouch.pollconnection] Receive buffer now has 893 bytes of data to process
2025-09-15 17:36:38.108 DEBUG (RinnaiPollConnection) [pyrinnaitouch.pollconnection] Received sequence number 0
2025-09-15 17:36:38.108 DEBUG (Thread-9 (poll_loop)) [pyrinnaitouch.system_status] We are in HEAT mode
2025-09-15 17:36:38.108 DEBUG (Thread-9 (poll_loop)) [pyrinnaitouch.unit_status] Unit is OFF
2025-09-15 17:36:38.108 DEBUG (Thread-9 (poll_loop)) [custom_components.rinnaitouch.climate] Ext. temp sensor entity name: sensor.dining_ac_measured_value_of_room_temperature_2
2025-09-15 17:36:38.108 DEBUG (Thread-9 (poll_loop)) [custom_components.rinnaitouch.climate] Ext. temp sensor reports: 21
2025-09-15 17:36:38.109 DEBUG (MainThread) [custom_components.rinnaitouch.climate] Internal temperature sensor reports: 999
2025-09-15 17:36:39.197 DEBUG (RinnaiPollConnection) [pyrinnaitouch.pollconnection] Read 1064 bytes from socket
2025-09-15 17:36:39.197 DEBUG (RinnaiPollConnection) [pyrinnaitouch.pollconnection] Receive buffer now has 1064 bytes of data to process
2025-09-15 17:36:39.197 DEBUG (RinnaiPollConnection) [pyrinnaitouch.pollconnection] Received sequence number 5
2025-09-15 17:36:39.198 DEBUG (Thread-9 (poll_loop)) [pyrinnaitouch.system_status] We are in HEAT mode
2025-09-15 17:36:39.198 DEBUG (Thread-9 (poll_loop)) [pyrinnaitouch.unit_status] Unit is ON
2025-09-15 17:36:39.198 DEBUG (Thread-9 (poll_loop)) [pyrinnaitouch.unit_status] Fan Speed is: 12
2025-09-15 17:36:39.198 DEBUG (Thread-9 (poll_loop)) [pyrinnaitouch.unit_status] Unit OpMode is: M
2025-09-15 17:36:39.198 DEBUG (Thread-9 (poll_loop)) [pyrinnaitouch.unit_status] Unit set temp is: 18
2025-09-15 17:36:39.198 DEBUG (Thread-9 (poll_loop)) [custom_components.rinnaitouch.climate] Ext. temp sensor entity name: sensor.dining_ac_measured_value_of_room_temperature_2
2025-09-15 17:36:39.198 DEBUG (Thread-9 (poll_loop)) [custom_components.rinnaitouch.climate] Ext. temp sensor reports: 21
2025-09-15 17:36:39.198 DEBUG (MainThread) [custom_components.rinnaitouch.climate] Internal temperature sensor reports: 999
2025-09-15 17:36:40.121 DEBUG (RinnaiPollConnection) [pyrinnaitouch.pollconnection] Read 1064 bytes from socket
2025-09-15 17:36:40.121 DEBUG (RinnaiPollConnection) [pyrinnaitouch.pollconnection] Receive buffer now has 1064 bytes of data to process
2025-09-15 17:36:40.121 DEBUG (RinnaiPollConnection) [pyrinnaitouch.pollconnection] Received sequence number 5
2025-09-15 17:36:40.122 DEBUG (Thread-9 (poll_loop)) [pyrinnaitouch.system_status] We are in HEAT mode
2025-09-15 17:36:40.122 DEBUG (Thread-9 (poll_loop)) [pyrinnaitouch.unit_status] Unit is ON
2025-09-15 17:36:40.122 DEBUG (Thread-9 (poll_loop)) [pyrinnaitouch.unit_status] Fan Speed is: 12
2025-09-15 17:36:40.122 DEBUG (Thread-9 (poll_loop)) [pyrinnaitouch.unit_status] Unit OpMode is: M
2025-09-15 17:36:40.122 DEBUG (Thread-9 (poll_loop)) [pyrinnaitouch.unit_status] Unit set temp is: 18
2025-09-15 17:36:40.122 DEBUG (Thread-9 (poll_loop)) [custom_components.rinnaitouch.climate] Ext. temp sensor entity name: sensor.dining_ac_measured_value_of_room_temperature_2
2025-09-15 17:36:40.122 DEBUG (Thread-9 (poll_loop)) [custom_components.rinnaitouch.climate] Ext. temp sensor reports: 21
In my setup I can't simply use the climate controls to go straight from off to heat. I need to use the 'on off switch' switch entity first, and then use the climate control to set it to heat (sometimes I have to wait a few seconds). Are you doing anything similar?
further to the previous comment... I had to swap out my climate widget for the standard one... due to the old one being not supported anymore. I should be able to click the heat button... and have that move from off to heat. However I need to press the switch entity to turn on the widget... and then I can press heat. I have a user who finds change difficult... so thinking these actions can be combined ?
Hi @curlydingo & @bucky2780 - I have been using a mushroom climate card and that shows the intermittent issue. I then sometimes click it for the more standard climate entity card and that also has issues. I tried some 10 times right now with no luck in turning on my heater. Thanks to your comment, I went to the integration page itself, and turned the heater on there and it worked first time.
Also, noting for the record, my official Rinnai Touch app is no longer connecting to the controller, even though this integration just turned it on. I have also noticed, that the moment I get up and just turn then heater on by hand, instantly the integration shows the heater changing state.
So it really does not feel like the integration is not working, just the turning on feature (via the climate cards?) is not working as expected. I'll put debugging back on and check next time I see the issue.
Also had to go back a release. Default Dashboard status was OK, Turn Off was OK, but could not turn on heating.
I agree it would be much neater if it could transition from off to heat (or whatever mode) from the climate controls. I'm not actually sure why this isn't the case actually.
I can have a look when I get some time, but please understand that could be a little while away. If anyone would like to track it down and make a PR for review that would almost definitely speed up the process.
The debug logs do not show much difference between v13 and v12.15. When clicking Heat to go direct from Off to Heat they both send two commands, On then Heat. Testing remotely this morning I encountered successes and failures from both releases ....
This, and your earlier comment about using the on/off switch, suggest something in the timing. Currently the On and Heat are both queued in the same millisecond so a simple test could be to insert a delay between On and Heat.
Also the attached wireshark trace on v13 was a success, but seemed a little odd to me with IRC, request/reponse swapping, and command sequence number handling. Is it possible to suspend the heartbeat while the rinnai touch is handling commands?
I was not testing v12.15 properly. I had downgraded rinnaitouch but had not downgraded pyrinnaitouch.
I am not sure how you are downgrading/upgrading, but if you use HACS I thought it did both - the custom_components directory contains the version you download, and inside that is a requirements.txt. It lists the version of pyrinnaitouch that you need. Do you have access to the filesystem? Then try this (I am still on the version 13):
grep Version /usr/local/lib/python3.13/site-packages/pyrinnaitouch-*.dist-info/METADATA
Metadata-Version: 2.4
Version: 0.13.1
Never having done any dev for ha I am stumbling my way through but became suspicious when the logs were identical, so after downgrading rinnaittouch with hacs I ssh'd into the homeassistant docker and 'pip show pyrinnaitouch' confirmed it was still release 13. Makes sense, somewhere there is possibly a rule that says use the latest release available that satisfies the manifest, so will now always use 13. Rolling back pyrinnaitouch via pip the logs are back to how they used to look.
A few changes that are working for me so far with limited testing.
The idle message did not include the sequence number, which resulted in the number from the airbase repeatedly reset to zero while the sequence number from the integration was incremented independently. Tested by setting self._command_timeout_seconds = 3600, effectively disabling idle message during testing. Fixed by adding the sequence header to the idle message. Reliance on error handling at the other end can be unpredictable, I would prefer to change the idle message to a valid string, maybe one of the read-only parameters. Yet to be tested.
The sequence number was not following the api. Restarting HA caused the pyrinnaitouch sequence number to reset to 1, but the airbase remained at previous level. Sequence numbering corrected to increment the number that is received from the airbase.
When going from off to heat on the default gui, pyrinnai touch sends two messages without delay. Wireshark shows both messages delivered to the airbase. The airbase only responds to the second message. The heater sometimes successfully turns on, sometimes not. A delay inserted between sending messages allows airbase time to process each message, logs show separate responses to each message, and the heater successfully turns on.
Why did the previous release work? It also sent two messages without delay. It also had an error, with the same sequence number used for both messages. Maybe the airbase treated this as a composite task???
The changes in pollconnection.py
# Now process the command queue. We don't wait for anything to arrive here,
# the waiting only happens in the select socket call.
while True:
try:
# ensure sequence number is larger than the received number
self._command_sequence = max(self._command_sequence, self._last_received_sequence_num + 1)
self._command_sequence %= 255
command = self._sendqueue.get_nowait()
# A command is ready to be sent. Format it, place it into the
# writebuffer and attempt to send it.
sequence_header = "N" + str(self._command_sequence).zfill(6)
self._writebuffer.extend(sequence_header.encode())
self._writebuffer.extend(command.encode())
_LOGGER.debug("Sending command %d", self._command_sequence)
self._attempt_send()
# Increment the command sequence and wrap around 255
self._command_sequence += 1
self._command_sequence %= 255
# add a delay between commands
time.sleep(1)
except Empty:
# Nothing in the queue for now. Consider sending an empty command
# if it's been long enough, and then break out of this loop.
if (
time.time() - self._last_command_time
> self._command_timeout_seconds
):
_LOGGER.debug("Sending idle command")
# add sequence number to the idle message
sequence_header = "N" + str(self._command_sequence).zfill(6)
self._writebuffer.extend(sequence_header.encode())
self._writebuffer.extend(b"NA")
self._attempt_send()
# Update the time here in case the socket doesn't become
# write available quickly.
self._last_command_time = time.time()
break
Never having done any dev for ha I am stumbling my way through but became suspicious when the logs were identical, so after downgrading rinnaittouch with hacs I ssh'd into the homeassistant docker and 'pip show pyrinnaitouch' confirmed it was still release 13. Makes sense, somewhere there is possibly a rule that says use the latest release available that satisfies the manifest, so will now always use 13. Rolling back pyrinnaitouch via pip the logs are back to how they used to look.
Hmm, this makes sense I guess; the previous version would have required pyrinnaitouch >= XX, and once you have 13 installed that would satisfy the dependency. Not sure there's a good way to fix that though.
I think the sequence numbers were always this way so I doubt they alone caused the difference, but by all means happy to accept changes that improve the behaviour.
Keeping the sequence number handling I tried a different way. Instead of a timer between message I fudged a wait state until the used sequence number was returned (or timeout). This worked every time I tried it.
Then I 'removed' the wait (by setting self._waiting = False) so two commands were queued/sent immediately. Effectively v13 with sequence number handling. This failed.
There is no difference in the commands between the success and fail cases, only the timing.
The changes in pollconnection.py
self._waiting = False
#self._idle_command = b'{"SYST": {"OSS": {"ST": "N" } } }'
self._idle_command = b'NA'
# Now process the command queue. We don't wait for anything to arrive here,
# the waiting only happens in the select socket call.
while True:
try:
#***
if (self._waiting and ((time.time() - self._last_command_time) < 5)):
break
command = self._sendqueue.get_nowait()
# A command is ready to be sent. Format it, place it into the
# writebuffer and attempt to send it.
#***
self._command_sequence = max(self._command_sequence + 1, self._last_received_sequence_num + 1)
self._command_sequence %=255
sequence_header = "N" + str(self._command_sequence).zfill(6)
self._writebuffer.extend(sequence_header.encode())
self._writebuffer.extend(command.encode())
_LOGGER.debug("Sending command %d", self._command_sequence)
self._attempt_send()
#***
# Increment the command sequence and wrap around 255
#self._command_sequence += 1
#self._command_sequence %= 255
_LOGGER.debug("Wait start")
self._waiting = True
except Empty:
# Nothing in the queue for now. Consider sending an empty command
# if it's been long enough, and then break out of this loop.
if (
time.time() - self._last_command_time
> self._command_timeout_seconds
):
#***
self._command_sequence = max(self._command_sequence + 1, self._last_received_sequence_num + 1)
self._command_sequence %=255
sequence_header = "N" + str(self._command_sequence).zfill(6)
self._writebuffer.extend(sequence_header.encode())
#self._writebuffer.extend(b"NA")
self._writebuffer.extend(self._idle_command)
#_LOGGER.debug("Sending idle command")
_LOGGER.debug("Sending idle command %d", self._command_sequence)
self._attempt_send()
# Update the time here in case the socket doesn't become
# write available quickly.
self._last_command_time = time.time()
#***
_LOGGER.debug("Wait start")
self._waiting = True
break
elif self._readbuffer.startswith(START_MARKER):
if match := re.match(r"N(\d{6})(\[.*?\])", self._readbuffer.decode()):
# First match is sequence number
# Second match is the JSON status to be parsed. Note that the match
# requires the closing bracket to be present, to ensure we have a
# complete status.
self._last_received_sequence_num = int(match.group(1)[1:])
#***
if (self._last_received_sequence_num >= self._command_sequence):
_LOGGER.debug("Wait end")
self._waiting = False
I've released a small update that ties the current version of this component to the correct version of pyrinnaitouch. This means once changes like @sgraystar 's above are ready we can release them under a beta and make it easier to roll back to the current version (i.e. without having to use pip).
Looking for ways to break the Touch interface: All sequence numbers = 0, seemed to work. Sequence numbers counting backwards, seemed to work. Preceding every command with valid sequence number by an idle message with sequence number 0, without delay. To my surprise the command was executed BUT the returned sequence number was 0, which is enough to indicate the Touch is not totally separating to two commands received in rapid succession. Confirmed by following every command with valid sequence number by an idle message with sequence number 0, without delay. This failed and messed up the Touch, now receiving out of scope sequence numbers, see below.
This is enough testing me to be satisfied that a wait state is necessary. Maintaining valid sequence numbers may or may not matter, but it is easy so may as well.
[36m2025-10-08 09:51:19.198 DEBUG (Thread-3 (poll_loop)) [custom_components.rinnaitouch.climate] Ext. temp sensor reports: 16.4[0m [36m2025-10-08 09:51:19.199 DEBUG (MainThread) [custom_components.rinnaitouch.climate] Internal temperature sensor reports: 999[0m [36m2025-10-08 09:51:20.196 DEBUG (RinnaiPollConnection) [pyrinnaitouch.pollconnection] Read 893 bytes from socket[0m [36m2025-10-08 09:51:20.196 DEBUG (RinnaiPollConnection) [pyrinnaitouch.pollconnection] Receive buffer now has 893 bytes of data to process[0m [36m2025-10-08 09:51:20.196 DEBUG (RinnaiPollConnection) [pyrinnaitouch.pollconnection] Wait end[0m [36m2025-10-08 09:51:20.197 DEBUG (RinnaiPollConnection) [pyrinnaitouch.pollconnection] Received sequence number 117[0m [36m2025-10-08 09:51:20.197 DEBUG (Thread-3 (poll_loop)) [pyrinnaitouch.system_status] We are in HEAT mode[0m [36m2025-10-08 09:51:20.197 DEBUG (Thread-3 (poll_loop)) [pyrinnaitouch.unit_status] Unit is OFF[0m [36m2025-10-08 09:51:20.198 DEBUG (Thread-3 (poll_loop)) [custom_components.rinnaitouch.climate] Ext. temp sensor entity name: sensor.rinnai_touch_common_zone_temperature_sensor[0m [36m2025-10-08 09:51:20.198 DEBUG (Thread-3 (poll_loop)) [custom_components.rinnaitouch.climate] Ext. temp sensor reports: 16.4[0m [36m2025-10-08 09:51:20.204 DEBUG (MainThread) [custom_components.rinnaitouch.climate] Internal temperature sensor reports: 999[0m [36m2025-10-08 09:51:20.297 DEBUG (RinnaiPollConnection) [pyrinnaitouch.pollconnection] Sending command 118[0m [36m2025-10-08 09:51:20.298 DEBUG (RinnaiPollConnection) [pyrinnaitouch.pollconnection] Sent 40 of 40 bytes[0m [36m2025-10-08 09:51:20.298 DEBUG (RinnaiPollConnection) [pyrinnaitouch.pollconnection] Sending idle command 0[0m [36m2025-10-08 09:51:20.298 DEBUG (RinnaiPollConnection) [pyrinnaitouch.pollconnection] Sent 4 of 4 bytes[0m [36m2025-10-08 09:51:20.299 DEBUG (RinnaiPollConnection) [pyrinnaitouch.pollconnection] Wait start[0m [36m2025-10-08 09:51:21.201 DEBUG (RinnaiPollConnection) [pyrinnaitouch.pollconnection] Read 893 bytes from socket[0m [36m2025-10-08 09:51:21.201 DEBUG (RinnaiPollConnection) [pyrinnaitouch.pollconnection] Receive buffer now has 893 bytes of data to process[0m [36m2025-10-08 09:51:21.201 DEBUG (RinnaiPollConnection) [pyrinnaitouch.pollconnection] Received sequence number 117[0m [36m2025-10-08 09:51:21.202 DEBUG (Thread-3 (poll_loop)) [pyrinnaitouch.system_status] We are in HEAT mode[0m [36m2025-10-08 09:51:21.202 DEBUG (Thread-3 (poll_loop)) [pyrinnaitouch.unit_status] Unit is OFF[0m [36m2025-10-08 09:51:21.202 DEBUG (Thread-3 (poll_loop)) [custom_components.rinnaitouch.climate] Ext. temp sensor entity name: sensor.rinnai_touch_common_zone_temperature_sensor[0m [36m2025-10-08 09:51:21.202 DEBUG (Thread-3 (poll_loop)) [custom_components.rinnaitouch.climate] Ext. temp sensor reports: 16.4[0m [36m2025-10-08 09:51:21.202 DEBUG (MainThread) [custom_components.rinnaitouch.climate] Internal temperature sensor reports: 999[0m [36m2025-10-08 09:51:22.209 DEBUG (RinnaiPollConnection) [pyrinnaitouch.pollconnection] Read 893 bytes from socket[0m [36m2025-10-08 09:51:22.209 DEBUG (RinnaiPollConnection) [pyrinnaitouch.pollconnection] Receive buffer now has 893 bytes of data to process[0m [36m2025-10-08 09:51:22.209 DEBUG (RinnaiPollConnection) [pyrinnaitouch.pollconnection] Wait end[0m [36m2025-10-08 09:51:22.209 DEBUG (RinnaiPollConnection) [pyrinnaitouch.pollconnection] Received sequence number 17117[0m [36m2025-10-08 09:51:22.209 DEBUG (Thread-3 (poll_loop)) [pyrinnaitouch.system_status] We are in HEAT mode[0m [36m2025-10-08 09:51:22.209 DEBUG (Thread-3 (poll_loop)) [pyrinnaitouch.unit_status] Unit is OFF[0m
Just checking the previous code ( pyrinnaitouch/pyrinnaitouch/receiver.py at 40255d03bdb6dfcc5eb99978311524a6c50c526f · funtastix/pyrinnaitouch https://share.google/ZLxerR5P6XLBfhLu9) I can confirm there was always a small delay between commands sent. In short, there was a command queue that messages got pushed into, but that didn't mean they got sent straight away. There was a "worker thread" that would work through the queue message by message. Between those sends, there would be at least one read of the socket as well as a deliberate time sleep(0.05) delay.
That's how those compound commands used to work quite reliably.