Garage Door, meet Pebble Watch

2015-03-17 19.13.14

I love remote-controlling things.  Last week I made my Pebble Watch control our garage door.  Here’s how:

 

The Garage Door

To open and close the garage door I used a Raspberry Pi A+ computer connected to a 5 volt relay.  I found a great tutorial on Instructables.com and followed it to the letter.  It takes about an hour to set up.

Screenshot 2015-04-08 22.29.26

The tutorial leads you through configuring your Raspberry Pi as a web server on your local network.  The author provides his code for a hosted web page with a single button.  When you click on the button it tells the Raspberry Pi to briefly complete the relay circuit (like pushing your garage door’s button).

Voila!  You can control your garage door from a website in your house.  Now let’s get that control on your wrist ;-)

 

Adjusting the Website

Let’s take a closer look at the code in the instructable.  In the index.php file (the main page for the website) we can see the PHP code that fires the relay on button click:

 

The code is saying “when the ‘trigger’ (website button) is pushed, change the GPIO pin 7 (output pin on the Raspberry Pi that we have the relay plugged into) to on for 1,000,000 microseconds (1 second)”

Well this is great for controlling the door from a website, but how do we do it from our watch?

I started playing with the Pebble Watch SDK and found that with Pebble.js you can make AJAX calls super easily.  Huzzah!

Side-note: Pebble’s new web-based SDK CloudPebble is awesome.  You can write and deploy apps from within a browser and they install over the web to your smartphone, and then via bluetooth to your watch.  Welcome to 2015.

If we can make AJAX calls from our watch with Pebble.js, that means we can make a watch app that loads our Raspberry Pi’s website.  We’ll be in business if we create a special webpage on the Raspberry Pi that auto-opens the garage door when the page is loaded!

I copied the index.php page and renamed it to ‘auto.php’, then removed the IF statement in the PHP so the GPIO pin is set on page-load instead of button-click.

 

Now when you load the page, the garage opens.  Whoop!

 

Pebble Watch Control

I signed up with CloudPebble and turned Developer Mode ON in my Pebble App on my iPhone.  Then I wrote a very simple Pebble.js app that makes an AJAX GET request to the auto.php page when it’s opened.

 

Once you install the app on your Pebble, you should be able to open your garage door from your watch.  Boom!

 

‘Better’ Security 

I’m still pretty new to web development, but I know that having a page with this much physical world power, even if it’s only available on our local network, is not a good idea.  To make my system a teeny bit more secure, I added a URL Parameter password to the auto.php page:

 

Now, if a user visits our Raspberry Pi’s auto.php page, they’ll see “You’ve entered the wrong password”.  But if they add “?pw=ooglyboogly” to the end of the URL, the door will open!

Adjusting this on the Pebble App is as simple as changing the URL that the AJAX request uses.

Thanks for reading!

 

 

Summer Web Projects

My 2011 summer was superb. It involved a lot of outdoor adventures including hiking, mountain biking, paragliding, and exploring condemned buildings. More on that to come.

One of my work projects this summer was developing a website for an office complex in downtown Anchorage that just got a huge solar retrofit. The building now has 96 solar panels on its south wall that are rated at 180W each. The system has a potential output of 17.28 kW!

Along with building the website, I installed the monitoring hardware and software for the solar system. This keeps track of how much energy is being produced in real-time. A lot of the monitoring data is on the website, and it updates as often as every 10 minutes.

The website is nearly complete. The last thing being developed is a custom graphing system for the solar power data. The current graphs on the Solar Power Output page are provided by the software that comes with the monitoring hardware. Unfortunately these are not very appealing visually, and they aren’t as flexible as I’d like. The new graphs will be gorgeous.

Take a look at www.AnchorageSolarBuilding.com!

     

PhotoRotate is now Free

PhotoRotate has been an excellent starting app project. It taught me about taking an application from concept to market. I learned how to build software with a team, and I enjoyed every bit of it.

Now, the full PhotoRotate version is free on the app store. The app lets you rotate pictures, adjust their brightness, and adjust their contrast. The interface is dead simple.

