Weather station reporting

I recently put my AcuRite weather station back up after having it sitting in the garage for a year or so.  I have the Internet Bridge, which recently got a firmware update, and wanted to have it reporting to both AcuRite and Weather Underground.

AcuRite’s site will apparently update WU, but only at 15 minute intervals.  And, I wanted to also collect the data locally so I can feed it into Splunk or some other tool for my own use.

Problem is, the AcuRite gateway box only sends data (via HTTP GET) to one fixed hostname that’s hard coded, hubapi.myacurite.com.  SO…  first we intercept those DNS calls to send them where we want them.  In named.conf:

acl wxbridge-only {
        ip.of.wx.bridge/32;
};

view "wxbridge-view" {
        match-clients { wxbridge-only; };
        zone "hubapi.myacurite.com" {
                type master;
                file "hubapi.myacurite.com";
        };
};

And the zone file:

$TTL 14400
@               IN      SOA     localhost. dale.botkin.org. (
                                2016081803
                                3600
                                3600
                                604800
                                14400 )

@               IN      NS      localhost.

hubapi.myacurite.com.   IN      A       ip.of.local.server;

Now the weather bridge, and ONLY the weather bridge, gets your local machine’s IP address for hubapi.myacurite.com.  So next we create a PHP script and use Apache to point /weatherstation to it (ScriptAlias /weatherstation /var/www/cgi-bin/updateweatherstation.php in my case).  The script sends the original HTTP request to hubapi.myacurite.com, then reformats it and sends it to wunderground.com.  It’s also preserved in the Apache access log, so you can ingest it into Splunk.  You could also syslog it or write it to a file, whatever you want.  I started out using a script I found that Pat O’Brien had written, but ended up rewriting it almost entirely.  It’s been years since I wrote a PHP script.

<?php
 // First send it to AcuRite, no massaging needed...
 $acurite = file_get_contents("http://hubapi.myacurite.com/weatherstation/updateweatherstation?" . $_SERVER['QUERY_STRING']);
 echo $acurite;
 // Now re-format for wunderground.com. We don't always
 // get every parameter, so only send those we do get and
 // strip out those that wunderground won't accept.
 $msg = "";
 $winddir = (isset($_GET['winddir']) ? "&winddir=".$_GET['winddir'] : null);
 $windspeedmph = (isset($_GET['windspeedmph']) ? "&windspeedmph=".$_GET['windspeedmph'] : null);
 $humidity = (isset($_GET['humidity']) ? "&humidity=".$_GET['humidity'] : null);
 $tempf = (isset($_GET['tempf']) ? "&tempf=".$_GET['tempf'] : null);
 $rainin = (isset($_GET['rainin']) ? "&rainin=".$_GET['rainin'] : null);
 $dailyrainin = (isset($_GET['dailyrainin']) ? "&dailyrainin=".$_GET['dailyrainin'] : null);
 $baromin = (isset($_GET['baromin']) ? "&baromin=".$_GET['baromin'] : null);
 $dewptf = (isset($_GET['dewptf']) ? "&dewpointf=".$_GET['dewptf'] : null);
 $msg .= "dateutc=now";
 $msg .= "&action=updateraw";
 $msg .= "&ID=<your weather station ID here>";
 $msg .= "&PASSWORD=<your weather station password here>";
 $msg .= $winddir;
 $msg .= $windspeedmph;
 $msg .= $humidity;
 $msg .= $tempf;
 $msg .= $rainin;
 $msg .= $dailyrainin;
 $msg .= $baromin;
 $msg .= $dewptf;
 $msg .= PHP_EOL;
 $wunderground = file_get_contents("http://rtupdate.wunderground.com/weatherstation/updateweatherstation.php?".$msg);
 // Let's log any failures with the original message, what we sent,
 // and the response we got:
 if(trim($wunderground) !=  "success" ) {
 openlog('weatherupdate', LOG_NDELAY, LOG_USER);
 syslog(LOG_NOTICE, $_SERVER['QUERY_STRING']);
 syslog(LOG_NOTICE, $msg);
 syslog(LOG_NOTICE, $wunderground);
 }
?>

So far it’s been working fine for a couple of days. I have noticed that the AcuRite 5-in-one station will go for extended periods without sending some data – it seems like it only sends what has changed, or what has changed with seemingly random pieces of information.  For example, it may send the barometric pressure even if it hasn’t changed, but not the temperature or wind direction if they’re stable.  It’s weird.  Of course now I understand why they only send periodic updates to Weather Underground.  AcuRite’s own site seems to mask this behavior, but Weather Underground does not.  I’m thinking about keeping a persistent state file and sending every parameter with every update, or collecting updates and just sending WU a digest every minute or two.  But that’s a project for another day.

 

