Re: [Owfs-developers] Reading latesttemp

2020-10-08 Thread Mick Sulley
Just looked at it again and all sensors are now reading correctly, so I 
am wondering if there was a bad connection somewhere.  As they are all 
working I will try to see if I can recreate the problem, but not sure I 
will be able to.  I'll get back to you if I discover anything further.


Thanks

Mick

On 08/10/2020 19:47, Mick Sulley wrote:
This is a test setup, all sensors are in a breadboard on the bench, 
power is from a Meanwell unit set to 5.1 volts, which is what I 
measure at the sensors.  So I am pretty confident it is not a wiring 
or power supply problem.


Is there any way to determine if the simultaneous command is getting 
to all of the chips?


I am pretty confident that if I power cycle it all the problem will go 
away and I won't be able to recreate it, so I am trying to investigate 
as much as I can while the situation exists.


Thanks

Mick

On 08/10/2020 17:27, Jan Kandziora wrote:

Am 08.10.20 um 15:07 schrieb Mick Sulley:
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!


Most likely it's a problem with power. Do you power each chip
separately, or do they all pull, from the same +5V line?



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


You could try to find out if the simultaneous command is not going
through to all chips (chips never read 85°C on latesttemp) or if you
still get those spurious resets.

But it's only a debugging tool. In a production setup, it would only
ever mask the underlying problem and return a wrong ages-old temperature
instead.


Kind regards

Jan


___
Owfs-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/owfs-developers



___
Owfs-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/owfs-developers



___
Owfs-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] Reading latesttemp

2020-10-08 Thread Mick Sulley
This is a test setup, all sensors are in a breadboard on the bench, 
power is from a Meanwell unit set to 5.1 volts, which is what I measure 
at the sensors.  So I am pretty confident it is not a wiring or power 
supply problem.


Is there any way to determine if the simultaneous command is getting to 
all of the chips?


I am pretty confident that if I power cycle it all the problem will go 
away and I won't be able to recreate it, so I am trying to investigate 
as much as I can while the situation exists.


Thanks

Mick

On 08/10/2020 17:27, Jan Kandziora wrote:

Am 08.10.20 um 15:07 schrieb Mick Sulley:

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!


Most likely it's a problem with power. Do you power each chip
separately, or do they all pull, from the same +5V line?



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


You could try to find out if the simultaneous command is not going
through to all chips (chips never read 85°C on latesttemp) or if you
still get those spurious resets.

But it's only a debugging tool. In a production setup, it would only
ever mask the underlying problem and return a wrong ages-old temperature
instead.


Kind regards

Jan


___
Owfs-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/owfs-developers



___
Owfs-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] Reading latesttemp

2020-10-08 Thread Jan Kandziora
Am 08.10.20 um 15:07 schrieb Mick Sulley:
>
> 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!
>
Most likely it's a problem with power. Do you power each chip
separately, or do they all pull, from the same +5V line?


>
> 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
>
You could try to find out if the simultaneous command is not going
through to all chips (chips never read 85°C on latesttemp) or if you
still get those spurious resets.

But it's only a debugging tool. In a production setup, it would only
ever mask the underlying problem and return a wrong ages-old temperature
instead.


Kind regards

Jan


___
Owfs-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] Reading latesttemp

2020-10-08 Thread Mick Sulley


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//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
[email protected]
https://lists.sourceforge.net/lists/listinfo/owfs-developers



___
Owfs-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] Reading latesttemp

2020-10-08 Thread Jan Kandziora
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//latesttemp reads the contents of the temperature
register from the chip.

It never triggers a temperature conversion.

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
[email protected]
https://lists.sourceforge.net/lists/listinfo/owfs-developers


[Owfs-developers] Reading latesttemp

2020-10-07 Thread 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.


However if I run owread /uncached/DHW_Mid_Btm/temperature12 it returns 
13.4375.  If I then owread /uncached/DHW_Mid_Btm/latesttemp it also 
returns 13.4375 and after that it seems to work as expected.  So it 
seems that reading temperature12 resets it.


I can't reproduce this, as I say, once a temperature12 read resets it it 
works fine.


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.


Thanks

Mick


___
Owfs-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/owfs-developers