navitron
 
Renewable Energy and Sustainability Forum
UK's most popular Renewable Energy Forum May 23, 2012, 06:10:42 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Anyone wishing to register as a new member on the forum is strongly recommended to use a "proper" email address - following recent spam/hack attempts on the forum, all security is set to "high", and "disposable" email addresses like Gmail, Yahoo and Hotmail tend to be viewed with suspicion, and the application rejected if there is any doubt whatsoever
 
Recent Articles: UPDATE ON DECC APPLICATION FOR LEAVE TO APPEAL TO THE SUPREME COURT | Yingli Green Energy's PV Module Ranks No.2 in TUV Rheinland Energy Yield Test | Navitron Solar Showers at Glastonbury for Year 5!
   Home   Help Search Login Register  
Pages: 1 2 3 [4]   Go Down
  Print  
Author Topic: Installing owfs on Ubuntu  (Read 7107 times)
SimonHa
Full Member
***
Offline Offline

Posts: 164


« Reply #45 on: April 02, 2011, 11:00:13 AM »

I'm rebuilding my HA controller (don't ask!) and so this time used the owfs 2.7p14 package kindly created by Wookey. It starts working with my 1-wire network (I use a LinkUSB) but unfortunately once I've done owread and owwrite a few times I start getting 1w errors. Previously I used 9.10 with OWFS compiled from a recent 2.8p3 version (as mentioned earlier in the thread), but this time I'm on 10.10. Therefore as a first step I thought I'd better get the latest OWFS version installed.

Anyway, inspired by Wookey's post I thought I'd try and build the OWFS packages from source, following his instructions:
Ubuntu:
Code:
apt-get source owfs 
sudo apt-get install build-essential ubuntu-dev-tools
cd owfs-2.7p14
get-build-deps
debuild -uc -us

Now, I'm using 2.8p7 but when I do get-build-deps I get:
Code:
Couldn't find file debian/control. You have to be inside the source directory of a Debian package or pass the name of the package(s) whose build dependencies you want to install in order to use this script.

Looking at the man page (http://manpages.ubuntu.com/manpages/hardy/man1/get-build-deps.1.html) it looks like I need some sort of package list file - presumably something Wookey has put together. Is that simple, or would I be better downloading the OWFS source from wookware and trying to shoehorn the newer version of OWFS source into it?

(just trying not to re-invent the wheel  Roll Eyes )

I don't know whether the slightly newer OWFS will fix my problem but am just trying to reduce the discrepancies as the old environment worked pretty reliably (until the memory stick went kaput that is  facepalm ).


Simon
PS. Once I've got the packages rebuilt I'll be happy to upload them somewhere for others (e.g. to wookey)
Logged
wookey
Hero Member
*****
Offline Offline

Posts: 2672


WWW
« Reply #46 on: April 03, 2011, 01:55:30 AM »

I'm rebuilding my HA controller (don't ask!) and so this time used the owfs 2.7p14 package kindly created by Wookey. It starts working with my 1-wire network (I use a LinkUSB) but unfortunately once I've done owread and owwrite a few times I start getting 1w errors.

That's a bit dull. Odd that it should work 'a bit'.

Quote
Previously I used 9.10 with OWFS compiled from a recent 2.8p3 version (as mentioned earlier in the thread), but this time I'm on 10.10. Therefore as a first step I thought I'd better get the latest OWFS version installed.

Anyway, inspired by Wookey's post I thought I'd try and build the OWFS packages from source, following his instructions:

Now, I'm using 2.8p7 but when I do get-build-deps I get:
Code:
Couldn't find file debian/control. You have to be inside the source directory of a Debian package or pass the name of the package(s) whose build dependencies you want to install in order to use this script.