Neato vs. Roomba

I had a chance to pick up a Roomba 550 for $75, in really good shape other than a weak battery.  Our Neato does a great job, but we can’t let it clean the living room because it seems all the furniture is just the wrong height.  Poor little Rosie will get jammed under every piece of furniture.  The Roomba is half an inch shorter, so it’s able to get under more stuff without jamming.  So here’s a rare opportunity to see a side by side comparison of the two leading floor cleaning robots…

[Update: I replaced the original battery with a new 4500 mAH NiMH for about $35.  I also installed a new brush, since the one that was in it was pretty worn.  Results are reflected below.]

[table id=3 /]

A new regulator for the Rotax 912

Depending on whom you listen to, the Ducati regulator supplied with the Rotax 912 ULS in the RV-12 is either a good, solid piece of equipment or a failure just waiting to happen.  I have not had mine fail, but I have noticed that the charging voltage is a little low.  I don’t think I have ever seen it above 13.7 V while in flight, and it’s lower on the ground.  Given that Odyssey recommends 14.2 to 14.7 V charge voltage, I’d like to see it a little higher to get as much life out of the battery as possible.

I’ve read quite a bit on VAF about replacing the original regulator with one designed for John Deere garden tractors.  The compatible John Deere part number is AM101406, and aftermarket replacements are readily available.  They’re everywhere, as a matter of fact.  As it turns out, it seems to be a pretty popular regulator for other applications as well.  At $30 a pop or so, delivered, they’re pretty inexpensive as well.  The only challenge is mounting it, since the hole spacing on the Ducati is wider than the JD item.  The Ducati regulator is about 3-5/8″ between the hole, while the JD replacement item is more like 2-3/8″.

There are several ways to skin this cat.  Some guys have installed an additional nut plate.  My plane is built and I really don’t want that hassle.  I wanted to use the hardware I had on hand, and be able to switch back to the original regulator if needed.  Since mine has not failed, it will be fine to use as a spare.

Below are pictures of a mounting plate that I fabricated from some .125″ stock I had on hand.  Actually it was part of a piece of AL angle stock, with one side cut off with a band saw.  I marked and drilled holes to match the Ducati regulator, then counterbored 1/2″ holes on the bottom to clear a pair of AN3 bolts I had on hand that just happened to be exactly the length I needed.  This mounting plate allows me to use the original pair of bolts to mount the assembly in the plane, and if it ever becomes necessary I can drop in the original regulator with the same bolts.

A brief ground run confirmed that the charge voltage holds steady at 14.2 V down to about 1700 RPM or so, where it drops off slightly.  I noticed none of the voltage fluctuation I have seen with the Ducati regulator.  I’ll throw the original in the plane for a while just in case, but so far it’s looking good.

A week of Real Appeal

Well, I just finished out my first week on the new Real Appeal diet & fitness plan.  I didn’t have a great increase in exercise.  I got out and walked with the dog a couple of times, which is twice more than the weeks previous.  Figure a little under 2 miles each time, which is not a whole lot of walking.  There’s an app for my phone and tablet that lets me track everything I eat and drink, and I’ve been using that as close to 100% of the time as possible.  That has been a big help in figuring out what foods are better and which ones are worse as far as calories, fat, protein, etc.  It even has a bar code scanner to pull up information on most stuff that’s packaged.

The end result…  I’m down 5# from when I started.  That in itself is not shocking or cause for wild celebration, I’ve lost 5# in a week many times.  Always the same 5#, though.  The biggest change I have noticed is the consistency of results.  Before starting the program, when I was trying to do this on my own, I’d weigh myself every couple of days.  Some days I was down, some days I was up, but always bouncing within a 5-6 pound range.  That’s been going on for a couple of years now.  Over the past week I’ve been down consistently every time I stepped on the scale, no exceptions.

So, so far so good.  We’ll see how well I’m able to keep it up.  The biggest difference is that I’ve got a consistent (but non-annoying) level of motivation and encouragement to watch what I’m eating, keep the snacking down within reason, etc.  The calories set are entirely reasonable, and I don’t feel like I’m having to cut way back on eating.  In fact, I usually eat less than the plan recommends.  I just have a little better and more consistent control.

My First Condition Inspection

Well, it’s time to do the first condition inspection on the RV-12.  A lot of the work to be done has already been done as I did various repairs and upgrades, but nonetheless I’m going through the entire inspection from start to finish so I don’t miss anything.

Last night I started out by removing the external panels needed to do the inspection.  Inspection covers, top and bottom cowl and the tail fairing all came off.  I’ll do the wheel pants after the plane is up on the maintenance stands, which will be after I get a helper to help me pull the wings yet again.  I pulled and inspected all eight spark plugs – no surprises there, they look fine with a little bit of lead deposits.  No oil, no carbon, good color.  I didn’t measure the gap but will do that before pitching them.

I measured the coolant hoses I’ll need to replace, and ordered what I hope are all of the firewall-forward parts I’ll need.  This is not only the first condition inspection I’m doing, but also the 5-year point for the engine.  Rotax specifies a lot of parts to replace at the 5-year mark.  While these part replacements are not mandatory foe E-LSA, but I plan to do them in the interest of safety and reliability.  I have ordered new conductive Teflon fuel lines, a new mechanical fuel pump, new coolant hoses, the 5-year carburetor replacement parts, etc.  Today I’ll order the hose clamp tool I’ll need, as well as some upgrade parts I want to install during the annual.

 

Back at it again

Well, I was finally able to get some flying in this weekend.  The plane was gone for a month, then between lousy weather and some repairs ad modifications I was working on I had it down for a couple more weeks.  Finally on Saturday I put it all back together.  Pete helped me put the wings back on, and I was able to get out Sunday and do some flying.  I made a total of three flights, with some weather delays and checking in between to make sure my oil and coolant levels were OK, etc.

I did a total of nine landings.  it was a little gusty, which made it challenging to fly a consistent pattern.  Of course having not flown for a while made it even more challenging.  Of the nine landings I did, only one was truly crappy – I had a significant gust and some wind shear on very short final that increased the “pucker factor” for a few seconds, and the end result was not entirely graceful.  I’m OK with the overall results though.  Not entirely satisfied; I’ll be getting more practice in so I can improve on the consistency and accuracy of my landings.  I also want to start working on my “spot landing” skills in preparation for flying to Oshkosh for Airventure.  I know it just takes practice, and the weather is gradually improving to the point where I’ll be able to get more flying time in.

In the mean time, I’ll be re-entering the customizations that had been made to the Dynon D180 EFIS.  The software update that I did to fix an autopilot nav disconnect issue reset everything to factory settings.  Seriously, who does that?  Everything down to the fuel flow K-factor was wiped.  Now I’m getting high fuel flow alarms that won’t go away until I’ve figured out the correction factor to use.  I’ll take a look at the laptop I used to do the backup and upgrade, maybe those settings were preserved in the backup and I’ll be able to retrieve them.  Maybe.  I’m not holding my breath.

I’ve also decided to go ahead and build a new canopy for the Canary.  It won’t be cheap, but it will be done right and hopefully will look better as well.  On the bright side, once I have the building work done I can put the old one back on the plane while doing the finish work on the new one.  I’ll still have the plane out of service for a while, but not a long.  And I can replace that horrible rear window while I’m at it.

It’s going to be a busy and expensive Spring.

USB charging for the RV-12

I decided that the only thing I would ever use the 12V power point in my RV-12 for would be to plug in USB power supplies.  So, I figured, why not bypass the middleman and just install a USB charging plug?

It’s trivially easy to find a dual-outlet USB charging jack with the same form factor as the Van’s supplied 12V outlet.  The only downside I could find was a constant 10-15 mA current draw.  The USB power point is a switching regulator and an LED.  Even after clipping one lead to the LED it still draws about 10 mA.  Now, normally the 12V power point is wired directly to the battery positive terminal with an in-line fuse holder.  It would probably take a long time for that 10-15 mA drain to make a real impact on the capacity of the PC680 battery in the RV-12.  It would only be a factor if the battery were weak anyway — precisely when you don’t want any excess drain.  Plus, the old repair guy in me just doesn’t like the idea of cheaply produced electronics left under power all the time, unattended in an airplane parked in a hangar.  Just to be sure I could shut everything off, I moved the supply lead from the positive battery terminal to the switched side (inboard side) of the master contactor.  Now I have USB power controlled by the master switch.

It may be that at some point I will want to plug in something that requires 12 V – like a tire inflator, for example.  I plan to put some leads and small battery clamps on the old power point and keep it around just in case.

ADS-B followup

Fun stuff…  so I’m playing around with several different aviation apps on my Android tablet, with a Stratux setup just sitting on the window sill of the spare bedroom where it can “see” enough GPS satellites to get a position fix.  I’ve got one SDR radio receiver on it, set up for 1090 MHz to catch transponders in passing aircraft.  I went in to plug the power in to charge the tablet — I’d left it in there overnight — and saw half a dozen targets displayed.  I zoomed in a little and there’s an American flight at 31,000… A Virgin flight headed for Newark…  Hey, wait a minute — one looks familiar!

Screenshot_2016-03-16-13-01-03

N151MH – a friend and fellow EAA Chapter 80 member, out in his ADS-B “out” equipped RV-12.  Absolutely beautiful day for it, too!  Have fun, Mike!