On 08/10/2020 12:26, Jan Kandziora wrote:
Am 08.10.20 um 00:31 schrieb Mick Sulley:
On my test system I have 20 DS18B20 temperature sensors (all powered) to
test out various things.  I am setting /simultaneous/temperature waiting
2 seconds then reading latesttemp from all of them.

I have just noticed that several are giving 85 reads. If I look with
owhttpd this is what I see -

owhttpd screen

Also owread /uncached/DHW_Mid_Btm/latesttemp returns 85.  This is after
many cycles of simultaneous/voltage and latesttemp reads.

Reading /uncached/<id>/latesttemp reads the contents of the temperature
register from the chip.

        It never triggers a temperature conversion.

But owwrite /simultaneous/temperature 1 should trigger a conversion? and reading latesttemp should then be correct.  Here is another.  Latesttemp returns 85 even after owwrite /simultaneous/temperature 1, but read temperature12 and it works again.  I don't understand why!

pi@pi4b:~ $ owread /DHW_Top/latesttemp
          85pi@pi4b:~ $ owread /DHW_Top/latesttemp
          85
pi@pi4b:~ $ owwrite /simultaneous/temperature 1
pi@pi4b:~ $ owread /DHW_Top/latesttemp
          85pi@pi4b:~ $ owread /DHW_Top/latesttemp
          85pi@pi4b:~ $
pi@pi4b:~ $ owread /DHW_Top/temperature12
     13.5625pi@pi4b:~ $ owread /DHW_Top/latesttemp
     13.5625pi@pi4b:~ $
pi@pi4b:~ $

I have a few more in this state at the moment, I am sure I could fix them all with a single temperature12 read to each and they would then be fine, but I would really like to understand what the problem is


If you read 85°C from latesttemp, it means the latest conversion either
85°C (unlikely) or the chip has been power-cycled since the latest
conversion (likely). As 85°C is the power-on value of that register.


It seems to me that it is a useful safeguard to run a single
temperature12 read on each sensor during the initialisation of the
system.  I cannot see any downside to this but just thought I would ask
for your thoughts.

That doesn't make any sense as you will read back the value from that
initial conversion again and again if your simultaneous trigger isn't
working. You mask the error that way, which is likely not what you want.

If a sensor reports a spurious 85°C, treat that as a power-cycle on that
sensor – check your hardware!

Kind regards

        Jan


_______________________________________________
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


_______________________________________________
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers

Reply via email to