Saturday, June 22, 2013

Washed the Solar Panels

I've been meaning to wash the panels for a while now, but a Google study I read said the gains were minimal. They've been installed for over three years and there's a good layer of dust and some bird poop on them. I'm sure if I cleaned them, I'd get some increased production. In June three years ago, we would occasionally get over 25 kWH per day. Now, we are seeing just over 22 kWH. That's a pretty bad drop, almost 12%! Panel output naturally degrades over its lifetime, but this exceeds what I should see (The panels are guaranteed to produce at least 90% of their wattage for 10 years and at least 80% for the 15 years after). I've been wasting money all this time! I finally got around to getting telescoping a car wash brush:

The brush extends to 75", but since the panels are on a 2nd story roof, I can only reach the first 8 panels without creeping near the edge of the roof. I ended up zip tying the brush to an extension pole we used for painting, and I was easily able to reach to the end of the 2nd row of panels. At 6AM this morning, I climbed up on the roof with the brush, the pole and the hose and washed away. In 15 minutes, I was done as well as I could be. The brush is very soft and there still seemed to be some dirt I wasn't able to scrub away, but it is a lot cleaner. Today will be cloudless and mild, like yesterday and the day before, so I'll be able to make a good comparison on the effects of the cleaning. So far, at 9AM, the panels are producing 2245 W and total power produced is 3.033 kWH. Compared to yesterday at 9AM, the panels were delivering 1965 W and had produced 2.574 kWH. Instantaneous output has gone up 14% and total production is up 17%. Pretty good! We'll see where the day's production ends up, and I'll post updates for below. It certainly looks like I'll be making periodic trips onto the roof to wash the panels.

% ChangeToday
% Change

Update: At the end of the day, 24.5 kWH of electricity were produced versus 21.99 kWH yesterday, an 11.4% increase. That's pretty significant. It's as if I added 2 more solar panels to the 16 we already have. The question is, when should I get back up there and clean them again? One interesting bit from the above table is that dirty panels are actually less productive in the morning and evening. In other words, the grime on the panels obstructs more sunlight when the sun is not directly above them. I'm sure there's some high school physics explanation behind that, but I'll let someone else figure it out :)

Monday, June 17, 2013

Major Milestones Along The Way

I was cleaning up some stuff in my office and came across the invoice for my JDS TimeCommanderPlus (TC+), and it made me think about how our HA system got where it is today. September 1995 - that's when the madness began. Although I was playing with some wireless X10 stuff a little earlier, the real automation started with the TC+. To this day, it's still chugging away, handling X10 and IR (with an IR-Xpander2), along with some digital inputs and a few relays.It was great, for a time. The TC+ native software package, WinEVM, was practically a Windows 3 program and never evolved beyond that. Not being a software guy, I was content to use the WinEVM point-and-clunk interface to write code (later dubbed "starglish" in reference to the follow on JDS Stargate) to download to the TC+. It had hooks to allow it to play sounds files on a serial connected host PC plus the ability to issue shell commands. I created a bunch of batch files to take advantage of that, but not much else.

A major leap forward came when I started beta testing a software package called starCOMPlus in 2001 (or was it 2000? I can't remember). starCOMPlus exposed all the devices in the TC+ through DCOM, allowing users to create standalone apps that can control and query all aspects of the TC+. It also gave the ability to create web interfaces, and I learned how to build ASP pages to control X10, relays and IR and read the digital and analog inputs. starCOMPlus also introduced what the developer called a "hosted" script, which also had access to the TC+ devices and would run while the app ran. It allowed offloading and expanding of functionality from the TC+ to the host computer using a "real" language (jScript or VBScript - I chose jScript). From there, the number things I could automate and interface to exploded.

In 2003, I stumbled upon xPLRioNet, an alternate server for the Rio Receiver (RR). The RR was one of the first networked MP3 players, and I had picked up a couple being liquidated around 2001. xPLRioNet (later called MediaNet), was the best of a few alternate RR servers. It featured this neat thing called xPL, that allowed status and control messages to be passed around my home LAN. As I found out, there were many xPL apps that expanded HA beyond what I had known. I could now have distributed nodes tied together by xPL. I was hooked.

Four years later, I figured out how to write an AJAX app, and put together the pieces of what became our floorplan GUI. During that process, I taught myself PHP, JavaScript, DOM manipulation and especially mySQL, which has become an integral part of our HA system. With xPL providing the first piece of a distributed HA system, mySQL became the persistent state of the system, accessible and changeable by any of the nodes. Now, I was no longer tied to having Windows nodes.

In early 2008, I started learning to write my first .NET app. I had been using a copy of HAL Deluxe that I had found on liquidation for about $10, but the user interface was a piece of crap. It was another point-and-clunker, so my first app exposed HAL's devices to a scripting engine (much like what starCOMPlus did for the TC+) and tied in xPL. While I was writing that app, I was also using that knowledge to write another app linking starCOMUltra (the sequel to starCOMPlus) to xPL & xAP, and building in another scripting engine. To that point, I had been using other apps to script xPL interactions: xPLHAL and xAP Floorplan. Neither provided the free-from scripting that starCOM* did and I craved, so I wrote my own. Once I got my feet wet in .NET, I was churning out applications like crazy & the functionality of our system took another exponential jump.

It has been been nearly non-stop HA since then (as you can see from all the blog entries), except for the work induced hiatus last year. As always, I'm on the lookout for new ideas to implement (although I'm notoriously frugal!).

