Skip to content

Fix ping-ponging of reported temperature when off - #66

Open
jmgao wants to merge 1 commit into
muart-group:v2from
jmgao:remote_temp
Open

Fix ping-ponging of reported temperature when off#66
jmgao wants to merge 1 commit into
muart-group:v2from
jmgao:remote_temp

Conversation

@jmgao

@jmgao jmgao commented Aug 5, 2026

Copy link
Copy Markdown

It looks like some models of heat pump ignore remote temperature setting when off, reporting their internal temperature instead. This leads to our reported temperature to ping-pong between the internal temperature and the external temperature source.

One of my air handlers is in my attic, so without this patch, I get these ridiculous looking graphs in home assistant:
image

It looks like some models of heat pump ignore remote temperature setting
when off, reporting their internal temperature instead. This leads to
our reported temperature to ping-pong between the internal temperature
and the external temperature source.
@samphonic

Copy link
Copy Markdown
Contributor

Hello there,

Thanks for the graph and the PR. I'd like to investigate three things before we look at merging this:

  1. (An easy one) I just want to clarify that when you say "Off" you mean like set to the mode OFF not just idle while set to Cool. (From the code changes I assume this is correct, but just triple checking).
  2. (Also easy) What are you using for your remote temperature source? And do you have an MHK2 (or similar) thermostat connected?
  3. Could you pull some logs from one of the ping-pong-y periods with verbose logging on?

The reason I ask for the logs is that the ping-ponging suggests that it is actually reporting the correct remote temperature sometimes, and sometimes isn't. And especially because the top bits look poky and the bottom bits look flat, I suspect what's happening is that the remote temperature isn't being reported often enough, so it's timing out to internal, but then flipping back to the correct temperature as soon as it receives another report.

It's weird that this happens only when Off, but it's possible the conditions change based on mode (like maybe if you do have an MHK2, it doesn't send temperatures as often when the system is off).

Rather than change the logic to insert a virtual temperature rather than the real-reported temperature, the correct solution might just be the usual timeout mitigation strategies.

@jmgao

jmgao commented Aug 5, 2026

Copy link
Copy Markdown
Author

(An easy one) I just want to clarify that when you say "Off" you mean like set to the mode OFF not just idle while set to Cool. (From the code changes I assume this is correct, but just triple checking).

Correct

(Also easy) What are you using for your remote temperature source? And do you have an MHK2 (or similar) thermostat connected?

A Home Assistant sensor (the IKEA matter air quality sensor), and yes.

Could you pull some logs from one of the ping-pong-y periods with verbose logging on?

Attached here: mitp-heat-pump-upper-logs.txt. Strings to grep for are "Master Bedroom Temperature Sensor" and 26.5.

The reason I ask for the logs is that the ping-ponging suggests that it is actually reporting the correct remote temperature sometimes, and sometimes isn't. And especially because the top bits look poky and the bottom bits look flat, I suspect what's happening is that the remote temperature isn't being reported often enough, so it's timing out to internal, but then flipping back to the correct temperature as soon as it receives another report.

I think the soonest I've seen this happen in the logs is 6 seconds after receiving an external temperature update (around 19:48:03.659)

@samphonic

Copy link
Copy Markdown
Contributor

Thank you for the answers and logs.

In the attached log, there are no instances of the Master Bedroom Temperature Sensor reporting a value, and consequently no instances of the ESP32 sending a RemoteTempSetRequest to the heatpump. If the heat pump doesn't receive a RemoteTempSetRequest after a certain interval (somewhere between like 55 and 600 seconds, it varies by equipment), it will fall back to the internal sensor until it receives a new remote temperature.

I'm like 90% sure this is what's happening, so it's probably worth at least trying to set up an echo in the configuration. I'd start with maybe echo_interval: 50s and timeout: 16min as a starting point. Ideally the timeout would be just a little longer than the actual interval the IKEA sensor sends updates at, though if it's battery powered there's a chance these might be far too infrequent (if you have a way to check in Home Assistant to see what the intervals are, that could help). echo_interval should be set to just a little less than the timeout on your Mitsubishi equipment. We can pull longer logs (containing at least two IKEA sensor reports) to confirm what the actual timeout is, but the lowest I've seen is ~58s (probably actually 60s but with some gray area).

The echo should at least patch the issue and confirm that's the problem. Long-term I recommend using a push service instead as it has a bit more flexibility and control over the sensor values (though you have to do your own timeout check in Home Assistant in case the IKEA sensor battery dies).

@jmgao

jmgao commented Aug 6, 2026

Copy link
Copy Markdown
Author

Oops, I guess I didn't download the new set of logs before I uploaded. I'll try to repro again when the sun sets in a few hours and I don't need air conditioning :-)

I don't see this behavior while in cool mode, so I guess the heat pump's update timeout might be different depending on mode? (Should the example in the documentation be changed to 50s as a better default to use, or are there downsides to echoing more frequently?)

@samphonic

Copy link
Copy Markdown
Contributor

Should the example in the documentation be changed to 50s as a better default to use, or are there downsides to echoing more frequently?

The example is based on the 10min-timeout equipment (and the built in 7min timeout in MITP). The only downside of echoing too frequently is that there is the potential to fill up the send buffers and packets will get dropped (though that should be mitigated significantly in v2). In general I try not to push things too far one way or the other because of the big variety in equipment.

@jmgao

jmgao commented Aug 7, 2026

Copy link
Copy Markdown
Author

Welp, I appear to have blown my heat pump's fuse somehow...
image

Unfortunately, I don't have logging for this, but I did notice this while bypassing the blown fuse with a breaker I had lying around to make sure there wasn't a dead short or something downstream.
image

This controller has an MHK2, but no external temperature source configured with a 50s echo. I think this might be legacy_ts_room_temp_to_deg_c called on a bunch of zeroes? Not sure if this is related to my heat pump trying to blow itself up or if it's a red herring on startup, though.

@samphonic

Copy link
Copy Markdown
Contributor

Hi there,
Just checking back in on this to see if you've had a chance to try this with the echo config.

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.

2 participants