All posts by stephen

I'm a .NET developer and consultant living in Cincinnati, Ohio. I started the 33Snowflakes website to act as a platform for all the projects I've made and plan to make. The 33Snowflakes name is a mashup between the cheerful thought that we're all as unique as a snowflake, and the more dystopian reality that every person can be identified using just 33 bits.

HomeRemote V1.0 – Android and iPhone Apps Launched!

Over the last few months, I’ve gotten several requests to launch an iPhone version of the HomeRemote app which will connect to your existing Arduino server for controlling outlets and speakers. If you implemented this project already, you can just grab the new app(s) for a complete graphical redesign and more powerful settings.

Google Play
Apple iTunes


Key features of HomeRemote are:
- Control speaker zones through Arduino and Relay
- Control outlets using 315MHz RF Outlet modules

Controlling speakers and/or outlets requires an Arduino running the open source 33Snowflakes automation server.

Additional features include renaming Zones with a long press on any Zone name, and disabling unused Zones or unused modules from the Settings screen.

As before, the server and HomeRemote app code (built on Phonegap) will remain open source under the MIT License here on Bitbucket.

Please report any bugs to the Bitbucket page issue tracker.

Arduino Home Automation Docs Updated

I’ve made a major revision to the documentation for HomeRemote Home Automation over at Bitbucket, with changes for the Speaker Zone control and Outlet control sections.

There have been no functional changes to the web server code. I hope that the documentation changes (including diagrams) make it much easier for new users to get started with this project.

Take a look and let me know what you think!

Just as a teaser, check out the new App screenshot in the documentation. This is in anticipation of releasing completely new versions of the remote control App. They will be available soon on the iPhone and Android app stores simultaneously, and the announcement is currently pending Apple’s review/approval process.

Hackable Wireless Outlets in Home Depot

Saw these in the store yesterday near all the Christmas lights & extension cords…

The exact same outlets as I used in my Android controlled outlets project, which I was never really able to find a match on Amazon.

Android/Arduino Controlled Outlets Parts:

315 MHz Outlets (above)
Arduino with Ethernet/Wifi Shield
315 MHZ transmitter

Check out the blog post here for the detailed instructions and code.

Performance Tools Overview

Performance Monitoring Tools:

Uptime monitoring
Uptime Robot –
Uptime Robot monitors your websites every 5 minutes and alerts you if your sites are down.

Business / Website monitoring
Google Analytics –
Provides search engine information (keyword usage, click-through rate, etc.), details about your visitors, their browser, and their flow through your website, tracks conversions, and lots more. This is a powerful all-around monitoring tool.

Application Log Monitoring
Splunk –
Splunk aggregates data feeds from across sources, such as application logs, and provides dashboards, real-time and historical search, etc. Free and Enterprise versions.

Server Monitoring
Very capable server monitoring tools are built into the operating system.
Windows: Perfmon
Linux: Sar


Performance Optimization Tools

YSlow –
YSlow analyzes web pages and suggests ways to improve their performance based on a set of rules for high performance web pages. YSlow grades web page based on one of three predefined ruleset or a user-defined ruleset. It offers suggestions for improving the page’s performance, summarizes the page’s components, displays statistics about the page, etc.


Performance Testing Tools

JMeter –
The Apache JMeter™ desktop application is open source software, a 100% pure Java application designed to load test functional behavior and measure performance.
Other commercially available tools can integrate with a wider range of applications or provide more advanced monitoring/reporting, but this is a great tool for accomplishing the goal of load testing an application.


PowerPoint Presentation


Arduino/Android 4 Zone Speaker Selector

Here’s my write-up of an Arduino project that will enable speaker zone switching across your home WiFi network from your Android smartphone. A networked 4-zone speaker setup using Android as a remote control. Here are the instructions and code you need to do it too!

Watch the demo to see if it’ll do what you need (Youtube)

Speaker Selector – Overview

In theory, we have an impedance protector that is switched via relay rather than giant buttons. The relays are controlled by our smartphone, which is hitting the Arduino server. Simple!
So the real heavy lifter in the solution is the OSD ISS4 High Power 4-Zone Speaker Selector with Impedance Protection

This provides the 4 big resistors to add 4 speaker zones to your powered second zone (or first zone, even). The watts delivered to a speaker varies based on how many speakers you have turned on, because there are resistors that get turned on/off to keep your receiver/amplifier from frying (impedance protection). I’m starting to question whether I should have gone with 8 zones, and the same company has that option here.

OSD 4-Zone Speaker Selector Image

Update 10/30/13: The 4 zone device has been working great under pretty consistent use for 6 months now. Just wanted to chime in with that, since this plays a critical part of the switching setup.


Making the speaker selector work over the Internet

There’s a great pre-made relay module that I bought to simplify the construction of this whole thing. It is marketed as being Arduino compatible, but really anything with low voltage driver output would work, and it really simplifies the relays. SainSmart 8-Channel 5V Relay Module for Arduino

For four zones, it turns out you need 8 relays (4 left speakers & 4 right speakers). To each of the four contacts below each of the four switches, you’ll need to solder a cable. They’re using one switch to connect both the left and right speakers, so we’re going to have 16 solder points.

First zone is done:
First zone is soldered!

A more zoomed in view of the 4 solder points for each zone:
Up close of the first zone

Here it is hooked up:
Picture of the relay wiring

