Pages

Arduino and remote control of Home Easy devices

I had bought a number of devices from the Home Easy On/Off Range, including 6 HE302S sockets and two HE300 remote controls. It was my intention to be able to remotely control these from an Arduino. The devices use the 433MHz AM radio band to communicate with the sockets being receivers and the remote being the transmitter. More information and links are available on the Home Easy Hacking wiki including links to the required RF modules.
I used the modules from Maplin Electronics, part number VY48. The transmitter is simply connected to ground, power, pin 4 for data and a 170mm antenna. I have also combined the receiver onto a stripboard shield (Circuit and layout still to follow) with jumpered links to enable power to the receiver or transmitter depending on which is to be used at the time.

Library

Any bit of hardware works best with a library, the code used is based on code available from the Arduino Home Easy playground article. The HE300/HE302S use what has been termed the advanced protocol even though it is just a basic on/off action. The code was formed into a library with the constructor being passed the port pins that are to be used for the transmit and receive signals as well as the ID to use for the remote. The library is divided up into the transmit and recieve halves and these can be compiled in or not depending on the final application.

Library functions:

  • Send Single channel On/Off
  • Send Group On/Off
  • Receive data from remote control

Examples

I have included 3 examples with the library:

  • Simple On/Off – one channel is turned on then 3 seconds later turned off
  • Group On/Off – group is turned on then 3 seconds later turned off
  • Receive – functions are assigned to remote buttons and executed. Example operates 4 LEDs based on remote button presses.

A further example, not included with the library is for an ethernet controlled Home Easy transmitter. This uses the updated ENC28J60 EtherShield library although the functionality could be replicated with the official Arduino Ethernet shield. When running you point a web browser at the IP address and correct port for your Arduino, a simple web page is displayed. This then allows you to turn on and off the first 4 channels as well as turning on and off the group. For a more complex control application the URLs can be accessed from another server using PHP for example. The URLs have the form /on=x and /off=x where x is the channel number to switch in the range 0-15. For the group control use /gon and /goff.

It is possible, and I have tried it, to use this via the internet and a mobile phone. You would need to change the default port from 80 to something else and setup your broadband router to perform port forwarding. The exact settings needed are outside of the scope of this article.
Warning: this is a simple application and there is no security built into it, therefore it will be possible for someone to access your Arduino and turn on and off whatever it is that you are controlling. I accept no responsibility for however you decide to use this code.

Downloads

Bookmark this post: bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark

7 comments to Arduino and remote control of Home Easy devices

  • stavast

    Hi Andy,

    i try to add a dutch light control system to your code. the standalone code for the light control system works just fine, but when i’m adding this to you code it won’t work. do you have the time to take a look?

    kind regards, Kevin

  • stavast

    never mind, i was using digital i/o pin 11 to send out the radio signal. never knew that this pin was being used by the ethernetshield. 🙂 now it’s working like a charm, well still one thing that isn’t quit good; i have a function that keeps the light on for 5 sec and then it has to turn the light off. it’s doing that like 3 times (on.. off, on.. off etc) because it’s running very fast through the loop i think.

  • stavast

    Hi Andy,

    now I have another problem which i can’t figure out how to deal with.

    at this moment i’m building an system which is able to open the door in our flat. i’m using the same principle as you do, the only difference is that my system doesn’t lit up a light, but opens the door via a relay. I want the door to be open for 5 seconds. so the relay has to be made active for 5 seconds and after that the relay must be deactivated. so when the button on the website is being pushed the “on” signal is being send out, after 5 seconds the “off” signal will be send out.

    it works fine, but the on/off signal will be send a few times. how can this be solved? i tried it with some “status flag” that are set when the door is being opened, so that the loop skips this part again and the signal can’t be send again, but it doesn’t seem to work. maybe you have a simple solution?

  • Hi Kevin,
    You may want to look at the turning on and off of the door latch with a hardware solution not a software one. If you build a small circuit that would generate a 5 second pulse. The type of circuit is called a monostable multivibrator and can be built with a simple NAND gate plus resistor and capacitor to provide the timing. Have a look at http://www.electronics-tutorials.ws/sequential/seq_3.html to see if this would do what you are looking for. If the logic levels on the input and output are wrong for your application, just add inverters, there should be spare gates on the chip.

    Hope this helps

    Andy

  • stavast

    Thank you Andy, I will have a look in to that! it sounds a lot easier than adding a lot of extra into the code.

  • JSP007

    Hi Andy,
    Just fell into your interesting page. I want to control a NEXA (similar to HomeEasy) but cannot find a code that works. I can read but not send the code. Downloaded your zip above but I cannot even compile it. It says “error byte not defined etc etc. Byte not defined??? – strange.

    Could you please ascertain that your code works with the new Arduino 1.01? I also have Arduino 022, same thing.

    Any idea would be much appreciated. /Jorge

  • eumanecs

    Hello, i am using http://playground.arduino.cc/Code/HomeEasy able to operate Remote Control Bulb Holders, Remote Control Socket, but unable to control Remote Control Light Switch – HE108W with arduino. I am able to read from arduino sender code and device ID from remote control HE100. But when i sent these commands through arduino HE108 remote control switch (HE108) don’t recognizes these codes. Does anyone know is there something different with HE108W ?
    sender 55840328
    no group
    on
    recipient 4