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

Simplify remote temperature calculation #239

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

chwdt
Copy link

@chwdt chwdt commented Feb 26, 2025

This PR simplifies and corrects calculation of temperature values in sendRemoteTemperature():

The original values calculated are:

packet[7] = 3 + ((round(temperature * 2) / 2) - 10) * 2
packet[8] = round(temperature * 2) / 2 * 2 + 128

which can be simplified to:

packet[7] = round(temperature * 2) - 17
packet[8] = round(temperature * 2) + 128

The heat pump ignores the value in packet[7] when packet[8] is set. Leaving packet[8] unset shows an error of 0.5°C between reported room temperature and sent remote temperature. Therefore the correct value should be:

packet[7] = round(temperature * 2) - 16

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