Thursday, March 10, 2016

Woodpeckers and Destruction

I don't really hate woodpeckers, but it gets real close. These winged engines of destruction are everywhere here, and constantly work to annoy and dismantle things. It's early spring here and the males are all out looking for girls. They do this by perching on my chimney caps (aluminum spark arrestors) and peck away in a particular rhythm.



Some woodpeckers sound like a machine gun, others peck 6-7 times then pause and repeat. Some do the three shot shuffle over and over. It appears that each chimney cap artist has his own riff and is very proud of it. All of them scared me at first, entertained me for a day or two, then just became annoying. Every morning begins with the staccato drum beat of some girl hunter seeking attention. I much prefer the neighbors rooster.

The noise of my chimney caps being pounded by a woodpecker carries a long way, and the jerk doing the pounding hopes it will attract a good looking gal woodpecker for amorous intent. If they do attract a female, then they get busy which leads to needing a place to nest. My winged pests are Gila (pronounced hee la) woodpeckers and often (too often) nest in holes in my precious Saguaro (pronounced saw wa ro) cactus. They actually drill holes in the side and move in; laying eggs and nurturing the next generation of annoying little flying cretins.



Sure, a BB gun and a little practice could lessen the impact, but not only were they here first, they are protected. Not sure why they are protected, there's about a hundred around here and more next door, but who's going to argue with a game and fish officer holding a ticket book? Someone told me they are classified as migratory and fall under some treaty or other that prohibits killing migratory non-game birds. Mine don't migrate any farther than the neighbors house; they're here all year. To be honest though, I have taken an air-soft gun and done a little target practice from time to time. Those things (air-soft guns) are horribly inaccurate at any distance and I never managed to hit one. It did teach the woodpeckers to fear me; when I walk outside, they're gone; off into the trees to screech at me to leave the area.

The little pests even hang off my hummingbird feeder and chase the hummingbirds away to keep the sugar water all to themselves. I had to stop putting bird seed out for the quail, dove and cactus wrens because it also attracted the woodpeckers. Once they got to hanging around the house, they decided to eat it.

I have vigas (pronounced vee gaa) sticking out of the house as decorations. They simulate the building techniques of the native builders of hundreds of years ago. The Spanish that came later adopted the same techniques and having logs sticking out of your house became something cool. The problem is that the woodpeckers began to drill holes in them. Once the holes penetrated the finish layer, the wood dried out and made the vigas sound hollow. When the woodpeckers hear a hollow spot, they assume there are bugs inside and drill away, which makes more spots dry out. Yep, a vicious cycle of destruction that leads to a viga that is full of cracks and holes eventually causing it to fall apart. I've repaired them several times over the years; once actually taking them down and filling all the cracks and holes with recommended wood repair materials and then putting them back up. I used really good elastomeric paint heavy caulking to keep the weather from eroding them.

Totally wasted effort, the woodpecker attacks destroyed them. Take a look at one of them:


Yes, all that damage was caused by the protected Gila woodpeckers around my place. Let me show you another one:



Notice there's no log end sticking out of the hole? That's because it finally dried up enough that the fasteners wouldn't hold it any more. It's on the ground broken and looking really sad.


Obviously, I'm losing my battle at protecting my vigas. I decided that wood just wasn't going to cut it; I needed some other solution. I considered forming sheet metal into a cylinder and putting that up, but I couldn't find a sheet metal shop that was cheap enough to do it, and the metal would look like ... well pipe sticking out of the house. Maybe I could cast them out of concrete and put that up. When I looked into that the mold became a nightmare of complexity. That kind of project should be left for something large and beautiful. Besides, concrete is really heavy. Then I went looking on the web for someone else that had this problem and it turned out there was a product that looked perfect.


This is a fake viga cast out of polyurethane foam. It looked like the perfect solution: Sun survival is relatively good, and excellent if there is a good paint protecting them. Light weight. Hollow so a mount can be put inside. They don't dry out. They look like wood if you are a few feet away. The only problem is they are a bit pricey and shipping is a factor because they are pretty big.

I ordered and received two of them to try out the idea. Of course, the first thing I did after unpacking was to flip one over to look at the insides.


The hollow interior is just perfect for making a mount. All I had to do was chop up a piece of pressure treated wood and mount it to the house, then slide the fake, er uh, faux viga over it and drive in a couple of screws.

