I would not blame python, nor owfs, but fuse.

IMHO: owfs+fuse is very handy for debugging, but it makes really no sense in a 
production environment. The way to go is owserver with its protocol, and the 
appropriate client libraries.

Shell clients can access 1-wire data with owshell (owdir, owread, owwrite) 
while python clients can bind with the ow or ownet python libraries. Please 
consider also the newer pyownet, documented at 
http://pyownet.readthedocs.org/en/latest/ 
<http://pyownet.readthedocs.org/en/latest/> and pyowfs documented at 
http://priesch.co.at/pyowfs <http://priesch.co.at/pyowfs>

Both packages are available on pypi, so they can be installed with

pip install pyowfs
pip install pyownet

for easy testing.

Stefano.

PS: I’m the author of pyownet, which I wrote when transitioning from perl to 
python to overcome some of the shortcomings of ownet, and for the fun of it. 
And for sure I think it is really bad idea to exec() an external program from 
inside a python script. 

Minimal instruction for use are
>>> from pyownet import protocol
>>> owproxy = protocol.proxy(host="server.example.com", port=4304)
>>> owproxy.dir()
[u'/10.A7F1D92A82C8/', u'/05.D8FE434D9855/', u'/26.8CE2B3471711/']
>>> owproxy.read('/10.A7F1D92A82C8/temperature')
'     6.68422'
The only thing you should be aware of is that creating an owproxy object is 
quite time consuming, so usually you have a single owproxy instance, shared 
globally.



> On 04 Nov 2015, at 12:32, Martin Patzak (GMX) <martin.pat...@gmx.de> wrote:
> 
> Well, this is interesting:
> 
> while further investigating the problem it looks like this:
> 
> the value of sensed.BYTE toggles between 55 (00110111) and 183 (10110111) for 
> quite a while - so its only flipping one bit.
> 
> When I increase the toggling speed, I can provoke my 553 error from 
> sensed.BYTE from once a day to several times a minute.
> 
> It looks like reading the owfs-file sensed.BYTE in python 2.7 is not an 
> atomic function!?!
> 
> Any thoughts?
> 
> Cheers,
> 
> Martin
> 
> 
>  
> 
> 
> 
> On 10/30/2015 08:23 AM, Martin Patzak (GMX) wrote:
>> Hello All,
>> 
>> I am experiencing 'strange' readings from a DS2408.
>> 
>> Every once in a while (that is about once a day, with reading the 
>> sensed.BYTE folders once a second - so its rather rare) the value read from 
>> one of the DS2408 is 553 where it should be between 0 and 255.
>> 
>> Is this some 'special' value indicating an error or something the like? 
>> Anybody else saw this phenomena before?
>> 
>> I throw this value away and re-read again and everything is fine! 
>> 
>> 
>> I am running solely owfs 2.9p8 on a BananaPi running Debian 8 'jessie' (no 
>> owserver or owhttp is running).
>> 
>> There are 25 temperature sensors and 2 DS2408 on a powered bus with an 
>> USB-Link as bus-master.
>> 
>> While there is some perl-code writing to the PIO.<bit> of the DS2408, it is 
>> Python-code reading the sensed.BYTE of the 2408 to display the state in an 
>> HMI on a webpage.
>> 
>> 
>> Cheers
>> 
>> Martin
>> 
>> 
>> 
>> ------------------------------------------------------------------------------
>> 
>> 
>> _______________________________________________
>> Owfs-developers mailing list
>> Owfs-developers@lists.sourceforge.net 
>> <mailto:Owfs-developers@lists.sourceforge.net>
>> https://lists.sourceforge.net/lists/listinfo/owfs-developers 
>> <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

------------------------------------------------------------------------------
_______________________________________________
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers

Reply via email to