Home Lighting Automation System (ALDI AUS Switches)


I have designed an Automatic Light Control system for my home. Basically the system is capable of the following :-

  • RF control of up to XX (Currently 20) remote sockets which turn ON/OFF lamps throughout my home.
  • Timer function for (12) only of the zones above. (Allows me to walk into a room and lights come on automatically and turn of via timer)
  • Wireless (433Mhz) PIR Triggering of 12 of the zones above.
  • Wireless smoke detectors.
  • Control via HTML GET (kind of JSON response) of all features.
  • PUSH notification (PIR's kind of pseudo alarm system / Smoke Detectors) to PROWL on iPhone
  • MACROS or Scenes (e.g Night Mode, Sleep Mode, Away Mode etc)
  • Wireless doorbell integration ( With PUSH Notification and entry light with delay)
  • Debug mode.
  • Beginnings of Clock related functions (Very Basic) that need to be expanded including Holiday Mode etc

Everything above works perfectly and I have been using it for some time at home, but this is the first time Iv written and code and I know my code could be optimised. I would like to collaborate with a few people who know how to code better than me (almost anyone :stuck_out_tongue_closed_eyes:) and work together to add more features. I'm not interested it giving it to hundreds of people. I prefer to give it to just a few and together have a master plan that we work on.

Is anyone interested? If so lets start a conversation here and get started. You'll laugh at my code but that's OK. It works and can only get better and to be honest Im learning as I go.

Libraries used are :-




What sort of clock functionality are you looking for? I too am new at Arduino but have an extensive Delphi coding background. I have just built some date and time functionality for my home automation system - 1,000 lines of C (the whole application) and now upgrading to a mega processor with 256K of flash memory.

I'm in and out, slowly adding to a complete home automation project.
Instead of using the common arduino c++ language, i have opted to write the entire (or most) of the project in C , so i am mainly learning slowly what all or most of the registers for a particular avr do & how to manipulate them.

The thing i still have trouble with & is the most notoriously challenging is bit-wise math.

I have a solar hot water project, that initially touched 5% on using registers directly, the final code came to 11kb.
The code i now have is only 829bytes, with serial debugging, it weighs in at 3kb.

I recommend commenting as much as possible, and commenting out the original code & comment the new code, so when you look back, you can see why or how you came to a conclusion.

I chose to go this route, because some projects where getting above 30k in size or where taking too much ram, and where so hard to debug what was going wrong, even thought the ide reported no errors.

I do my best to look deeply into libraries, and try to follow / understand what the function does. I would rather be able to write the direct code than to always be dependent on somebody elses work, or trying to remember how to implement a feature.

Whereas a plethora of snippets, that are well commented, can be reused over and over.

I'd like to know how you set up the RF lights/sockets
I can help with the software

I'm in the process of building a 220v light control system with RF2401 transceiver.
While I'm fairly new to the world of arduino, I've been programming for the past 30 years.

I'll gladly cooperate with you.

Drop me a pm.


@molahs, what are you using for light control?
@kmanoz, are you from Australia?

@molahs, what are you using for light control?

The final unit will be ATTiny84, RF2401 with 5V to 220V solid state relay (unless I can find a better way to switch the 220V) and battery.

I have one Arduino Uno with Ethernet shield that hooks into my house network and acts as the bridge between computers/mobile devices in the house to the various relays. My idea is to eventually replace ALL existing light switches in the house, with some sort of touch switch.
Alternatively, I will build a circuit between the mechanical existing switch and the final unit to detect the switch position and either turn the lights on or off. I presume this will be a problem with lights that have multiple switches.

The final unit will be ATTiny84, RF2401 with 5V to 220V solid state relay (unless I can find a better way to switch the 220V) and battery.

I personally wouldn't bother unless there was a retrofitable device that would replace the existing light switch. It should have a switch that I can manually press to turn the lights on and off and also responds to an RF signal to turn the lights on and off


OK I will work on commenting in the code so its pretty self explanatory and create a .zip. nd put a link up.


Yep in Melbourne :slight_smile:

Also some more info.

As I said earlier, Im very new to Arduino and hence my coding and the procedures that I use are going to be primitive. Im sure there are so many other ways to compact/speed up my code so that's why Im asking for help / ideas :slight_smile:

Anyway I have designed this for use with ALDI (Australia) remote switches. These units do not have a adjustable code via a dip switch but rather learn a code based on the button pressed on the transmitter. It seems that each unique channel (4 on 1 remote) has 4 unique codes for ON and four codes for OFF so in total 8 codes per channel. The codes a sent out sequentially by the remote and the remote switch once programmed will respond to any of those 8 codes. It seems the manufacturers have done this for reliability because sometimes for whatever reason, a code that worked today may not work tomorrow depending on atmospheric conditions etc. In my app, I send all 4 codes for ON and all 4 for OFF for each channel. It takes a little longer but Iv found it's far more reliable.

I haven't been able to crack their protocol, so what I have done is effectively learnt the codes from 5 different remotes giving me a total of 20 remote sockets that I can control. I realized very early on that RCSwitch wasn't going to work so I had to modify it. The way I learnt the codes from my remotes was to pull the remote apart and find the pin that was pulsing the 433Mhz transmitter module. I then hard wired this directly to an Arduino pin and use the RCSwitch ReceiveDemo_Advanced (because it gives raw data and I was getting unknown code) to work out pulse timings/widths etc. I then added a MODE_3 section in RCSwitch which is the mode to transmit for my ALDI switches. I know that the mods Iv made to RCSwitch probably aren't the correct way to go about it as RCSwitch will only SEND my codes and not receive them. For the limited knowledge I had that was OK because everything I use to trigger the system (PIR's, Smoke Detectors and Door Bell buttons) were being received by RCSwitch OK as MODE_1, it just couldn't receive or send ALDI codes.