After cutting out a bunch of debris from the hole, removing the sealing caulk from the edges I put my newly made mount in and shoved the faux viga into  the hole over the mount. A couple of weather proof screws later, it was mounted.


I still have to caulk around the edge and do some painting, but it worked. Based on experience, painted plastic lasts essentially forever in this desert, so the replacements should outlast me. If a woodpecker does poke a hole in it, I'll just fill it with silicon seal and paint over the spot. A simple once-a-year inspection should keep me from having this problem again. They won't mold, rot, attract termites; GREAT!

I still have the other one to install and then I'll order two more. My plan is to spread the cost over time replacing the worst of the originals with each order until I'm done and can stop worrying about woodpeckers destroying this part of my house.

Until the next battle with the vermin.

Wednesday, March 9, 2016

My Weather Station is Back Online

Yep, I got it working. About a week ago my weather station Raspberry Pi died, and predictably, I couldn't get it back up without major work <link>. It's all better now running on a Raspberry Pi model B. Yes, I know that isn't the latest of the Pi series, but I had it already, OK.

The Raspbian Jessie booted to a graphic user interface directly, not to a command line. This was a bit of a surprise because I usually bring up the Pi's I have headless so I don't have to hunt down enough equipment to bring them up on my TV. But, since I had the stuff handy from trying to get it working before I gave up and just reloaded, it came up and I configured it, then stopped the GUI. Loading the GUI makes the boot sequence much longer and I usually just use putty on a laptop to control these machines, I don't need it.

Contrary to many posts out there, the configuration screens worked just fine. I was able to assign a static IP address and finish the configuration easily. There was a little hunting through the various menus and icons to find things, but that's part and parcel of any first time installation.

But installing my stuff turned out to be somewhat harder than I expected because, as usual, every piece of supporting software had changed and I had to hunt down what I needed. I used the latest (as of the date on this post) version of libusb, it was 1.0.20, which was several versions later than the one that I would get from a normal apt-get on the Pi.

This version worked well and had a few 'gotchas's' in it that I had to stumble through to get it to work. There was enough documentation and forum postings out there that I found to help me through the process.

I also used the latest rtl-sdr. It was pretty easy as well, but also had a couple of things that I had to chase down. Then I loaded the version of rtl_433 that I had set aside so I wouldn't have to keep making my changes in that code. With the poking around I did in libusb and rtl-sdr, this piece was super simple.

I hooked them all together by starting things on the command line and it worked well. I was able to read the weatherhead RF signal and save it off to my database. The interface I have to move the data around for viewing worked just as it had before. The only thing left was to implement start up  and restart using systemd instead of upstart.

For those of you that wonder why I needed all this, let me describe what's going on a bit. The usb implementation on the Pi is kernal based and not easily modified by the user. That means I had to get libusb and install it. libusb is a user space interface to the usb capabilities on Linux. Then, I had to be able to read one of those sdr radios so I could find the RF signal from the AcuRite weatherhead. I posted about this earlier <link>. Now that I had the signal, decoding it requires rtl_433 which is a piece of software that was developed to decode the signals of many of the wireless devices available such as thermostats, temperature sensors, door bells, weatherheads, etc.

So, it's software piece piled on software piece piled on ... Sure, I could have incorporated all the things I needed into one piece of software and just ran it, but that's not what leveraging software is all about. You use the piece that does the job you need and add special tweaks specific to your implementation. That saves time and doesn't cost much if anything.

With it working and the only piece left being restarting the processes, I dived into systemd. First though, a tiny bit of background. Unix (and linux came from unix regardless of what people say) has to have something to get it going. This used to be the init process. Init would load the various pieces of software and handle how they interacted. Over time init was replaced with various other things that had more features or less bugs. As is rampant in unix and its derivatives, everyone hated something about each of them. Raspberry Pi uses an operating system called 'Raspbian' which is Debian modified to work specifically on the Pi. There are a ton of other operating systems and the choice of which one to actually use is totally up to the person that installs it. I chose to use Raspian because it was the one the folk that produced the Pi chose to supply. I figured it would have the most support and documentation of various forms over time.

The Raspian that I installed with my first Pi used Sys-V init. This system five init is really old and complex to use. I hate complex, so I replaced it with the clearly superior init process call 'upstart'. Upstart is cool and easy to use once you install it. However, the Debian folk decided that the init process 'systemd' was better and moved to it. Raspberry folk went with the trend and moved to it as well.

