CASTLE | Home Automation Done Right

CASTLE is a home automation hub that runs your house for you, letting you do what you want to do.

Similar projects worth following
A lot of home automation systems, while well-intention-ed, are gimmicky and ineffective when it comes to truly optimizing home living. They dodge the most quintessential home appliance schemes - like the kitchen or home theater ecosystems - and instead support expensive BT speakers and color-changing wireless light-bulbs. I want to change that with CASTLE, a truly non-invasive but entirely useful home automation hub.
CASTLE uses speech recognition to make automation convenient - an app-based system fails when the user isn't near her smartphone or is busy cooking, cleaning, and otherwise without a hand to spare. I've designed a speech interpretation system that should afford a level of natural conversation with the system; ambiguous or unfinished commands are clarified or corrected (i.e. 'turn that off' begets 'turn off?').
I've also designed nodes for CASTLE that will interface with current home setups; wireless light-bulb sockets and an IoT unive

CASTLE's premise is simplicity, convenience and effectiveness. We want to help people optimize their time at home and avoid mentally stretching themselves thin worrying about this or that at home, and so we plan to address the most-utilized appliance schemes in a given person's house - those being HVAC, Home theater setup, lighting and kitchen-appliances-area (the first and last one we're still figuring out).

Home Theater setup | Signal

The average home theater consists of a TV, a cable box, a mixer and some sort of external media device (media server, streaming hub, etc.) which can all be controlled by an IR remote. Universal remotes usually remove the need to use multiple remotes, but it doesn't solve all of the problems and inconveniences while trying to watch TV. You can still end up using more than one remote if the universal remote doesn't work with your appliance or if you can't train it with the code. Furthermore, it's still subject to many of the weaknesses regular remotes have - you can still lose them and run out of batteries.

Our solution to that is our first node, dubbed Signal. With comes the idea that TV-viewing-and-controlling should be more content-focused than it currently is. You shouldn't spend time flipping around the channels just to figure out what's on. Sure you can look it up yourself on TVGuide or the like, but why do that when you can build a schedule look-up right in to the system? Thus our home theater control system consists of a wireless universal remote control and a mini-server to control it/them and look up content with CASTLE.

This hackaday listing will actually focus on the build of Signal, the Theater-controlling node.

  • 1 × Arduino Uno Basic uC
  • 1 × Vishay Semiconductor TSAL6400 IR Led
  • 1 × Radioshack Part Number: 276-640 IR Receiver
  • 1 × Cheap chinese BT serial module Wireless radio module
  • 1 × Momentary Swtich Push button

View all 7 components

  • Hardwares n' things

    joshpaulchan08/20/2014 at 20:55 0 comments

    I've been working on the hardware side of things.

    Signal runs on an Arduino Uno and communicates wirelessly using a Bluetooth v2.1 module I picked up from ebay. It needs to run on battery power for a long time - about the same or even longer than a regular television remote would last (roughly 6 months).

    The plan is to put Signal (the Arduino) to sleep for most of the day, when people aren't watching TV (or even in the house). That condition is determined by the server, and it sends sleep/wake-up commands to the arduino. Combined with a high amp-hour, rechargeable lipo battery pack, this ~should make the arduino last for quite a bit. 

    However, since the actual client-side software isn't very complex, I've been thinking of programming straight onto a bluetooth chip - that could possibly cut down a lot of power consumption. I'm not entirely sure how to go about doing that, but it is something to think about.

  • Signal | Rovi Integration

    joshpaulchan08/20/2014 at 16:13 0 comments

    A few weeks ago I signed up for the Rovi TV API services, and I've been working to integrate the API with CASTLE /Signal's server so I can more easily access content.

    Thanks to Rovi, I have access to three important things: listing schedules, provider-channel lookups, and content info. Schedule and content info is great for making it a useful experience, but provider-channel information is a godsend.

    Now I can get the specific channel number linked to the tv schedule content - via the provider-channel lookup service. From there, it's a simple matter of splitting the code and assembling an IR-sequence from the IR codes for every number.

  • First Entry | Signal node work

    joshpaulchan07/26/2014 at 16:08 0 comments

    For the past month I've been working on the Signal node.

    The hardware consists of an Arduion Uno hooked up to a Bluetooth transceiver, a generic IR Led and IR Receiver, a push-button and an indicator Led. 

    The client software running on CASTLE acts as a messenger for CASTLE. It allows you to train the system w/ your remote control buttons (though I'm looking for a decent online repository besides ircentral and LIRC), and then sends them over to CASTLE with a reference and the actual infrared code value, which is then saved for later use. 

    Following from the output of the speech interpretation system, a command data structure is sent over to the signal server for parsing and breakdown, which then generates/look-ups the series of IR codes it needs to send over to Signal to execute the cmd. Ex. With the TV on and at another channel, 'Show me CNN' would (when a generated cmd gets to the server script) build and a series of button codes for the manufacturer and based on the CNN channel code from the provider which would then be sent to Signal to transmit to the TV.

View all 3 project logs

  • 1
    Step 1

    The idea is to build a wireless remote control, communicating using bluetooth. This is going to be a quick, very rough build, and it assumes there's an already established server-entity and communication protocol. (You can write a quick one in your language of choice - it just has to be able to receive and send commands through a bluetooth radio).

  • 2
    Step 2

    Gather the parts and start prototyping the circuit on the breadboard. Set up the power and ground rails first, then build on up. BT Radio I/O goes to the corresponding I/O of the Arduino (invert the paths), the regular LED should go from a digital pin to ground, and button should be wired properly (either using pull-up or pull-down techniques). The IR Led should be attached to digital pin 3 and the receiver, pin 5.

  • 3
    Step 3

    Load up Ken Shiriff's IR Library ( on your Arduino sketch and push the 'relay' example to the Arduino to test if it works. Make sure to change the necessary pin layouts in the sketch to match your own circuit layout. 

View all 3 instructions

Enjoy this project?



DominicM wrote 07/18/2014 at 19:07 point
Looking forward to more info. This would go well with my project: Would CASTLE be able to handle serial communication to control multi-light?

  Are you sure? yes | no

joshpaulchan wrote 07/26/2014 at 15:15 point
Hey DominicM,

Sorry for the late reply haha. While we do plan on using serial comms. with the radios, the idea is to make the system as effective and flexible as possible - to that effect, our lighting control scheme would involve wireless sockets, rather than lightbulbs. However, I am thinking of letting devs create and interface their own devices, so it shouldn't be too much of a problem.

  Are you sure? yes | no

DominicM wrote 07/26/2014 at 15:20 point
By wireless sockets do you mean relay switches (on/off)? If so I have to say that's very limited in that you can't even dim the light. Or did I misunderstand?

  Are you sure? yes | no

joshpaulchan wrote 07/26/2014 at 15:45 point
No, I meant wireless sockets (though I guess that also implies relays). True it's limited, but I feel dimming and color-changing features are inessential and for the latter, gimmicky. It's not a priority, but allowing users to extend the system is, so you'll be free to work it to your liking.

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates