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
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
|
|
| |
Commande d'actionneurs par 1-wire
Par DS2406
|
|
|
* my
On Mon, Aug 24, 2020 at 09:57:58AM -0400, 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
> It is a little ironic that in the owfs suite of programs the module
> called owfs it the only one you really should not use.
yes, I second that. That was confusing to hear in the beginning. If felt
so intuitive...
Maybe it should not be part of the standard package at all?
> With Python3 the
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
Yes I would second that. It is a little ironic that in the owfs suite
of programs the module called owfs it the only one you really should not
use. Basically hte best way is to run owserver which talks to all the
devices, and then your python code talks to owserver.
I have been using
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