Today the color is…

Orange!! ūüėČ


Well, it could just as well have been any other color of the 256*256*256 colors these RGB LEDs can produce, but since today is Koninginnedag, Orange was the most appropriate color I could think of for today.

The last 2 days I started with putting these RGB LEDs in the ground, under the gazebo.

Removing the stones to get the 20 meters of cable under the terrace, grit around the poles and putting everything back in place took me 2 days and I’m still not completely done yet; I think I need another afternoon for the ‘finishing touch’.



Just for fun I made a small beginning with controlling these LEDs from my system by using scenarios or lighting sequences; here’s what the “random” color scenario looks like:


I’m also going to use a remote for these RGB LEDs; I still have an old 433 MHz remote with 8 buttons that can be re-used to select the different scenarios. This remote will be attached to one of the poles of the gazebo so we won’t need to go inside to change the lighting.

With the Arduino acting as web-interface to the hardware, my domotica system and this remote I think we can really enjoy these RGB LEDs during those many upcoming long, hot summer nights!

Broken cables and Ethernet Shield trouble

It’s time for some work outside.. Last summer the play set ¬†in our garden with slide and swings was hardly used, so I guess the kids won’t miss it. The swimming pool has to be filled with water again, the pump has to be put back in its place, the terrace needs some adjustments and of course, the gazebo RGB LED project needs attention cause the¬†crate with the 6 RGB LEDs, DMX decoder & Arduino has been standing in the office since the end of last summer, so it’s time to finally complete this and get those 6 RGB LEDs where they belong – in the garden. I started with the last job ūüėČ

The first thing I did was completing the indoor part of it all, e.g. putting the adapter, DMX decoder, Arduino with 2 shields (DMX & Ethernet) in a enclosure.¬†This whole setup has already been tested with something I developed last summer. It had a Colorwheel control with which it was very easy to pick a color and control the RBG LEDs. But this is not enough; I still needed to integrate those RGB LEDs into my Domotica system. By doing that, my system is now in full control over the RGB LEDs and they can be controlled based on events, from the GUI (touchscreen) in the living room etcetera. This integration involved creating a Device Class for the RGB LEDs and a suitable interface to ‘talk’ to the hardware.

But not all things went as smooth as I had hoped. First, a power adapter cable was broken, which made the whole setup stop working every few minutes or so. It cost me half the afternoon to find out it was just a piece of cable that was bugging me…

I also applied the ‘Ethernet-shield-powered-from-the-adapter-plug’ fix I wrote about before, but it didn’t help enough. Sure, 4 out of 5 times it worked, but not always. And that’s not good enough, so I searched for another solution and I found one here, and this one worked always – well, successfully¬†powering up 30 times in a row convinced me that this works well enough. So now there’s a wire going from the RESET pin to pin 4 (the Ethernet shield is underneath the DMX shield).

Ethernet Shield fix

The code that comes with it is simple but very effective:

void init_ethernet()
 pinMode(DO_RESET_ETH_SHIELD, OUTPUT);      // sets the digital pin as output
 digitalWrite(DO_RESET_ETH_SHIELD, LOW);
 delay(1000);  //for ethernet chip to reset
 delay(1000);  //for ethernet chip to reset
 pinMode(DO_RESET_ETH_SHIELD, INPUT);      // sets the digital pin input
 delay(1000);  //for ethernet chip to reset
 delay(1000);  //for ethernet chip to reset
 delay(1000);  //for ethernet chip to reset

Calling the init_ethernet() function from the setup() is all that’s needed to get a fully functional Ethernet Shield. Finally this RGB LED project is finished; well, I still have to dig 6 holes and get the RGB cable under the terrace – after that, summer can begin!


Killing adapters does save energy?

Although I still had to remove 2 DC adapters (of 11), today I saw that the power usage between 04:00 and 05:00 was 258W. I hadn’t seen such a low usage for quite some time, so I did some research by querying the hourly power usage data I have been collecting since 2008. How many times did I have a power usage <= 258W during all those years? Here’s the result:

