Re: [Owfs-developers] python-ow failure with new Raspbian Stretch

2017-12-17 Thread HW
Stefano and the others who also responded,

Thanks very much for your clarification of this problem and especially for the 
detailed suggestions on how to move forward!


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] python-ow failure with new Raspbian Stretch

2017-12-17 Thread Matthias Urlichs via Owfs-developers
On 17.12.2017 17:45, Gregg Levine wrote:
> Of course the merely obvious question is why the swig bindings are not
> under active development.

Because they're mosty useless, IMHO. In any sort off production
environment I want a way to access the actual bus and check which data
is actually out there before I restart my Python script under a
debugger. Thus I require owserver, thus any of the direct bindings is a
no-go.

Also, owserver is long-running; connecting to it is nearly instantaneous
and does not require privileges. Starting a script that loads owlib in
order to access the bus directly, not so much.

Also², async usage of owlib requires multithreading AFAIK, or at least
specialized code. With owserver I can write a reasonably-simple protocol
handler, throw the request packet to owserver, and process the answer
whenever I feel like doing so.

NB: Python3 support has landed in SWIG 1.3.37, sometime in 2008 …
obviously those were the days before Semantic Versioning got any kind of
traction, but that's a different problem. :-P

-- 
-- Matthias Urlichs


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] python-ow failure with new Raspbian Stretch

2017-12-17 Thread Tomasz Torcz ️
On Sun, Dec 17, 2017 at 04:58:15PM +0100, Matthias Urlichs via Owfs-developers 
wrote:
> On 17.12.2017 00:19, Stefano Miccoli wrote:
> > Unfortunately owpython (the swig bindings) is not under active
> > development.
> 
> I'd go a step further and remove them from the next release.

  +1 from me! Those bindings are not python3 compatible even.
In Fedora, I suggested people should use pyownet.

-- 
Tomasz TorczThere exists no separation between gods and men:
xmpp: zdzich...@chrome.pl   one blends softly casual into the other.


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] python-ow failure with new Raspbian Stretch

2017-12-17 Thread Jan Kandziora
Am 17.12.2017 um 17:45 schrieb Gregg Levine:
> Hello!
> I'd go a bigger step further and make them optional by way of how the
> configure script is managed. I manage three platforms here. My desktop
> a 32 bit machine running Slackware 11.0 Linux, and this laptop, that
> also runs Slackware 14.2 in 64 bit mode. And of course any number of
> Raspberry Pi platforms.
> 
> We'd a poll of some kind asking how many people use Python in the OWFS
> community, and even TCL and then PHP. Once we've got those numbers,
> we'd have some idea of what to do next.
> 
> Of course the merely obvious question is why the swig bindings are not
> under active development. The incredibly obvious question then is who
> was performing that task.
>
The tcl binding does not use swig but a native binding. Works with
Tcl-8.5 (my production environment), have to test with Tcl-8.6.

If anyone has problems compiling it, it's mostly because tclConfig.sh
isn't found automatically, which can easily be fixed by using the

./configure --with-tcl=...

Kind regards

Jan

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] python-ow failure with new Raspbian Stretch

2017-12-17 Thread Colin Reese
I do exclusively. I was using my own wrapper reading directories but now use 
pyownet. 

C

> On Dec 17, 2017, at 8:45 AM, Gregg Levine  wrote:
> 
> Hello!
> I'd go a bigger step further and make them optional by way of how the
> configure script is managed. I manage three platforms here. My desktop
> a 32 bit machine running Slackware 11.0 Linux, and this laptop, that
> also runs Slackware 14.2 in 64 bit mode. And of course any number of
> Raspberry Pi platforms.
> 
> We'd a poll of some kind asking how many people use Python in the OWFS
> community, and even TCL and then PHP. Once we've got those numbers,
> we'd have some idea of what to do next.
> 
> Of course the merely obvious question is why the swig bindings are not
> under active development. The incredibly obvious question then is who
> was performing that task.
> -
> Gregg C Levine gregg.drw...@gmail.com
> "This signature fought the Time Wars, time and again."
> 
> 
> On Sun, Dec 17, 2017 at 10:58 AM, Matthias Urlichs via Owfs-developers
>  wrote:
>> On 17.12.2017 00:19, Stefano Miccoli wrote:
>>> Unfortunately owpython (the swig bindings) is not under active
>>> development.
>> 
>> I'd go a step further and remove them from the next release.
>> 
>> --
>> -- Matthias Urlichs
>> 
>> 
>> --
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>> ___
>> Owfs-developers mailing list
>> Owfs-developers@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/owfs-developers
> 
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> ___
> Owfs-developers mailing list
> Owfs-developers@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/owfs-developers

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] python-ow failure with new Raspbian Stretch

2017-12-17 Thread Gregg Levine
Hello!
I'd go a bigger step further and make them optional by way of how the
configure script is managed. I manage three platforms here. My desktop
a 32 bit machine running Slackware 11.0 Linux, and this laptop, that
also runs Slackware 14.2 in 64 bit mode. And of course any number of
Raspberry Pi platforms.

We'd a poll of some kind asking how many people use Python in the OWFS
community, and even TCL and then PHP. Once we've got those numbers,
we'd have some idea of what to do next.

