Hi Laurent, I have not. I am a OWFS noob so I don't know what either of those are/do. I only read an article that indicated I should use BYTE.
On 8/24/2020 12:34 PM, Laurent FAILLIE via Owfs-developers wrote: > Hi, > > I'm controlling several things using DS2406 or DS2408 thru OWFS/Fuse > (from C code but it's the same), and it's working pretty well for years. > I.e: > * Some explanations (in French) : Commande d'actionneurs par 1-wire > <http://destroyedlolo.info/IoT/Actionneurs/> > > > > > > Commande d'actionneurs par 1-wire > > Par DS2406 > > <http://destroyedlolo.info/IoT/Actionneurs/> > > > * my pool's pump, Commande d'une pompe de piscine par 1-Wire > <http://destroyedlolo.info/IoT/PompePiscine/> (in french too) > > > > > > Commande d'une pompe de piscine par 1-Wire > > DS2406 en sortie > > <http://destroyedlolo.info/IoT/PompePiscine/> > > > Did you tried with DS2406 ? > Or using PORT.A/B instead of BYTE ? > > - Laurent > > > > Le lundi 24 août 2020 à 17:47:53 UTC+2, Martin Patzak > <martin.pat...@gmx.de> a écrit : > > > For python I would highly recommend you use the library *pyownet *by > Stefano Miccoli > /https://github.com/miccoli/pyownet/ > > /using Fuse can lead to weird problems... (not saying that it is the > reason in your specific case) > > or you can use the buil-in functions in owserver owread/owwrite/owdir > instead. > > On 24.08.20 15:57, Dennis Putnam wrote: > I have the following python 3 code: > > *fn='/mnt/1wire/3A.'+blower.id_+'/PIO.BYTE'** > **with open(fn,'wb') as fh:** > ** fh.write(onOff.to_bytes(1,byteorder=sys.byteorder)) > > *This produces the error: > > *OSError: [Errno 22] Invalid argument > > *The value of onOff will be either 1 or 0. In this particular case the > value is 1. The value of blower.id_ is 0BE14D000000. This is what that > OWFS directory contains: > > *ls -l /mnt/1wire/3A.0BE14D000000* > total 0 > -r--r--r-- 1 root root 16 Aug 19 21:17 address > -rw-rw-rw- 1 root root 256 Aug 19 21:17 alias > -r--r--r-- 1 root root 2 Aug 19 21:17 crc8 > -r--r--r-- 1 root root 2 Aug 19 21:17 family > -r--r--r-- 1 root root 12 Aug 19 21:17 id > -r--r--r-- 1 root root 16 Aug 19 21:17 locator > -rw-rw-rw- 1 root root 1 Aug 19 21:17 PIO.A > -rw-rw-rw- 1 root root 3 Aug 19 21:17 PIO.ALL > -rw-rw-rw- 1 root root 1 Aug 19 21:17 PIO.B > -rw-rw-rw- 1 root root 12 Aug 19 21:17 PIO.BYTE > -r--r--r-- 1 root root 16 Aug 19 21:17 r_address > -r--r--r-- 1 root root 12 Aug 19 21:17 r_id > -r--r--r-- 1 root root 16 Aug 19 21:17 r_locator > -r--r--r-- 1 root root 1 Aug 19 21:17 sensed.A > -r--r--r-- 1 root root 3 Aug 19 21:17 sensed.ALL > -r--r--r-- 1 root root 1 Aug 19 21:17 sensed.B > -r--r--r-- 1 root root 12 Aug 19 21:17 sensed.BYTE > -r--r--r-- 1 root root 32 Aug 19 21:17 type > > I cannot see anything wrong with the code or permissions and the error > is so generic I don't know to what it refers. Can someone spot what is > invalid or help me debug this problem? TIA. > > > _______________________________________________ > Owfs-developers mailing list > Owfs-developers@lists.sourceforge.net > <mailto:Owfs-developers@lists.sourceforge.net> > https://lists.sourceforge.net/lists/listinfo/owfs-developers > > _______________________________________________ > Owfs-developers mailing list > Owfs-developers@lists.sourceforge.net > <mailto: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
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Owfs-developers mailing list Owfs-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/owfs-developers