Got My Sensibo Kit!

If you follow my blog for a while, you know I’m a big fan of home automation. Especially controlling the A/C from anywhere.

I was excited to learn about the Sensibo Indiegogo campaign last year, and thrilled to receive my Sensibo Kit last week!

The Sensibo kit let’s you control your A/C from anywhere. This is similar the my A/C control project, only done professionally πŸ™‚ .

The kit includes a small hub that connects to the home router, a tiny pod, and free Android & iOS apps. After setting it up, I can easily control my A/C from the phone app from anywhere, which is so great! Nothing like coming back to a pre-cooled house from the blazing Israeli summer πŸ™‚ . There’s even IFTTT support, enabling automatic house-pre-cooling whenever I approach home!

Continue Reading…

Sort Your Include Files!

The Google C++ Style Guide defines a guideline for names and order of includes. It occurred to me that grouping and sorting include files is tedious and error prone, and a computer can do it much better. So I wrote a script that does exactly that πŸ™‚ .

The nitpick script is available on my GitHub cpplint fork.

If you’re comfortable with Python, you can figure out the script straight from nitpick.py source code and the accompanying unit tests. You can also read the rest of the post for some plain English review πŸ™‚ .

Continue Reading…

A/C Control Project: Bringing it all Together

I have central air-conditioning in my apartment. It’s controlled by a remote, using IR signals to send commands to the A/C control unit.

As any decent geek would, I’d like to be able to control my A/C using other means (e.g., a smartphone).

In previous posts, I went into great detail on specific aspects of this project, like using an Arduino to decode and send A/C commands, and recognizing A/C beeps for feedback.

The last part in the puzzle is making all the pieces play nice with each other, and finally accomplish the intended goal – Controlling the A/C at home with the smartphone from anywhere over the Internet!

How was that accomplished?

An always-on computer in the apartment is running a web server accessible from the Internet, serving an “A/C-control site” (screenshot above from Android smartphone). The site is developed with the Django web framework and Bootstrap front-end framework.

The controls in the web-app are associated with server-side Python functions, that pass the parameters to an RPC server that talks with the Arduino that is connected to its USB port.

The RPC server uses the Arduino to send commands to the A/C based on the parameters it received from the web-app, and uses the microphone to verify that the commands were transmitted successfully.

As usual, the rest of this post provides in-depth description of what I’ve done. The actual projects are available on GitHub (web-app project, and RPC-server project) for anyone to fork, clone, tinker and use.

Continue Reading…

Using “Beeps” for Feedback from A/C commands

I have central air-conditioning in my apartment, and it’s controlled by a remote, employing IR signals to send commands to the A/C control unit.

As any decent geek would, I’d like to be able to control my A/C using other means (e.g., a smartphone).

In a previous post, I covered thoroughly the details of using an Arduino to send IR signals to the A/C instead of the remote – but if I’m far away, how can I know if the command was received and executed by the A/C successfully?

Well, given that the A/C control unit beeps when it receives and executes a command, I thought I might take advantage of that – and virtually “listen for beeps” after sending A/C commands to verify successful execution!

The short version: A laptop running Ubuntu Linux is located in hearing distance from the A/C. Just before sending a signal from the Arduino, the laptop starts listening on the microphone (using the PyAlsaAudio library). It calculates Fourier transforms over the recorded audio sample, and measures the power around the beep central frequency (4100Hz), looking for power-peaks that correlate to a beep.

For the longer, detailed, version – do read on!

Also, check out the code that implements this on GitHub.

(nitpicks-alert: while I am aware that “power” and “energy” are different things, I am using the terms loosely and interchangeably throughout the post. please forgive me.)

Continue Reading…

Controlling My A/C With an Arduino

I have central air-conditioning in my apartment, and it’s controlled by a remote, employing IR signals to send commands to the A/C control unit.

As any decent geek would, I’d like to be able to control my A/C using other means (e.g., a smartphone).

In a previous post, I went into detail about reverse engineering the remote. Now it’s time to proceed to actually using these powers to replace the original A/C remote with my own Arduino-controlled thingie!

The gist: using an Arduino Uno board with a IR-LED circuit (see below), along with Ken Shirriff’s Arduino IRremote library (slightly modified), I was able to transmit the A/C commands that were analyzed in the previous post in lieu of the original remote.

Keep reading for a full drill down, or jump straight into my home-control-arduino GitHub project for the actual code and documentation.

Continue Reading…

Using an Arduino to Reverse Engineer My A/C Remote

I have central air-conditioning in my apartment, and it’s controlled by a remote, employing IR signals to send commands to the A/C control unit.

As any decent geek would, I’d like to be able to control my A/C using other means (e.g., a smartphone).

Towards that goal, I figured I should first reverse engineer the IR commands the remote sends to the A/C, so I could later send these commands using other methods.

The gist: using an Arduino Uno board with a Phototransistor circuit (see below), I was able to obtain the IR waveform using Ken Shirriff’s Arduino IRremote library (slightly modified), and even graph these waveforms with Python’s matplotlib, as shown below.

Keep reading for a full drill down, or jump straight into my home-control-arduino GitHub project for the actual code and documentation.

Continue Reading…