Am 05.08.20 um 00:39 schrieb Mick Sulley: > Running v3.2p3 on Raspberry Pi, I have set up some DS18B20 sensors on a > test system, all of them are powered, but simultaneous does not seem to > be working > Triggering /temperature/simultaneous just sends "Skip ROM, Convert T" on the bus.
If you never ever read .../<id>/temperature nodes, there's no waiting time imposed by ofws. Reading /uncached/<id>/latesttemp reads the current scratchpad from the sensor. However, I'm not sure if the sensor itself imposes a waiting time for reading the scratchpad while a conversion is active. In that case, owfs would wait for it to respond. > > The code is below, when I run it the first loop takes 16 seconds then it > loops at 3 seconds for a while, then a 16 second etc. so it looks like > it does slow individual conversions, then uses cached values until they > expire, then another slow individual conversion, etc. Have I got > something wrong here? > > #!/usr/bin/python3 > > # sensor_read.py > > import pyownet > import time > > def main(): > owp = pyownet.protocol.proxy() > while True: > start = time.time() > owp.write('/simultaneous/temperature', b'1') > time.sleep(1) > print('start of sensor_read.py') > sen_lst = ['Solar_Pnl_1A', 'Solar_Pnl_2A','Solar_Pnl_1B', > 'Pool_Sol_X', 'Pool_CH_X', 'DHW_Mid_Top', 'DHW_Mid_Btm', > 'DHW_Top','Temp5', 'Temp19', 'Temp20','Temp21', 'Temp22', 'Temp23', > 'Temp25', 'Temp26', 'Temp27', 'Temp29', 'Temp30'] > prop_lst = ['/type', '/power', '/latesttemp'] > for p in prop_lst: > print('%s ' %p, end = '') > print('') > for sen in sen_lst: > print('\n%s ' %sen, end = '') > for prop in prop_lst: > try: > print('%s ' %(owp.read('/uncached/' + sen + > prop).decode()), end = '') > except: > print('failed! ', end = '') > endt = time.time() - start > print('\nTime = %f' %endt) > > if __name__ == "__main__": > main() > > I'm not too familiar with Python but this looks straightforward and okay. From what you write it seems there's another process accessing the sensors concurrently. Maybe a kernel driver? Check that first. Kind regards Jan _______________________________________________ Owfs-developers mailing list Owfs-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/owfs-developers