Hurricane Sandy came and went, and unfortunately 3 of the stations were down for it. The power supply in the West Parish computer died, so I swapped in a new one. I had to quickly relearn a Linux lesson about networking, where when you change a network card (even if it is part of the whole computer you are replacing) you need to correct the /etc/network/interfaces file and change everything to the new network card name. The old one was eth2 and the new one is eth4. I found that out by doing ifconfig -a. As soon as I did that and a quick restart the machine was up and uploading and happy. I also moved it to the room next door so hopefully it will receive better reception, since it is directly underneath the ISS. I also turned on the repeater function, so the room where it was will get better signal, I don’t know why I didn’t think of that one before!
Category Archives: Uncategorized
NOAA & Archive Data
After thinking about it, I finally set up symbolic links so when you goto the base wview site inside the Gloucester network you can find NOAA records, now I just have to figure out how to ftp them to danchase.net
For posterity the command was: ln -s /var/lib/wview/img/Archive/ Archive run from inside /var/www
Extended data on O’Maley
Got around to activating the UV sensor on the O’Maley VP2, it was surprisingly easy! Now I just have to find a place to put it’s graph.
Also, I’ve been trying to find ways to make an ‘HD’ weather graph by creating a MySql database with entries less then 5 minutes apart, which is what wview gives me. I found a package ‘VProweather’ which might do the trick. I was able to compile, but I havn’t tested it yet. http://www.curtronics.com/Weather/VProWeather/index.html
Progress!

MySQL and PHP
Now to design things: Right now wview on the local computers generate the webpages and images them upload them to the godaddy webserver. What might be interesting, and possible with MySQL, is to upload the
- database
to godaddy, and make dynamic php websites from that. This will let users pop up whatever data they want in any configuration. Users could even bring up multiple stations on one graph, this is interesting! And also a butt-load of work. Let us ponder…..
MySQL
I’ve been busy so I haven’t had as much time to devote to the weather stations. One thing I did kill a lot of time this weekend was the new charts. On the chart in the last post, the sample script was pulling all day from today (the day the script was run) which means if you checked it at 9am you would get 9 hours of data, if you checked it at 9pm you would get 21 hours of data. This seemed silly, so I tried and tried to get sqlite to give me 24 hours worth of data to no avail. Then I figured out this is why real applications don’t use sqlite, and real databases have built-in functions for this stuff. On top of this, wview has an export utility to dump the sqlite data into a MySQL database, so that’s what I did. Now I need to find out how to do MySQL queries since it is very different from sqlite, including having to deal with permissions and multiple databases. It also allows for much more like building it directly into a website and building quires on demand.
Much more learning ahead!
gnuplot
This thing is really frustrating but so satisfying when it works. Per John’s request I am making a chart with temp, pressure, and wind direction. I am going for a look like this guy http://www.tantonweather.com/ so I asked him and he suggested gnuplot and over the past 6 hours or so I think I figured it out! 
Now I just have to tweak it and redesign the website,
Sounds like a great excuse to blow off homework!
Here is the shell script I used to generate the above image:
!/bin/sh
TODAY=$(date +%Y-%m-%d)
#TODAY=”2012-01-21″
sqlite3 /var/lib/wview/archive/wview-archive.sdb <
.separator \t
SELECT dateTime(dateTime, 'unixepoch', 'localtime'),ROUND(outTemp,2),ROUND(pressure,2)
FROM archive WHERE DATE(dateTime, 'unixepoch', 'localtime') LIKE
'$TODAY';
SQL_ENTRY_TAG_1
cut -d" " -f2 /opt/test/todaytemp.tmp >/opt/test/todaytemp.txt
gnuplot -persist <
set timefmt “%H:%M:%S”
set term png size 1500, 1000
set output “todaytemp.png”
plot “/opt/test/todaytemp.txt” using 1:2 title ‘Outside Temp in Garage’ with lines, \
“/opt/test/todaytemp.txt” u 1:3 t ‘pressure’ w lines
quit
exit
Here are the database variables:
dateTime
usUnits
interval
barometer
pressure
altimeter
inTemp
outTemp
inHumidity
outHumidity
windSpeed
windGust
rainRate
rain
windchill
heatindex
ET
radiation
UV
rxCheckPercent
hail
hailRate
heatingTemp
heatingVoltage
supplyVoltage
referenceVoltage
windBatteryStatus
rainBatteryStatus
outTempBatteryStatus
inTempBatteryStatus
New system status page
Parameterlist.htm
This is a great feature of wview that I didn’t know of until a few minutes ago. It tells you every single piece of information wview can pull from the console, and more. It also was automatically uploaded to the danchase.net server and I didn’t even know it! At some point I will figure out a way to put everything on one page, but for now:
http://danchase.net/vweather/parameterlist.htm
http://danchase.net/bweather/parameterlist.htm
http://danchase.net/egweather/parameterlist.htm
http://danchase.net/oweather/parameterlist.htm
http://danchase.net/wpweather/parameterlist.htm
http://danchase.net/pcweather/parameterlist.htm
The most useful thing I have found on the list so far is the rxCheckPercent= bit, so now I know which stations are low, including Plum Cove and West Parish. Plum I can see, since the ISS in kinda far away from the computer, but West Parish is interesting. Maybe there is some sort of metal in the roof?
Things to do
Things to do with software UI:
Wind Direction and Baro on same page
Inside Temp and outside temp
Humidity and barometer & Wind direction on one graph
Have everything open in the same window, not new tabs / windows
Veterans wind, and batteries
Two discoveries today. First, anemometers are not supposed to wobble. The Veterans station came online for quite awhile today and yesterday to show that it wasn’t reporting wind speed, which is odd because it has been windy all weekend and I have been getting reports from the (working) weather stations. When I went over there you can see the anemometer wobble, so soon I hope to swap it out for the spare (the one that is pictured on top of this site at the moment).
Also, I had a problem with the test rig yesterday, I was running it on the cheap dollar store batteries that I soldered in in place of the lithium and it finally quit on me yesterday. I replaced it with some good energizer batteries and it was off and running. I wonder if that is a problem with the cheap batteries or all alkaline in general. I think I have heard alkalines will slowly give off less voltage when they start to run down, but a lithium will give almost full voltage until it cuts off sharply when it dies. Something to think of and look up.