Of course the merely obvious question is why the swig bindings are not
under active development. The incredibly obvious question then is who
was performing that task.
-
Gregg C Levine gregg.drw...@gmail.com
"This signature fought the Time Wars, time and again."


On Sun, Dec 17, 2017 at 10:58 AM, Matthias Urlichs via Owfs-developers
 wrote:
> On 17.12.2017 00:19, Stefano Miccoli wrote:
>> Unfortunately owpython (the swig bindings) is not under active
>> development.
>
> I'd go a step further and remove them from the next release.
>
> --
> -- Matthias Urlichs
>
>
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> ___
> Owfs-developers mailing list
> Owfs-developers@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/owfs-developers

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] python-ow failure with new Raspbian Stretch

2017-12-17 Thread Matthias Urlichs via Owfs-developers
On 17.12.2017 00:19, Stefano Miccoli wrote:
> Unfortunately owpython (the swig bindings) is not under active
> development.

I'd go a step further and remove them from the next release.

-- 
-- Matthias Urlichs


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] python-ow failure with new Raspbian Stretch

2017-12-16 Thread Stefano Miccoli
Unfortunately owpython (the swig bindings) is not under active development. The 
current best practice is to *always* run owserver on the host with the one-wire 
bus master, and have all clients access the one-wire bus via the owserver 
protocol.

My personal suggestion is to take the time to try out the recommended setup, 
although I’m not sure that this will solve your problem.

- Start from a fresh system (no other owfs components installed) and install 
owserver and ow-shell:

$ sudo apt install owserver ow-shell

- Delete the hyper-verbose default debian owfs.conf file and use this minimal 
config

server: usb = all
server: port = 4304

- Enable and start the owserver

$ sudo systemctl stop owserver
$ sudo systemctl enable owserver
$ sudo systemctl start owserver

- Confirm that owserver is running:

$ systemclt status owserver

- Test your setup

$ owdir

- Install and test owpython. (Run the python client as an unprivileged user, no 
need to run as root.)

$ sudo apt install python-ow
$ python
>>> import ow
>>> ow.init('localhost:4304')
>>> ow.owfs_get('/')


At this point you can continue using the old owpython (as an owserver client, 
and not directly controlling the usb bus master), but you are also ready to 
switch to more modern alternatives.

Hope this helps

Stefano.

> On 15 Dec 2017, at 21:22, HW  wrote:
> 
> Using a DS9490, I have been running the python based Weewx weather station 
> software for several years on the Raspbian Wheezy OS. Unfortunately, the same 
> program is failing on the new Raspbian Stretch OS and can be verified with a 
> simple test case. Run the following program as root (to bypass any permission 
> issues) on the Raspbian Stretch November Release:
> #!/usr/bin/python
> import ow
> ow.init('u')
> and the test program exits with the error message:
>   File "/usr/lib/python2.7/dist-packages/ow/__init__.py", line 224, in init 
> raise exNoController
> 
> Syslog shows
> Dec  7 17:33:27 wx kernel: [436943.136563] usb 1-1.5: new full-speed USB 
> device number 107 using dwc_otg
> Dec  7 17:33:27 wx kernel: [436943.270174] usb 1-1.5: New USB device found, 
> idVendor=04fa, idProduct=2490
> Dec  7 17:33:27 wx kernel: [436943.270189] usb 1-1.5: New USB device strings: 
> Mfr=0, Product=0, SerialNumber=0
> Dec  7 17:33:27 wx mtp-probe: checking bus 1, device 107: 
> "/sys/devices/platform/soc/3f98.usb/usb1/1-1/1-1.5"
> Dec  7 17:33:27 wx mtp-probe: bus: 1, device: 107 was not an MTP device
> and after running the above test program:
> Dec  11 07:05:46 wx OWFS[30742]: DEFAULT: owlib.c:(208) Cannot open USB bus 
> master
> Dec  11 07:05:46 wx OWFS[30742]: DEFAULT: owlib.c:(52) No valid 1-wire buses 
> found
> 
> For the above test, after running apt-get update and upgrade, library 
> versions were python-ow 3.1p5-1, libow 3.1.5.
> 
> A workaround was found by Glenn McKechnie and posted on the weewx-user Google 
> group:
> apt-get remove libow-3.1-5 python-ow owfs-common
> Build and install owfs-2.9p8
> The test program now exits normally and syslog shows
> Dec 15 10:19:56 wx OWFS[12631]: DEFAULT: ow_ds9490.c:(250) Unclear what <> 
> means in USB specification, will use first adapter.
> Dec 15 10:19:56 wx OWFS[12631]: DEFAULT: ow_usb_msg.c:(292) Opened USB DS9490 
> bus master at 1:11.
> Dec 15 10:19:56 wx OWFS[12631]: DEFAULT: ow_usb_cycle.c:(190) Set DS9490 1:11 
> unique id to 81 38 0F 31 00 00 00 4E
> 
> Unfortunately, I don't have a Debian Stretch system so I can't tell if this a 
> Debian or a Raspbian issue.
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org ! 
> http://sdm.link/slashdot___ 
> 
> Owfs-developers mailing list
> Owfs-developers@lists.sourceforge.net 
> 
> https://lists.sourceforge.net/lists/listinfo/owfs-developers 
> 
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers