Peter Radcliffe

 describes getting OWFS to work on the Mac (under OS X)

I was recently introduced to 1-wire sensors after setting up power
monitoring from a currentcost unit via a usb interface cable to my mac
mini running osx 10.5. I want to use the same machine for 1-wire since
it's the only machine I have at home that is on all the time.

Since I want to use switches (mostly as on/off sensors for a couple of
things, like my heating system) I understood I couldn't use digitemp
(which does now build on osx by default) so owfs it is.

After... some work... I got owfs to build and even work with macfuse
from macports (fuse isn't, as the owfs web pages claim, linux specific
any more). The python examples (I want to continue to use python since
that's what I wrote my currentcost stuff in) didn't work however.

Luckily for me some searching found this message posted before I
joined the list:
so I rolled back to p29 and python access works, owfs works, owhttpd
doesn't build but I don't intend to use it anyway.

In building I had to turn off zeroconf (it caused link errors that I
didn't track down since I don't want to use it anyway), install
macfuse, python25 (I didn't test with the system standard python),
gsed and libusb-compat from macports and fix some linuxisms and
libtool's config was broken (it had the mac specific config variables
in the file... immediately followed by linux x86 config variables
which overrode them).

What fixed most source issues was:
 #define _DARWIN_C_SOURCE 1
which should probably go into configure and be #ifdefed in config.h.

For libusb all uses of usb.h should include <sys/types.h> first...
I found it easier to just add <sys/types.h> to /opt/local/include/usb.h
because i was being lazy.

I haven't found proper fixes for a lot of these problems, thus far
I've just automated getting it to the point of building and working
and thought others may find it useful if something similar hasn't been
posted already (I couldn't find a guide to getting recent owfs working
on OSX). My fix/build script is here:


Previous page: Alias improved
Next page: NetBSD