Year    Number of times <= 258W
2008    15
2009    75
2010    60
2011    0
2012    1

I expected this trend, cause 2008 has been the year where I ditched 3 (or was it 4) older PC’s which were on 24/7 by virtualization¬†and also took some other measures to reduce power consumption. 2009 was the year in which we benefited the most from this power reduction but since then, I guess it’s the ever increasing amount of power consuming hardware that made the base power usage (as in during the night, where as much hardware as possible is turned off) increase through the years. The power usage drill-down charts I made in the past confirm all this.

I checked when the last time was when we had a nightly power usage below 258W and it was 16-03-2010!¬†More than 2 years ago… this is no coincidence, and I can think of only 1 thing that can be responsible for matching those 258W last night, after a very long time: reducing the number of adapters.

What else could it be?


More Kinect: skeletons and thoughts

This is fun! Today I created a C# application to view skeletons on my PC monitor. Below is the result (available in HD res):

I’m just doing some silly moves in front of the camera like lifting my arms etcetera, so nothing spectacular there; it’s the skeleton being displayed on the monitor what’s spectacular, and fun!

Every time I did some tests, the kids came running from the livingroom and started jumping, waving their arms and doing all kinds of crazy stuff ūüôā

At the end of the video, where I walk back towards my keyboard and the distance to the Kinect reduces to 50 cm or so, you can see that the Kinect is getting a hard time tracking all the joints; it becomes a big mess. But that’s okay.

After tinkering with the Kinect and the Kinect SDK for 8 hours or so, my first impression is better than I expected, acually. The way speech is being recognized, how well a skeleton is being tracked is better then I had expected. Ready for use! Is it, or…?

My goal is to use the Kinect for speech and gesture recognition; for that I want to develop a small, lean and mean app that does just that and that can interface with my Domotica system in some way. Either by adding a TCP server to the app, or by uploading information with XMLRPC, or whatever – haven’t really thought about that yet. But I also need an application to ‘record’ gestures and an easy way to define new speech commands this app should recognize; and not just “light on”, but also commands with variables in them, like “we will be back at 16:00”. My system can handle this kind of ‘dynamic events’, so the Kinect should too, right?

But some other things give me second thoughts about the usability of the Kinect.

First, while I was capturing this video, the CPU usage on my Intel E8200 Core 2 Duo (2.66 GHz) Windows 7 Ultimate PC with 8GB RAM was around 50-60%; that’s rather high. Well, I guess most of the CPU cycles were consumed by displaying the skeleton on the screen (which is something I won’t need in the end), but I really need to know what the remainder of the current 50-70% will be when I strip this app to what it is supposed to do: simply recognizing gestures and speech without UI. Cause I’m not that fond of spending that much processing power (and the power consumption that comes with it) on this.

Second, the SDK is limited to Windows 7 (and above, I guess). That’s too bad; now that I think of it; wouldn’t I be better off with something more versatile, platform independent? Wouldn’t it be ideal to connect a Kinect to some local, low-power processor unit (Raspberry Pi, xyz Plug, etc) and let that device take care of the processing and only communicate “the stuff that matters” to the central system? Hmm, maybe I should have a look at some alternatives as well.

Third, the Kinect uses USB to connect to the PC. What if I want to use more than 1 Kinect, say 2 or 3, throughout the house? How do I fix that, USB and max 5 meters of cable length?

So although I’m impressed by the Kinect, there’s still a huge pile of things to do, discover, explore and.. decide!

The Kinect and Home Automation

Microsoft Kinect

A new, exciting piece of hardware arrived today – a Microsoft Kinect. The Microsoft Kinect (formerly known as ‘Project Natal’) was primarily sold as an accessory for the XBOX game console, but that’s going to change. Microsoft released a Kinect for Windows SDK earlier this year, which enables developers to unlock the possibilities of the Kinect to the Windows platform.

