To make my computer to be able to use the 1-wire protocol I’m using OWFS. The packages to get it running on CentOS5 or RHEL5 can be found here. It has several options and I like the client-server model mainly because it is easy to use the 1-wire stuff in perl in his case.
To start the owfs server I put the following line in /etc/rc.local
/usr/sbin/owserver -u -C --usb_regulartime -p 3001
A good idea to browse the 1-wire bus is to use owhttp and a webbrowser. Start the owhttpd with
/usr/sbin/owhttpd -s localhost:3001 -p 12345
and use a webbrowser to cennect to http://the-host-that-is-running-owhttpd:12345
If you prefer to use files to communicate with the 1-wire bus start the owfs with
/usr/sbin/owfs -s localhost:3001 -m /1-wire
Now you can read the temperature by running
# cat /1-wire/10.DEF05F010800/temperature
4.4375
So now I know that the outdoor temperature is 4.4 degrees Celcius.
One Response to “1-wire getting started”
Leave a Reply
You must be logged in to post a comment.
March 7th, 2009 at 10:30 pm
[…] succefully get your 1-wire bus working with OWFS and been able to read the temperatures, it is time to create […]