That was the decision point that caused me to have to rebuild the weather station Pi from scratch. Upstart wouldn't allow the Pi to boot up at all with the new Jessie level OS that you will get when you update your Pi. But, I did all that and now I faced the dreaded systemd configuration. I looked at about a hundred web sites that discussed how to use systemd to handle starting and restarting a process, and quite honestly, was about to give up because everything was too complex and peppered with 'try this' to give me enough confidence to dive in.

At this point I want to mention that following Linux questions on a forum is so predictable. Someone has a problem and asks for help with it. The first response is to ask for more information about how the system is set up, what they saw that wasn't mentioned in the question, and usually some test or other that can't be run because the problem won't let them. Then a response asking them what they are doing. Then a response that says they should be doing it another way because that way is so much better. Then several posts about how it should be done regardless of the original intent. Lastly, the thread ends with no resolution because the discussion has wandered off into never, never land.

I saw that over and over. I finally stumbled across a blog posting (love blog postings) that whittled all the crap down to something amazingly simple compared to what I had been clicking through for hours <link>. Neil cut all the crap out and just showed how to handle a simple case. I didn't have to dredge through long discussions of 'units' or 'forking' or relative merits of daemons; I could just take his example and use it. It worked first try for one of the processes and third try for the other.

Then I configured logrotate to handle the log files I use for debugging and I was done. Finally.

I still have to back up the SD card and store the image on my NAS, and I'll probably back up the other Pi's just to be somewhat safer (obviously you can't actually be 'safe'). I'll also update my github repo for the various things I changed along the way, but that won't assure me of no problems the next time, just make it somewhat easier to recover.

What will really make it easier the next time is what I learned this time.

Sunday, March 6, 2016

I Wanna Talk About My Neighbor and a Big Hole in the Ground

As I've driven you nuts with in the past, this is Arizona USA, and it gets hot here. That pushes our electric bills through the roof for about half of the year. Some of us are taking measures to lower this expense and still maintain a good standard of living. Doing this isn't cheap in the short term, and most of us that pursue lower costs hope to live long enough to recoup some of our outlay.

It's not likely, but it gives us hope.

I have a neighbor that is going for it in a big way. He's working on geothermal cooling for his house. Sure he could have hired a company to come out and destroy his property and put in some half-baked system that he didn't understand, but instead he bought a backhoe and went to work. In this description (I have his permission) I'm not going to mention how close a neighbor or give any directions to his place. I'm also not going to name him, we'll call him George for this discussion. It's not his desire to have a bunch of people stopping by to look at his work or some government official taking credit for it.

So, George got the idea when he put in a well without a well bottom pump. Instead he used air pumped down the hole to percolate the water a few hundred feet up a pipe into a storage tank. For those of you that understand this, that means no moving parts at all in the well; nothing to break or have to be removed periodically for maintenance. Slick and it works like a charm. He had a little trouble intially with the ground level compressor, but it's all worked out now and runs every day. This was a big win and will pay for itself (the pump part, not the water well) in a short time.

First, he has a huge obstacle to overcome - the heat. The hole can't be six feet deep and cool anything because, like the cold country, the surface temperature reaches down that far. He decided to go deeper and wind the hose that will carry the cooled fluid into a big pit. He'll then pump the cooling fluid up to a heat exchanger of some kind transferring the cool to potable water that can be used to condition the air in some fashion. Current thinking is to just use a swamp cooler and circulate the water with the geothermally cooled water.

His backhoe is bigger than mine and he started the project by digging a small area a couple of feet deep. If you've been a reader of mine, you know what the soil is like here. It's basically rock held together by caliche with a shallow layer of extremely sandy organics for a surface. I did a post about a simple one cubic foot  hole I dug and what I got out of it that you can look at to illustrate the situation <link>.  This led to changes in his technique, modifications to the backhoe, and tons of debris (literally tons).


Here's his backhoe and the really cool rock screen he made to separate the rocks from the finer material (can't call it soil). For those millennials out there, the backhoe is the thing with wheels. To use the screen he dumps the material he dug out on the far side and the small stuff falls through leaving the rocks behind. Then he takes the rocks and piles them somewhere out of the way. The small stuff he'll use to refill the hole.


This is the beginnings of the hole. Notice what I was writing about the composition of the ground: a tiny layer of sandy organics and rock bound caliche the rest of the way down. Ever wonder why the desert doesn't have trees? Now you know.


There was a big granite rock over there that had to be dug around.


