I use python to parse the files as well, but would prefer the
object-oriented approach I've seen in the owpython implementation. From
what I can tell, using the python would require nothing but the source, and
possibly an install using python-setuptools if one wanted to invoke it from
anywhere. I would be happy with the source that I could drop into a
directory and call the class instantiation objects after importing locally.
Parsing text is annoying, error-handling even worse. If someone has taken
care of these thankless jobs ahead of me, I have no desire to reinvent the
wheel.
C
On Thu, Dec 5, 2013 at 2:10 PM, Mick Sulley <[email protected]> wrote:
> Hi
>
> I use owfs with Python as well. I am not an expert on either, but in my
> code I start owfserver first then start owfs like this -
>
> owserver -p 4304 --nozero --i2c=/dev/i2c-0:ALL
> owfs -s localhost:4304 -a alias_file -m /var/1-wire/mnt --allow_other
>
> so owserver talks to the 1-wire network and owfs just talks to owserver
> on port 4304. The first command is for a Sheepwalk Pi adapter, for a
> USB adapter it would be
> owserver -p 4304 --nozero -u
>
> Then within the code I just read the 'files' in the directory structure
> just like normal files
>
> Hope that helps
> Mick
>
> On 05/12/13 20:08, Top-Dog wrote:
> > Thanks for the explanations. I'm still a bit confused about how I'm
> meant to
> > use the python api though. If I don't mount the file system with 'sudo
> > /opt/owfs/bin/owfs --allow_other -u /root/EEPROM......./' then when I go
> > straight to python and do the usual set up:
> > import ow
> > ow.init('u')
> >
> > The file system isn't mounted i.e. os.listdir('/root/EEPROM......./')
> comes
> > up empty. So I still can't access the EEPROM from the file system. Is
> there
> > a way to remove an instance without removing the file structure? I've
> used
> > 'fusermount -u /root/EEPROM...../' from both inside python (using
> subprocess
> > to get at the terminal) and in the terminal directly, but that removes
> the
> > whole file system.
> >
> > Is it worth dropping owfs and just going straight to owserver? I didn't
> > think I'd need owserver because the BBB only has one USB and I was going
> to
> > place multiple EEPROMs on the same bus using just 1 USB adapter.
> >
> >
> >
> > --
> > View this message in context:
> http://owfs-developers.1086194.n5.nabble.com/Diagnosing-disappearing-devices-adapters-tp10045p10052.html
> > Sent from the OWFS Developers mailing list archive at Nabble.com.
> >
> >
> ------------------------------------------------------------------------------
> > Sponsored by Intel(R) XDK
> > Develop, test and display web and hybrid apps with a single code base.
> > Download it for free now!
> >
> http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk
> > _______________________________________________
> > Owfs-developers mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/owfs-developers
>
>
> ------------------------------------------------------------------------------
> Sponsored by Intel(R) XDK
> Develop, test and display web and hybrid apps with a single code base.
> Download it for free now!
>
> http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk
> _______________________________________________
> Owfs-developers mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/owfs-developers
>
------------------------------------------------------------------------------
Sponsored by Intel(R) XDK
Develop, test and display web and hybrid apps with a single code base.
Download it for free now!
http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk
_______________________________________________
Owfs-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/owfs-developers