And the whole system:
Picture of the wired up system
(The breadboard just has a 315MHz transmitter, see my last blog post to find out why. The entire breadboard is completely optional for this project.)

I added the code to my Arduino webserver, which will handle requests at /speakerStatus to see which are active, and /speaker?zone=&state=<0/1> to turn a zone on/off.

Speaking of the Arduino, I used the Ethernet model rather than buying an Ethernet shield separately. I don’t know if that’s still being sold. I am planning to port the code over to Raspberry Pi this winter to act as a lower-cost, higher-feature server.

But for the time being, take a look at the Arduino server and Android app code on Bitbucket here!

Android App Speaker Selector

Along with all that, I created barebones Android app that will request those URLs for you with toggle buttons. Code for that is also in the above repo. In addition to the basic functionality – querying status and updating the zones, a long-press on a button will allow you to rename any zone.


Modernizing the audio receiver

To complete my houses audio setup, I bought a web-enabled receiver for my Pandora/Spotify playing. I timed it right and got a good deal on an end-of run of 2012 model for this receiver… this is the current version: Onkyo TX-NR535 5.2-Channel Network A/V Receiver

Of course it comes with an Android/iPhone app for remote control, to make this entire system complete! I’d say that Onkyo’s app for Android is pretty good, with a nice selection of internet radio options, Spotify being the one that sold it for me.

Bottom line… I can be in the basement and turn on my workout music without running upstairs to change any settings.

Android/Arduino RF Outlets Selector


Here’s a great little project I implemented with Arduino and Android – switching outlets from my smart phone!



I started with off the shelf RF Wireless Outlets. At $6 per outlet, they are a complete steal. I got lucky and found all 4 channels of these wireless/RF outlets at a local Big Lots:
Big Lots Outlets

Parts List:

Similar outlets on Amazon
And/Or here is an update, found the exact outlets at Home Depot: the indoor ones and also here are the indoor/outdoor ones. (Thanks Mr_Quagmire)

Compare that pricing to one unit of the Belkin WeMo Switch

Here’s a 315MHz Android-compatible transmitter/receiver on Amazon: SMAKN 315Mhz Rf Transmitter and Receiver Kit

All the code is on Bitbucket. That includes a simple remote control Android application (as seen in video).

And the brain it runs on (I used the Arduino Ethernet model, there may be better choices now…): Arduino Ethernets on Amazon

This is what the circuit looks like… very simple, just hook up the 4 pins of the transmitter to the correct place and you will be ready to load the code onto the Arduino!
Completed Circuit

The Arduino can hook up to your router via the Ethernet shield, and when it’s turned on will be running a web server at the URL: {IP address}/outlet?outlet={outlet}&channel={channel}&state={state}

And of course the Android comes in with a basic UI over top of those URL permutations, so you can click a toggle button for all the outlets, rename them, etc.

I based the code on a cool outlet project that was pretty mature, called RC Switch, but in Europe the RF protocols and outlets are a bit different. There was also a reference from Instructables, but those RF on/off timings didn’t match my outlets. If you don’t have luck with my code as-is, modify the pulse length timings to match what is found here. There may be more variants that look the same, as a lot of these outlet modules look the same but are rebranded.

Reverse Engineering / Troubleshooting

Hopefully during the project you can implement it in a straight-forward way, but if the same protocol does not control the relays, read on to how I troubleshot this project originally…
To figure out the problem above, I used the Arduino as a logic analyzer to figure out what exactly wasn’t working, and that was probably the most fun part of the project. I soldered leads onto the stock wireless remote to spy on the signal that was being transmitted, and saw the digital signal graph on my TV screen. Amazing! As a programmer, I forget sometimes that there is electricity flowing through everything and changing direction every few nanoseconds.

This Arduino logic analyzer is a great open-source code project, and saved me big time here. It has 500 kHz max resolution, but since there is only 1kb of RAM, you’re limited to 1024 samples. That resolution was actually so good, that the first few times I thought it wasn’t working… I was zoomed in too far and didn’t see any transitions. As soon as I zoomed out to 1 kHz, I saw everything! And 20 kHz was finally the sweet spot to measure the timings accurately.

This is how I instrumented the remote control for use with the logic analyzer. I soldered many jumpers onto the circuit — only 2 carried the signal I wanted. The orange wire, and the right-most white wire both had the correct waveform — though the white one was inverted. I also provided power from the Arduino, since the remote had a 12V battery, some traces might have been carrying too much juice for the Arduino!
Wireless Remote instrumented

Feel free to provide critique or suggestions!

Additional values for HTML rel tags

Apparently there are some new rel tags I’ve seen flying around the internet. rel=me. rel=author.

I’ve noticed that a lot of the trust-worthy “social” sites starting using the rel=me tag instead of the disappointing rel=nofollow.

So I’ve made sure to update my homepage, and update a lot of incoming links too. Hopefully the shift away from every link having nofollow will benefit legitimate blogs and websites representing real people who don’t blogspam daily. At least I can dream. Rankings for my name in search engines have fallen pretty drastically recently. I’ll make a followup to this if I see a noticeable boost.

Email Me

I finally decided to set up a mailserver for all of my domain-sponsored projects. This is really so I can send out a newsletter via mailchimp with a reply-to matching the domain name. Lame, but it only took 3 hours to pop my IMAP cherry.

And as always, I feel like the wizards who spent months/years programming this stuff are invincible.

Anyway, mail me: admin@ [this domain]