And, sometimes, bad things happen to the equipment. This took some time to fix, and wasn't the only time the machine broke down. From the beginning of the project to now, he has rebuilt most of the digging parts of the tractor. Only minor problems with the motor, hydraulic pump, and such, but everything that came in contact with the dirt had some time wasting problem or other.

But, let's look at the hole again. Here it is a little deeper.



And, here it is finished.



Notice that it has a ramp leading down into it? That's so he can actually get the backhoe down into the hole to dig, and then get the dirt out. Also notice how the dirt layer seems pretty deep on the far side; that's where the rain washes down and carries some mud with it. This project has been going on for months, so some weathering is expected. Here's a shot of the bottom on the hole, he back filled it a little to cover the rocks.


Eventually, he'll install coils of flexible pipe in the hole, protect them to some degree and then fill the hole back in. Pumping water down into the pipe will circulate it through the cooler material down there, and then he will transfer the cool into his house. This will work to warm a house also, but not much need for that here. Bet you're wondering where the rocks I talked about are.


There's several piles like these; here's another one.



No, not all energy saving projects taken on by individuals are small. Sometimes to have an effect, you have to think bigger than a tiny computer and some wall switches. The beauty of doing this kind of thing is that your skill set increases exponentially. It makes you understand the reality of what can be accomplished.

I'll be following this project over the next months, more later.

Thursday, March 3, 2016

How Can I Possibly Be Annoyed at the Raspberry Pi

Yes, they're all over the place and my Google news feed keeps telling me about how wonderful they are, but I almost threw one across the room today. The story is that my weather station Pi lost its SD card; they do that sometimes due to the heavy usage the cards aren't designed for. I've had it happen before, and thought I was prepared this time. You guessed it, I wasn't.

Yes, I have backups of the system, and backups of the software; the problem is that I didn't expect the folk that control the Raspberry Pi software to close some doors on me. You see, after I decided to update and upgrade the OS on the Pi, it wouldn't boot. I like to stay reasonably up to date on my stuff, but often wait a while to get the latest OS and tool changes. With the other non-technical projects I've been working on, it's been a few months since I took the time to update the little machines. During this period Raspberry Pi went from Debian Wheezy to Jessie.

Besides the usual wondering who the heck thinks up these silly names, I thought now would be a good time to update my systems. That was my first mistake; my second was when I didn't read ALL about the changes in Jessie. You see, they decided to use 'systemd' as their default init process and I switched to upstart quite a while ago because it was better. There's a few hundred pages out there on what's best and why, but I don't really care about that; I just want something that works, and I can keep updated.

Fine, I'd switch to the default for the Debian Jessie, but you can't update over a Debian Wheezy that has upstart on it; that makes the machine unbootable. To add insult to injury, this all happened when I was trying to update Wheezy. They don't update Wheezy, they switched me over to Jessie and just left me hanging.

Literally. Yep, hanging on a console message with the machine unable to boot.

I know how to get out of this mess and catch my machines up to the latest, but I really hate having to do it. At least it was my weather station and not the control system for the house. So my plans are to update to Jessie, then load all the packages I use to run this stuff, and finally to update my startup scripts to use the init they want me to use. Probably about three or four days of fooling around for the weather station, then I get to do it all over again for the house controller.

I want to be up to date with the latest because, eventually, the Pi Zero will be back in stock and I really want to play with it. No, I won't worry about updating something that will become a control part inside something else; I'll just use it like some other chip. I'll have to be careful to isolate any code on one away from the OS and come up with ways of starting processes that don't involve the OS, essentially treating them like little black boxes. At $5, I won't much care if they fail and have to be replaced. Sort of takes some of the fun out of them though.

The very next iteration of my devices will NOT use the unix facilities to start and stop processes or to monitor what they do. I'm going back to basics and working out ways to handle it that don't rely on some programmers data politics.

Subject change. A few folk have expressed disappointment that I haven't been posting about my tractor rebuilding, dog door, trenching, culvert, and other projects for the last few months. When I told them that the projects weren't technical, they said, "So?" I didn't have an answer because I've written about rattlesnakes, dogs, shades on the patio, etc.

Sorry tech weenies, I'm going to go back to my old ways and talk about surviving in the desert with a bunch of technology included. It just may be hydraulics, water flow, pruning techniques and such as well as little tiny computers and hacking into strange devices. Heck, I may well post about the technical aspects of using snake shot to control the varmints that try to kill me, as well as my continuing war with woodpeckers.

But my Pi 3B is already on order.