By: andrey-b I use owfs to control DS18B20, DS2405, DS2406P, etc Using ownet.php I can read data from devices and write data (turn on/off) PIO on DS2405 But now I need to turn on PIO.A after detecting button press (PIO.B) on DS2406P as soon as possible. (Less a second) I put "230" value to "set_alarm" value so when button is pressed I can see DS2406P in /mnt/1wire/bus.0/alarm/ folder. So I can make script to check the file in loop. It works but makes avarage load of system high (uptime, top show this). Is it the right way to check status of PIO, latch? I mean polling in loop without delays. Now I have only one DS2406 but I need to check about 10-15 such keys...
----------------------------- Your solution (polling the alarm directory) is the only way I know to see a change in the PIO state. You can probably add a small delay to the loop and still make your time goals. The other good news is that your solution scales well. There shouldn't be any extra system load polling for dozens of devices -- the same alarm directory listing will show all of them. Different Bus masters require different loads from the system. USB is probably the most efficient, passive the least -- it depends on how much of the work the master does autonomously. Finally, when you get closer to production, you could look at running your system on a small embedded device, like the NSLU2 or some OpenWRT router. You can still get access to the data over tcp, but run the polling on the device. I'll post your query to the developer's list, to see if other people have better suggestions. Paul Alfille
------------------------------------------------------------------------------
_______________________________________________ Owfs-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/owfs-developers
