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

Fix temperature measurement #3

Closed
wants to merge 1 commit into from
Closed

Fix temperature measurement #3

wants to merge 1 commit into from

Conversation

dannyverp
Copy link

@dannyverp dannyverp commented Nov 25, 2021

The temperature was no longer read from the onboard temperature sensor. I reinstated it inside the successful OpenTherm call.

closes #4

Copy link

@nanojavi nanojavi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same issue and corrected in the same way.

@peterselie018
Copy link

There is stil a problem with the temperature sensor. It shows 15 deg, even with the fix added too the arduino sketch.
The last working sketch is from feb2021.

@aamorin
Copy link

aamorin commented Feb 18, 2022

I think the temp reading should be done outside that IF sentence.. that way t_last also gets updated properly, but also the right value gets published and logged.

Since we are at it, I believe the same getTemp() function should be used during setup , but also, lastTempSet needs to be initialised to millis() instead (and before calling getTemp), otherwise it will start with a weird value, making this result instantly bigger than extTempTimeout_ms .. I've been debugging this and with the changes I mention here, it worked flawlessly for me.

So, during setup, instead of this:

  t, t_last = sensors.getTempCByIndex(0);
  ts = millis();
  lastTempSet = -extTempTimeout_ms;

I'm using this:

  ts, lastTempSet = millis();
  t, t_last = getTemp();

And for updateData(), I've added the t = getTemp(); right after the sensors.requestTemperatures() (although I'm still thinking if it shouldn't be at the beginning)..

@dannyverp dannyverp closed this by deleting the head repository Apr 9, 2023
@JazekerXX
Copy link

t = getTemp(); was the missing part for me too, but i needed to place it outside the if statement since i was testing it without a opentherm boiler/heatpump.

so instead placing it at line 112, place it at line 125

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.

Temperature measurement is broken
5 participants