Welcome to It-Slav.Net blog
Peter Andersson
peter@it-slav.net

I've already got a female to worry about. Her name is the Enterprise.
-- Kirk, "The Corbomite Maneuver", stardate 1514.0
05
Apr

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

 

Share

Leave a Reply


seven × = 42





Book reviews
FreePBX 2.5
Powerful Telephony Solutions






Asterisk 1.6
Build a feature rich telephony system with Asterisk






Learning NAGIOS 3.0





Cacti 0.8 Network Monitoring,
Monitor your network with ease!