Im don't know if the protocol for the ALDI switches is used anywhere else in the world so Im not sure if the work Iv done is any good outside of Australia. My code could easily be modified to use any remote switch that RCSwitch.h supports with very little work.

Rather than make this closed, I'll post my code up here. I know Ill get flamed for my coding but what the heck it's my first attempt at coding and more importantly IT WORKS :smiley:

Ill be back soon with a link :slight_smile:


Melbourne here too

You posted back in July 2012 on whirlpool about this

OK So only RC sockets.

Melbourne here too

You posted back in July 2012 on whirlpool about this

OK So only RC sockets.

Sydney here and been using Arduino for about 6 months - migrated across from Picaxe processors.

I would guess that once you have the wall sockets mastered the next one to tackle would be the light switches on the wall - i like the look of the levolo switches and some of the guys on here have made good progress hacking into these.



To say Im slack would be an understatement. I haven't had a chance to comment the hell out of the code Iv developed but I thought I would get it up here anyway. I warn people this is bad code :slight_smile: but as I said, it works and has worked flawlessly for quite some time. If your going to use this to run ALDI switches you're going to need a modified RCSwitch.h which I modified. I haven't included it here because again, even though it works to a degree (only transmits ALDI, not receives), it's probably not the way to modify it correctly and Im trying to respect the original authors by not sending butchered versions of their work around. I can send it to you though :smiley:

Anyway as I said, this is the only code Iv ever written but with limited knowledge Im proud. The way I control the system is by using an iPhone/iPad app called iControl Web. It's simple but again just works.

In the rfBlaster () section, you could eliminate all the code and just use standard RCSwitch commands. Notice I send 4 different codes for ON and OFF. It's just the way the ALDI switches work. I could send just 1 of the 4 for ON and OFF but for reliability I send 4.

If anyone needs help just ask questions, Id be happy to help. Anyway, this was cheap, it works, and I learnt a lot. Hopefully if anyone uses and modifies this, they can give me a copy so I learn more :slight_smile:

Peter :smiley:

ALC_v1_0.zip (12.7 KB)

Hi KmanOz,

i've read your posts - did you progress with the RC switch topic? Here in EU you can buy this one - http://www.gt-support.de/files/IM_GT-FSI-07+GT-9000_2013_D+HU+SLO.pdf
Is it the same what you've tested?
What exactly have you modified in rcswitch source?