Sunday, June 9, 2013

Selecting Music to Play on a Squeezebox Using Android Speech Recognition

This is a short clip showing two examples of using Android speech recognition to select music to play on a Squeezebox (actually SliMP3). It shows how the server side maintains context of the current operation. I ask it to play 30 Seconds to Mars, and the server queries the Logitech Music Server database for their albums. It returns them and my phone asks which album I want to listen to. I reply "This is War" and then am asked where I want the music played ("What zone?"), to which I answer guestroom. The server then queues up the album and launches it in the guestroom, turning on the SliMP3 and the powered speakers. In the second example, I tell it a particular album (Ride the Lightning) and location in one sentence. The requested album is launched in the guestroom.

On a related note, here's sample SL4A code that passes recognized speech to an IM address and speaks the responses received. It's the basis of what runs on my phone.

Saturday, June 8, 2013

New Toy: BeagleBone Black

It's been a while since I got a new toy and I've been eyeing a Raspberry Pi, for no other reason than everyone seems to have one. A few months ago, I read about the BeagleBone Black (BBB), a revised version of the BeagleBone with more power and a much cheaper price of $45, barely more than a Pi. Sold! I just had to find a place that had them in stock. I eventually found a site, Special Computing, that had the BBBs for $43 each (has since gone back to MSRP) with just $3 first class USPS shipping for 2 (I always tend to buy these type of gadgets in pairs for some reason - Quatech serial servers, Rio Receivers, 3Com Audreys, Insignia Infocasts, Seagate Dockstars...) I ordered them Sunday night, they shipped out Monday from Arizona and arrived at my office in Silicon Valley on Wednesday. It came too fast! I usually have time to do a bit of research to plot out what I'm going to do with my new toy before it arrives.

Last night, I finally had some spare cycles and got to work. I knew I didn't want to use the Angstrom Linux that comes pre-installed on the BBB - I wanted something with access to the most recent Linux packages. I figured I'd go for Ubuntu. I wanted to see how a desktop would run on it anyway. I went with a pre-built Ubuntu 13.04 image and followed these directions to install it on an 8GB microSD card I had lying around using my wife's Linux laptop. (Yes, I have my wife, and 10 and 12 year olds, running Ubuntu on their laptops instead of Windows!) Next thing was to get the BBB booting off the uSD card. Apparently, there's button on the BBB you push to force it to boot from the uSD instead of the onboard eMMC, but that's not going to work for unattended use. Instead, I found this method to easily get the BBB to automatically boot from the uSD card: connect the BBB to your computer like a USB drive, but instead of deleting the MLO file, I just renamed it - in case I want to boot from the eMMC in the future.

After disconnecting the BBB from my laptop, I put the uSD in it, powered it up and booted Ubuntu from the card. Shellinabox comes up by default allowing me to log into the BBB in a browser window. SSH didn't come up so I enabled that with "sudo update-rc.d ssh defaults" and went through the process of adding a user ("sudo adduser ...") and adding that user to the sudoers file. Then I set up a light window manager ("/bin/bash /boot/uboot/tools/ubuntu/"), installed vnc ("sudo apt-get install vnc4server") and setup VNC to use lxde. I also wanted bluetooth support ("sudo apt-get install bluez") and needed Python pexpect for a project I want to do (Python was already installed in the Ubuntu image). Pexpect came as a .deb file so I needed to installed dpkg ("sudo apt-get install dpkg") to be able to install pexpect ("sudo dpkg -i python-pexpect_2.4-1_all.deb").

That's how far I got last night. I was able to VNC in, see the lxde window manager come up, launch Chromium and log into GMail in slow motion. Web browsing seems a bit much for this platform. I have yet to hook it up to a monitor (I need to get a mini HDMI to HDMI cable). My immediate use will be to experiment with the TI SensorTags. The tags use bluetooth low energy (BLE), which is built into Linux kernels 3.5 and higher.