Data collection from HAI Omni - recommendation

Here's the script I used to poll the OmniPro using the hai binary:

Code:
#!/bin/sh

# return thermo current temp
temp=$(/usr/local/bin/hai thermos | grep Temp | awk '{print $2}' | tr -d ",F")
echo $temp
echo $temp

# return uptime
uptime | sed 's:^.* up \(.*\), [0-9][0-9]* user.*$:\1:'

# return system name
uname -n

And this is the relevant section of the mrtg.conf:

Code:
# Dining Room thermostat current temp

Title[thermostat.current.temp]: Thermostat Current Temp
PageTop[thermostat.current.temp]: <H1>Thermostat Current Temp</H1>
MaxBytes[thermostat.current.temp]: 120
Target[thermostat.current.temp]: `/root/scripts/thermo_cur_temp.sh`
Options[thermostat.current.temp]: gauge, growright
LegendI[thermostat.current.temp]:  thermo temp (F)      
LegendO[thermostat.current.temp]:
Legend1[thermostat.current.temp]:  thermo temp (F)
Legend2[thermostat.current.temp]:                        
YLegend[thermostat.current.temp]: thermo temp (F)
ShortLegend[thermostat.current.temp]: F

This produced a nice chart like so:

thermostatcurrenttemp-year.png


I'm showing the yearly chart here but MRTG does daily, weekly and monthly charts as well. One thing I didn't like about this HAI binary is it requires you to store the keys to your OmniPro in a text file (at least I couldn't find any other way). I guess you could "chmod 600" but still a security concern especially if your computer/server is somehow exposed to the Internet.
 
Very nice Swaggy. Been playing with the Dockstar / Mimo TS setup. My original setup was to connect a 9097 to it - still moving in that direction but it would be great to connect the OPII panel to it also to get some basic status from it. I have both Temperature and Temp/humidity combos (inside and outside of the house) connected to the HAI OPII. I'm still playing with the TS calibration on the Mimo via the Dockstar...almost have it. Here's a couple of VNC pics of the Dockstar running XFCE connected to a Mimo 7" TS USB monitor. I installed a TS calibration program and the TS kind of works but its not right yet.
 

Attachments

  • XFCE-0.jpg
    XFCE-0.jpg
    24 KB · Views: 3
  • XFCE-1.jpg
    XFCE-1.jpg
    47.6 KB · Views: 3
Back
Top