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

improve DS1820 logging #1394

Closed
wants to merge 0 commits into from

Conversation

MaxineMuster
Copy link
Contributor

No description provided.

@openshwprojects
Copy link
Owner

Hey, is it tested and ready to merge?

@MaxineMuster MaxineMuster changed the title Try to fix DS1820 family discovery on "clones" improve DS1820 logging Nov 5, 2024
@MaxineMuster
Copy link
Contributor Author

The fix was not needed (turned out to be another issue), but we might keep the updated logging.

I can't do some tests now, will report back in some days.

@divadiow
Copy link
Contributor

divadiow commented Nov 5, 2024

I can test, but any test in particular? Just connect up and post some cmd logs?

@MaxineMuster
Copy link
Contributor Author

Thanks, it's indeed just checking the logs, if all hex values are now in the same format 0xXX (always two values after 0x)

@NonPIayerCharacter
Copy link
Contributor

Does negative temperature works alright in the latest builds? I have a battery sensor with waterproof DS18B20 cable soldered onto it (so probably a clone), but in HA, for the last several days, every temperature reading reported is -0.01.

@divadiow
Copy link
Contributor

divadiow commented Nov 6, 2024

Thanks, it's indeed just checking the logs, if all hex values are now in the same format 0xXX (always two values after 0x)

BK-N.txt
I can do other platforms later today if desired

startdriver ds1820 5 - powersave 0

@MaxineMuster
Copy link
Contributor Author

MaxineMuster commented Nov 6, 2024

@NonPIayerCharacter: I'll check again but negative temperatures should work.
Can you check the readings on main page or in the logs to see whether it is related to the temperature reading, the assignment to the channel or the publishing of the values?

@divadiow thanks for testing, this should be enough, logs aren't depending on the platform

@divadiow
Copy link
Contributor

divadiow commented Nov 6, 2024

shoved mine in freezer
image

Info:SENSOR:DS1820[7] - Starting conversion
Debug:SENSOR:DS1820[7] - family=28, raw=-1912, cfg=60 (12 bit resolution)
Info:SENSOR:DS1820[7] - Temp=-13.-7
Info:SENSOR:DS1820[7] - Starting conversion
Debug:SENSOR:DS1820[7] - family=28, raw=-1928, cfg=60 (12 bit resolution)
Info:SENSOR:DS1820[7] - Temp=-14.-94
Info:SENSOR:DS1820[7] - Starting conversion
Debug:SENSOR:DS1820[7] - family=28, raw=-1936, cfg=60 (12 bit resolution)
Info:SENSOR:DS1820[7] - Temp=-14.-88
Info:SENSOR:DS1820[7] - Starting conversion
Debug:SENSOR:DS1820[7] - family=28, raw=-1944, cfg=60 (12 bit resolution)
Info:SENSOR:DS1820[7] - Temp=-14.-82
Info:SENSOR:DS1820[7] - Starting conversion
Debug:SENSOR:DS1820[7] - family=28, raw=-1960, cfg=60 (12 bit resolution)
Info:SENSOR:DS1820[7] - Temp=-14.-69
Info:SENSOR:DS1820[7] - Starting conversion
Debug:SENSOR:DS1820[7] - family=28, raw=-1968, cfg=60 (12 bit resolution)
Info:SENSOR:DS1820[7] - Temp=-14.-63
Info:SENSOR:DS1820[7] - Starting conversion
Debug:SENSOR:DS1820[7] - family=28, raw=-1976, cfg=60 (12 bit resolution)
Info:SENSOR:DS1820[7] - Temp=-14.-57

@MaxineMuster
Copy link
Contributor Author

@divadiow could you please check again, if log of negative temperatures is better now?
Should only be a log issue...

@divadiow
Copy link
Contributor

divadiow commented Nov 6, 2024

1394_merge_c5cfa0c6b801

Info:SENSOR:DS1820[7] - Starting conversion
Error:SENSOR:DS1820[7] - Read Reset failed
Debug:SENSOR:DS1820[7] - family=28, raw=-2088, cfg=60 (12 bit resolution)
Info:SENSOR:DS1820[7] - Temp=-15.-31
Info:SENSOR:DS1820[7] - Starting conversion
Debug:SENSOR:DS1820[7] - family=28, raw=-2088, cfg=60 (12 bit resolution)
Info:SENSOR:DS1820[7] - Temp=-15.-31
Info:SENSOR:DS1820[7] - Starting conversion
Debug:SENSOR:DS1820[7] - family=28, raw=-2088, cfg=60 (12 bit resolution)
Info:SENSOR:DS1820[7] - Temp=-15.-31
Info:SENSOR:DS1820[7] - Starting conversion
Debug:SENSOR:DS1820[7] - family=28, raw=-2088, cfg=60 (12 bit resolution)
Info:SENSOR:DS1820[7] - Temp=-15.-31
Info:SENSOR:DS1820[7] - Starting conversion
Debug:SENSOR:DS1820[7] - family=28, raw=-2096, cfg=60 (12 bit resolution)
Info:SENSOR:DS1820[7] - Temp=-15.-37
Info:SENSOR:DS1820[7] - Starting conversion
Debug:SENSOR:DS1820[7] - family=28, raw=-2096, cfg=60 (12 bit resolution)
Info:SENSOR:DS1820[7] - Temp=-15.-37

image

@MaxineMuster
Copy link
Contributor Author

:-( will try again later with a little more time...

@MaxineMuster
Copy link
Contributor Author

looks o.k. now for me:

grafik

But will need to do it again, to resolve the conflicts after ESP-Update including DS1820 code ..

@MaxineMuster
Copy link
Contributor Author

New PR #1416

@MaxineMuster
Copy link
Contributor Author

MaxineMuster commented Nov 7, 2024

@NonPIayerCharacter

for the last several days, every temperature reading reported is -0.01.

Have you been able to fetch some more information?

I think it might also be an issue if reading the sensors temperature failed, because in this case the last read value is kept and will be sent repeadtedly, even for days.

We maybe should "invalidate" the temperature after some time, which has to be defined:
After one failed reading I would assume it's o.k. to keep the previous temperature
After one day or even one hour this is probably not the expectation

Maybe 5 minutes? or even one minute?

Can (how) MQTT handle "invalid" or non present values?
What happens with other sensors if a reading fails? DHT ??

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.

4 participants