Hello Jan,
I'm sorry, you are right.
I do not use bash commands, I do read and write operations from a Python3 program. I do it step by step, as I'm not used to Python.
I had a version with uncached, but there was another program error and I forgot adjusting the file path.
PATH = "/mnt/1wire/bus.0/"
initiation of conversion:
while True: # Hauptprogramm
t1 = time()
fw = open(PATH + "simultaneous" + "/temperature", "w")
fw.write("1")
fw.close()
reading values:
for i in tempList:
deviceFile = PATH + "uncached/" + temps[i] + "/latesttemp"
f = open(deviceFile, "r")
tempBuffer = float(f.read())
f.close()
if tempBuffer != 85.0:
tempw[i] = tempBuffer
print(temps[i], tempw[i])
break
t2 = time()
print(t2 - t1)
deviceFile = PATH + "uncached/" + temps[i] + "/latesttemp"
f = open(deviceFile, "r")
tempBuffer = float(f.read())
f.close()
if tempBuffer != 85.0:
tempw[i] = tempBuffer
print(temps[i], tempw[i])
break
t2 = time()
print(t2 - t1)
However, now I wonder about very short conversion times, shorter than 700 ms a single 12bit conversion shoul take.
1st run:
28.0A651B2D1901 26.625
28.0A35192D1901 22.875
28.0CB479A20003 21.75
28.8BE0182D1901 28.875
28.80A7112D1901 29.5
28.629B082D1901 22.75
28.953D062D1901 22.875
28.613079A20003 22.25
28.CF52142D1901 22.8125
28.0A35192D1901 22.875
28.0CB479A20003 21.75
28.8BE0182D1901 28.875
28.80A7112D1901 29.5
28.629B082D1901 22.75
28.953D062D1901 22.875
28.613079A20003 22.25
28.CF52142D1901 22.8125
1.3515775203704834 sec
following runs
>>> %Run TempLesen.py
28.0A651B2D1901 22.9375
28.0A35192D1901 22.9375
28.0CB479A20003 21.75
28.8BE0182D1901 23.125
28.80A7112D1901 23.125
28.629B082D1901 22.75
28.953D062D1901 22.875
28.613079A20003 22.25
28.CF52142D1901 22.875
28.0A651B2D1901 22.9375
28.0A35192D1901 22.9375
28.0CB479A20003 21.75
28.8BE0182D1901 23.125
28.80A7112D1901 23.125
28.629B082D1901 22.75
28.953D062D1901 22.875
28.613079A20003 22.25
28.CF52142D1901 22.875
0.6546370983123779 sec
no matter whether Thonny or Bash.
Is there a Python3 library for RaspberryPi
Actually there is a problem when installing OWFS on Raspian Buster on PIs. File system an sensors appear in duplicates. I give you a link to the forum of the manufacturer of the used DS2482-100 adapter:
Regards
H. Wissing
Dr. med. habil. Dipl.- Ing. Heimo Wissing
Privatdozent, Arzt für Anästhesiologie,
Intensivmedizin und Schmerztherapie
Bioingenieur / Biomedizinische Technik
Neckarweg 1, 69118 Heidelberg
Tel.: 06221/801679 FAX: 06221/803738
mobil: 0171/4571292
Privatdozent, Arzt für Anästhesiologie,
Intensivmedizin und Schmerztherapie
Bioingenieur / Biomedizinische Technik
Neckarweg 1, 69118 Heidelberg
Tel.: 06221/801679 FAX: 06221/803738
mobil: 0171/4571292
Gesendet: Freitag, 13. März 2020 um 15:48 Uhr
Von: "Jan Kandziora" <j...@gmx.de>
An: owfs-developers@lists.sourceforge.net
Betreff: Re: [Owfs-developers] How to Use Simultaneous
Von: "Jan Kandziora" <j...@gmx.de>
An: owfs-developers@lists.sourceforge.net
Betreff: Re: [Owfs-developers] How to Use Simultaneous
Am 13.03.20 um 15:12 schrieb hwissing:
> Hello,
>
> I think one issue from the primary question is not answered..
>
> /" If I read from '/temperature' then I get them read in much faster
> *but I don't get a fresh conversion each time."*/
>
This is a very old question, and the mechanism has changed a bit since 2008.
>
> I have the same issue. First conversion with 8 DS18B20 sensors takes
> about 1 sec, immediately following requests take about 40 ms, but
> values are not updated. It takes a while till updated values are
> acquired, then conversion takes longer.
>
That is because you read /<ID>/temperature instead of
/uncached/<ID>/temperature
But don't do this either. If you want simultaneos conversions, do instead
$ owwrite /simultaneous/temperature 1
$ sleep 1s
$ owread /uncached/<sensor0id>/latesttemp
$ owread /uncached/<sensor1id>/latesttemp
$ owread /uncached/<sensor2id>/latesttemp
$ owread /uncached/<sensor3id>/latesttemp
$ owread /uncached/<sensor4id>/latesttemp
$ owread /uncached/<sensor5id>/latesttemp
$ owread /uncached/<sensor6id>/latesttemp
$ owread /uncached/<sensor7id>/latesttemp
Latesttemp has the resolution of the previous non-simultaneous
conversion, or, after power-up of the sensor, the resolution set in the
sensor's EEPROM. You can adjust the through /<ID>/tempres.
See the manpage: https://github.com/owfs/owfs-doc/wiki/DS18B20
Kind regards
Jan
_______________________________________________
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers
> Hello,
>
> I think one issue from the primary question is not answered..
>
> /" If I read from '/temperature' then I get them read in much faster
> *but I don't get a fresh conversion each time."*/
>
This is a very old question, and the mechanism has changed a bit since 2008.
>
> I have the same issue. First conversion with 8 DS18B20 sensors takes
> about 1 sec, immediately following requests take about 40 ms, but
> values are not updated. It takes a while till updated values are
> acquired, then conversion takes longer.
>
That is because you read /<ID>/temperature instead of
/uncached/<ID>/temperature
But don't do this either. If you want simultaneos conversions, do instead
$ owwrite /simultaneous/temperature 1
$ sleep 1s
$ owread /uncached/<sensor0id>/latesttemp
$ owread /uncached/<sensor1id>/latesttemp
$ owread /uncached/<sensor2id>/latesttemp
$ owread /uncached/<sensor3id>/latesttemp
$ owread /uncached/<sensor4id>/latesttemp
$ owread /uncached/<sensor5id>/latesttemp
$ owread /uncached/<sensor6id>/latesttemp
$ owread /uncached/<sensor7id>/latesttemp
Latesttemp has the resolution of the previous non-simultaneous
conversion, or, after power-up of the sensor, the resolution set in the
sensor's EEPROM. You can adjust the through /<ID>/tempres.
See the manpage: https://github.com/owfs/owfs-doc/wiki/DS18B20
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