That's presumably because you got the tarball from owfs upstream, which doesn't have a 'debian' directory in it (that's the dir with the debian packaging).

Quote
Looking at the man page (http://manpages.ubuntu.com/manpages/hardy/man1/get-build-deps.1.html) it looks like I need some sort of package list file - presumably something Wookey has put together. Is that simple, or would I be better downloading the OWFS source from wookware and trying to shoehorn the newer version of OWFS source into it?

Doing the packaging from scratch is not simple. Updating the package to the new 2.8 source is relatively simple, but it depends how much they've changed, exactly how straightforward it is. There is even a command to do it's best to do such an update for you: uupdate.

However, looking at the ITP ('intent to package' bug in Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=325159 it seems a couple of new people have popped up to work on this, so there is now a packaging of v2.8p7 already done: http://git.debian.org/?p=collab-maint/owfs.git;a=summary

so you can build new packages with:
git clone git://git.debian.org/collab-maint/owfs.git git
git-buildpackage -uc -us    (install any missing dependencies it complains about, and try again)
I've just done that and it seemed to work OK. I can;t upload packages right now as there seems to be some conbnectivity problem to my server, but I'l upload the packages for debian squeeze, amd64 to my repo, soonish. I've done a maverick (10.10) build too.

Quote
(just trying not to re-invent the wheel  Roll Eyes )

I don't know whether the slightly newer OWFS will fix my problem but am just trying to reduce the discrepancies as the old environment worked pretty reliably (until the memory stick went kaput that is  facepalm ).



Logged

Wookey
SimonHa
Full Member
***
Offline Offline

Posts: 164


« Reply #47 on: April 03, 2011, 10:25:08 PM »

I'm rebuilding my HA controller (don't ask!) and so this time used the owfs 2.7p14 package kindly created by Wookey. It starts working with my 1-wire network (I use a LinkUSB) but unfortunately once I've done owread and owwrite a few times I start getting 1w errors.

That's a bit dull. Odd that it should work 'a bit'.

Thanks Wookey.

Yes, basically it seems to work for a few owread/owwrites then starts getting a very general error message (can't remember exactly - something like "failed to communicate"). Nothing in syslog. Previously I had been using echo/cat to a owfs "file", rather than owread/owwrite so for all I know I might have got the same errors before, had I tried. Could be just a silly problem with LinkUSB compatibility, something to do with the cache etc.

With "Mark 2" of the controller I'm thinking of maybe not bothering with owfs fs at all, and seeing if there's a way of all API calls going through HTTP GET/POST. For such trivial data as 1-wire (and lack of super security requirements) that sounds like it might be quite a clean way of doing it (e.g. can easily call from most languages). The only thing that will be missing is some sort of user-friendly aliasing - maybe I'll see if I can add something like that to owserver.
Logged
SimonHa
Full Member
***
Offline Offline

Posts: 164


« Reply #48 on: April 05, 2011, 12:48:09 PM »

so you can build new packages with:
git clone git://git.debian.org/collab-maint/owfs.git git
git-buildpackage -uc -us    (install any missing dependencies it complains about, and try again)
I've just done that and it seemed to work OK. I can;t upload packages right now as there seems to be some conbnectivity problem to my server, but I'l upload the packages for debian squeeze, amd64 to my repo, soonish. I've done a maverick (10.10) build too.
Well, it's encouraging owfs might make it into Debian/Ubuntu as it's a mature and useful package.

I've just tried building it as above (after installing git and git-buildpackage) but am getting  "dh" missing error:
Code:
joggler@joggler:~/owfs/git$ git-buildpackage -uc -us
dh --with quilt --with autotools_dev clean
make: dh: Command not found
make: *** [clean] Error 127
debuild: fatal error at line 1319:
couldn't exec fakeroot debian/rules:
debuild -d clean returned 2
Couldn't run 'debuild -d clean'

Unfortunately I'm a bit out of my depth and Googling dh isn't helping.

I can see the latest source etc which looks good, so I could build owfs where it is, but this time I actually have a "dev machine" I'm building on and would prefer to just transfer over the finished packages to my "live" HA controller (I'm taking it a bit more seriously this time!).

Any ideas? TIA!

Simon
Logged
KLD
Hero Member
*****
Offline Offline

Posts: 1340


« Reply #49 on: April 05, 2011, 10:22:59 PM »

make: dh: Command not found

Unfortunately I'm a bit out of my depth and Googling dh isn't helping.
Simon, googling for the complete error message suggest that "dh" stands for debhelper. You probably need to install the packages "debhelper" and "dh-make".

Klaus
Logged
SimonHa
Full Member
***
Offline Offline

Posts: 164


« Reply #50 on: April 06, 2011, 12:57:53 PM »

Thanks Klaus - I was getting bogged down in other search results about xmbc... Anyway, I have managed to build OWFS as a Debian package - result! (thanks to Wookey & KLD).

Just for the record these are other bits and bobs I needed:
* The packages from here: http://tomasz.korwel.net/2006/07/02/owfs-instalation-on-ubuntu-606/, which on 10.10 means:
Code:
sudo apt-get install automake autoconf autotools-dev gcc g++ libtool libusb-dev fuse-utils libfuse-dev swig python-dev tcl-dev php5-dev
* Some other packages by trial and error:
Code:
sudo apt-get install git git-buildpackage dh-make quilt php5-cli
* As per Wookey's instructions:
Code:
git clone git://git.debian.org/collab-maint/owfs.git git
git-buildpackage -uc -us
Then finally:
Code:
cd ..
sudo dpkg -i ./owserver_2.8p7+cvs20110310-1_i386.deb ./libow-2.8-7_2.8p7+cvs20110310-1_i386.deb ./owfs-common_2.8p7+cvs20110310-1_all.deb ./ow-shell_2.8p7+cvs20110310-1_i386.deb ./owhttpd_2.8p7+cvs20110310-1_i386.deb

It does show how much guff you need to build packages and why you probably should have a build environment separate from the target machine.

Note: I'm only currently using owserver, owshell and owhttpd but these are all the packages that were built:
Code:
libow-2.8-7_2.8p7+cvs20110310-1_i386.deb      owfs-common_2.8p7+cvs20110310-1_all.deb
libowcapi-2.8-7_2.8p7+cvs20110310-1_i386.deb  owfs-dbg_2.8p7+cvs20110310-1_i386.deb
libow-dev_2.8p7+cvs20110310-1_i386.deb        owfs-doc_2.8p7+cvs20110310-1_all.deb
libownet-2.8-7_2.8p7+cvs20110310-1_i386.deb   owfs-fuse_2.8p7+cvs20110310-1_i386.deb
libownet-dev_2.8p7+cvs20110310-1_i386.deb     owftpd_2.8p7+cvs20110310-1_i386.deb
libownet-perl_2.8p7+cvs20110310-1_all.deb     owhttpd_2.8p7+cvs20110310-1_i386.deb
libownet-php_2.8p7+cvs20110310-1_all.deb      owserver_2.8p7+cvs20110310-1_i386.deb
libow-perl_2.8p7+cvs20110310-1_i386.deb       ow-shell_2.8p7+cvs20110310-1_i386.deb
libow-php5_2.8p7+cvs20110310-1_i386.deb       python-ow_2.8p7+cvs20110310-1_i386.deb
libow-tcl_2.8p7+cvs20110310-1_i386.deb        python-ownet_2.8p7+cvs20110310-1_all.deb
owfs_2.8p7+cvs20110310-1_all.deb

Note: some of the packaging looks a little different from Wookey's version, e.g. the config is in /etc/owfs.conf. My auto start up is failing, probably as I've not set up the config yet - this is my current startup (for LinkUSB):

Code:
owserver -a /home/joggler/alias.txt -p 4304 --link=/dev/ttyUSB0 -t 30 --error_print=2 --error_level=9
owhttpd -a /home/joggler/alias.txt -p 8080 -s localhost:4304 --error_print=2 --error_level=9
(though I'm still struggling to get aliases to work and logging whilst running as a daemon).

You do get some debug messages during startup (e.g. 0x99348a8 alloc ow_cache.c:Cache_Add_Alias[569] MALLOC size=30) but I assume this is something to do with being an intermediate build.

Thanks again to Wookey angel & Klaus for help. If anyone wants me to send them the above packages please send me a PM.

Simon
PS. remember this is how to build OWFS from scratch. Wookey's version (see earlier) is probably suitable for most people, plus hopefully soon OWFS will just be part of the main Ubuntu distribution.
Logged
Pages: 1 2 3 [4]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!