Enjoy!

Goal0 Solar Panel and Battery

A few weeks ago I picked up a Goal0 solar panel and battery pack for the 970to907 road trip.

The solar panel is flexible and encased in fabric, so it’s very durable. The output is 13.5Watts. The battery is also very durable and has 50 Watt-hours of capacity. As a reference point, the iPad 2 battery is 25Watt-Hour, and the iPad will run for 10 hours on that. So this battery pack could hypothetically power the iPad for 20 hours from a full charge; that 20 hours doesn’t factor in more charge coming from the solar panel.

The Goal0 team has been extremely helpful in getting me a great setup for the road trip. This panel and battery will also be practical for charging my MacBook Pro on the go or at home.

Fast is Featured, and is Climbing in Rank

A bit earlier this week, my iPhone app ‘Fast, a Speedometer’ got featured in the What’s Hot section of the Navigation category. Being featured in What’s Hot, Fast will appear frequently on the front page of the Navigation page on the App Store!

Like this! (from earlier today)

Since the feature, Fast has jumped hugely in ranking. On Tuesday, Fast ended the day in 96th place for Paid Apps in the Navigation category. By Wednesday night, Fast had climbed to 44th place – a 52 rank jump! Now, on Thursday night – entering Friday, Fast is in 37th place. Woohoo!

If you’re looking through the App Store on your iPhone, Apps are shown in pages of 25. Currently Fast is right in the center of the second page. I believe that being on the first page of apps in the iPhone view would continue to push Fast up, and sustain it in the high ranks. Hopefully it gets there!

New and Noteworthy? I think so!

Just as I was writing my last post about rankings, I opened iTunes to grab a link to the Navigation category under iPhone apps.  On the main page for Navigation, I happened to see a screenshot for Fast!

Here it is! Fast is in the New and Noteworthy section in the Navigation category on the App Store. Hopefully this will keep us high in the ranks!

Fast is in the top 100 paid Navigation Apps!

Fast has had a wonderful start in the App Store. In its first four days in the store, Fast had twice the downloads that PhotoRotate had received in the past month. I’m very excited to say the least!

With the initial success from Fast, I signed up for a paid account with AppFigures (well worth it!) and I’ve started following my apps’ rankings in the App Store.

Fast got off to a marvelous start, rising to 36th place in the Navigation category for paid iPhone apps in just the first few days. The ranking has dropped a bit from its place in the 30s, but Fast has maintained its place in the top 100, and at most times it is in the top 75.

Ranking is updated on an hourly basis, so I now find myself glued to AppFigures. Checking these analytics is both tremendously fun, and quite tormenting. But I love it.

Fast, now on the App Store!

 

Fast, my speedometer app for iPhone, has been approved and is now in the App Store!

Fast has a beautiful interface. There is both a digital readout and a classic speedometer gauge. Along with being a great speedometer, Fast will also keep track of your top speed. You can put your iPhone in your pocket while skiing, snowboarding, biking or anything – and check how fast you’ve gone once you are done.

I was skiing with my father and some friends today. We used the Top Speed feature to track ourselves. I was able to clock 44MPH. My dad’s friend hit 56MPH. (I’m just getting back on skis after snowboarding for 11 years).

Want a free download of Fast? Just let me know and I’ll get you a promotional code. All you have to do is leave a review once you’ve tried the app!

 

The Helicopter!

We have a new app in the mix. This one is a game, and it’s called The Helicopter.

The Helicopter has a great story behind it and a bunch of neat features that I think will make it one of the best games in the App Store. I can’t say TOO much about gameplay yet, but we just got the official app website set up at TheHelicopterApp.com. You can also check our updates on Twitter at @helicopterapp.

As we progress in development the website will be host to game screenshots, explaining our progress, discussions about features, recruiting beta testers, and more. If you’re interested, make sure to follow the twitter feed or the RSS from the website.

I’m working very hard on The Helicopter, as are my teammates Ben and Connor. We’re dedicated to making a kickass game for the iPhone and iPod touch.