Background
It is very handy to have a temprobe attached to network devices like a Wlan router, if OpenWRT is installed it is easy to use 1-wire devices. By using this method it is possible to create wireless temperature probes that uses Wlan.
Install
root@OpenWrt:~# opkg install owserver owfs
Using
root@OpenWrt:~# owserver -u -C --usb_regulartime -p 3001
root@OpenWrt:~# mkdir /mnt/1-wire
root@OpenWrt:~# owfs -s localhost:3001 -m /mnt/1-wire
root@OpenWrt:/mnt/1-wire/10.87507C010800# ls /mnt/1-wire/
10.87507C010800 81.543A2A000000 alarm bus.0 settings simultaneous statistics structure system uncached
It works!
To make sure that owserver starts when the router is rebooted, add to /etc/rc.local
/usr/bin/owserver -u -C --usb_regulartime -p 3001
Firewall
My op5 Monitor/Nagios system is on the Wan side of the OpeWRT box so I need to open the firewall to port 3001.
Add to /etc/config/firewall
#1-wire ok on Wan
config rule
option src wan
option dest_port 3001
option target ACCEPT
option proto tcp
Result
To gather the data from 1-wire I use op5 Monitor and my Nagios plugin check_1-wiretemp, the result can be seen below
Links
Leave a Reply
You must be logged in to post a comment.