I'm having some issues using the ownet Python API for owfs. I've got
owserver successfully running and connected to a DS1490F USB 1-Wire
adapter. I can use owhttpd and view all my sensor data (currently
connected is 28.8C2A77030000, an 0x28 family temperature sensor and the
81.3E3C30000000 which comes from the USB adapter itself).
I ran the following Python code:
import ownet
a = ownet.Sensor('/','localhost',4304)
And I get the following:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib64/python2.7/site-packages/ownet/__init__.py", line 169,
in __init__
self.useCache(self._useCache)
File "/usr/lib64/python2.7/site-packages/ownet/__init__.py", line 321,
in useCache
self._type = self._connection.read('/system/adapter/name.0')
File "/usr/lib64/python2.7/site-packages/ownet/connection.py", line
138, in read
ret, payload_len, data_len = self.unpack(data)
File "/usr/lib64/python2.7/site-packages/ownet/connection.py", line
235, in unpack
ret_value = socket.ntohl(val[2])
OverflowError: can't convert negative number to unsigned long
I'm on Python 2.7.5. I saw something in the mailing list about a
possible bug fixed in owfs 2.8 (I can't find the post now). I was
running owfs-2.7_p21-r1 for Gentoo. I went ahead and created a new
ebuild for owfs-2.9_p1 and emerged it. Tested owserver+owhttpd and they
worked fine, but the ownet Python API errors out (the error above is
from owfs-2.9_p1).
I was originally just reading from the filesystem in owfs+lufs, but
later the app we had someone on our team write some native one-wire
C/Python code. It only supported two sensor types and I had to strip it
out because it was proprietary (non-GPL), so now I'm back trying to do
as much as I can directly in python+owfs.
https://github.com/sumdog/LtSense
Sumit
------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT
organizations don't have a clear picture of how application performance
affects their revenue. With AppDynamics, you get 100% visibility into your
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
Owfs-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/owfs-developers