Now this Kinect is really becoming interesting for Domoticans ūüôā Interacting with your Home Automation system by using gestures, speech, tracking people – that really sounds like the next step to me. So when Robin, who’s also a member of Domoticaforum Europe asked me if I would like to have a look at the Kinect, I didn’t hesitate one second – yes, of course!

Before I could start I had to download & install Visual Studio 2010 Express and the Kinect for Windows SDK. Most of the SDK samples are written in C#, so I installed VS C# 2010 Express and the SDK on my Windows 7 machine. After the Kinect arrived, I plugged it in and all the drivers that were needed were installed. I started Visual Studio, started the Speech sample and started saying some colors, cause this sample was setup to recognize the colors red, green and blue. And it did, very well.

One strange thing though – I had to press the ENTER key to stop that sample application? Okay.. there’s a better way to do that for an application that can recognize speech, so the first thing I changed was adding the word “shutdown” to the list of words that should be recognized and added some code that would do just that: shutting down the sample application. And although I’ve never ever done C# before, I did it in a matter of minutes… cool! I think I can work with this.

Although this was a very brief encounter with the Kinect, as far as I can see now, there are great opportunities for this Kinect in the world of Home Automation/Domotica. Now let’s see if I can also recognize gestures; which sounds much more complex and maybe it is – well, I can tell more about that in a few days, or weeks maybe…

Happy Easter!

Adapter reduction

Have you ever seen a¬†fuse-box¬†closet of a Domotica enthousiast? They’re always loaded with all kinds of interfaces for various Domotica related hardware: X-10, PLCBUS, RF receivers, you name it. Here’s my list:

  • Synology NAS (powered directly from mains)
  • PLCBUS interface (mains)
  • ACT TI213 for X-10 interface (mains)
  • Somfy RS485 RF Transmitter (mains)
  • Digi Portserver TS4 (mains)
  • Sollae EZL-200F for Somfy RS485, ¬†5V DC
  • Visonic, 9V AC 1A
  • Siemens M20T GSM modem, 8V – 28.8V DC (12V)
  • RFXCOM RFXMeter, 9V AC 250mA or 9-12V DC 250mA
  • Sollae EZL-400 4-port RS232 to Ethernet, 5V DC 500 mA
  • 8-port Ethernet Giga Switch, 5V DC 2A
  • Alphatronics Receiver, 12V DC 45 mA
  • AVM Fritz! Box, 12V DC 1.2A
  • Ethernet Doorbell, 5V DC
  • ACT-1000 RS485 to Ethernet for Nemef, 9-12V DC
  • Nemef RF Module, 12V DC 150 mA
  • Lavalink RS232 to Ethernet for Visonic, 9V DC

I’m sure this list will keep on growing in the future. Just count the number of adapters I need! Currently there are 11 adapters in use, and the number just keeps on growing! And you can imagine it’s one big chaos of power-strips, adapters and wires in there. So, a long time ago I bought a few adapters that should be able to supply power to more than just a single piece of hardware. 5V DC is used a lot, 12V DC and 9V AC more than once too. All I needed was a way to connect all the hardware to the right adapter so I could save on the number of mains sockets I need and probably on total power usage as well.

This week I decided to start working on this adapter reduction job and came up with these ‘power boxes’:

Adapter killer

InsideNow I can connect up to 8 devices to the same adapter. With 3 adapters and the same amount of these power boxes I can get rid of a lot of adapters and at least 2 power-strips.

In use¬†5 adapters (4 x 12V, 1 x 5V) have already been removed and the hardware that was connected to those adapters is now being powered from these boxes; 5 adapters done, another 5 to go! Will I notice this in my nightly power consumption? I don’t know, but it sure reduces the number of power-strips I need over there and there’s enough room for expansion.