Arduino Home Easy controller library

I’ve been having another look at controlling Home Easy devices recently, after some encouraging successes from other people on twitter and the Home Easy page on the Arduino wiki. There was already a class for receiving Home Easy signals but I’m plotting some techno polar bears at the moment so wanted a simple Arduino library for sending Home Easy signals.

After digging out an ancient C++ book I’ve now got working library, complete with example. I kept it very simple to start with so there are a few more bits still to add, like setting a specific controller id or sending a specific device code, but I’m quite pleased with the result. Here’s the sample for using the library…

#include <HomeEasyCtrl.h>

// This is the Home Easy controller
// This example will use a 433AM transmitter on
// pin 4 and will flash an LED on pin 13 when
// transmitting
HomeEasyCtrl easy(4,13);

// This is just a pin which has a push button
// connected, to trigger a Home Easy device
const int buttonPin = 6;

int buttonState = 0;

void setup()
{
 pinMode(buttonPin, INPUT);
}

void loop()
{
 buttonState = digitalRead(buttonPin);

 if (buttonState == LOW) {
 easy.deviceOn();    // turn on device 0
 delay(3000);        // wait 3 sec
 easy.deviceOff();   // turn it off again
 }
}

Just get in touch if you want the library.

Updated: managed to upload the library to the Arduino Home Easy wiki page.

About these ads

22 thoughts on “Arduino Home Easy controller library

  1. Nice one. You beat me too it.

    I’ve been working on adding transmitting capabilities to the HomeEasy arduino library for a while now but only just managed to get it finished and committed.

    I’m sure there’s a few differences to yours. Mine uses timer 1 for both transmitting and receiving which frees up timers 0 and 2 for other things (which I need for my project).

  2. Hi Peter, thanks for the update. The library above is not exactly finished, but was enough to get the project I was working on finished. I decided that separate libraries to transmitting and receiving could be useful since I think there are quite a few projects which would only need one. Plenty that would want a combined library as well.

    I’d be interested to know what 433AM modules you’re using, and how the project you’re working on is going!

  3. Hi,

    I’ve tested your library with my home easy devices, but it didn’t work.
    With a scope I found out that my codes are a few bits shorter than yours, 58 wire bits, I don’t know the encoding.
    Can you help me with this?

    The code for turning the first device on is(wire bits):
    1100011110010111011010100011110110101100011101110010001111
    And for turning off:
    1100011110010111011010100011110110101100011101101010001111

    (1 = 275 us high 1225 low, 0 = 275 us high 275 us low)

    I currently have no scope at my disposal, do you know what this encoding is?

    Thanks!

  4. I can use most of the channels now:

    1100011110010111011010100011110110101100011101110010001111 #channel 0 on
    1100011110010111011010100011110110101100011101101010001111 #channel 0 off
    1100011110010111011010100011110110101100011101110010010111 #channel 1 on
    1100011110010111011010100011110110101100011101101010010111 #channel 1 off
    1100011110010111011010100011110110101100011101110010011011 #channel 2 on
    1100011110010111011010100011110110101100011101101010011011 #channel 2 off
    1100011110010111011010100011110110101100011101110010011101 #channel 3 on
    1100011110010111011010100011110110101100011101101010011101 #channel 3 off
    1100011110010111011010100011110110101100011101110010100111 #channel 4 on
    1100011110010111011010100011110110101100011101101010100111 #channel 4 off
    1100011110010111011010100011110110101100011101110010101011 #channel 5 on
    1100011110010111011010100011110110101100011101101010101011 #channel 5 off
    1100011110010111011010100011110110101100011101110010101101 #channel 6 on
    1100011110010111011010100011110110101100011101101010101101 #channel 6 off
    1100011110010111011010100011110110101100011101110010110101 #channel 8 on
    1100011110010111011010100011110110101100011101101010110101 #channel 8 off
    1100011110010111011010100011110110101100011101110010000111 #channel 10 on
    1100011110010111011010100011110110101100011101101010000111 #channel 10 off
    1100011110010111011010100011110110101100011101110010001011 #channel 11 on
    1100011110010111011010100011110110101100011101101010001011 #channel 11 off
    1100011110010111011010100011110110101100011101110010001101 #channel 12 on
    1100011110010111011010100011110110101100011101101010001101 #channel 12 off
    1100011110010111011010100011110110101100011101110010010011 #channel 13 on
    1100011110010111011010100011110110101100011101101010010011 #channel 13 off
    1100011110010111011010100011110110101100011101110010010101 #channel 14 on
    1100011110010111011010100011110110101100011101101010010101 #channel 14 off
    1100011110010111011010100011110110101100011101110010011001 #channel 15 on
    1100011110010111011010100011110110101100011101101010011001 #channel 15 off

    • forgot channel 7 & 9:

      1100011110010111011010100011110110101100011101110010110011 #channel 7 on
      1100011110010111011010100011110110101100011101101010110011 #channel 7 off
      1100011110010111011010100011110110101100011101110010111001 #channel 9 on
      1100011110010111011010100011110110101100011101101010111001 #channel 9 off

  5. Hi,

    I’m also trying to figure out the Home Easy EU protocol.
    Jurpie, if you are reading this please contact me on aczez AT woppy DOT net
    Maybe we can work together and publish the findings.

    Regards,

    • Hi,
      I’ve emailed your comment to Jurpie so hopefully he’ll get in touch. It would be great to have the Home Easy EU protocol documented as well.
      Regards, James

  6. Are there any news about the protocol?
    Now I’ve the same protocol like Jurpie and can’t find any informations about it.
    I’ve also some bit streams which we could use to find out how the protocol works.

    Regards, Sebastian

  7. Hi,
    any news regarding the HomeEasy EU protocol? Here are some wire bits by me:

    HE301EU ON
    1100011110010111100011101110010001111100011110010110001111
    HE301EU OFF 1100011110010111100011101110010001111100011110001110001111
    HE300EU 1:ON, Switch:I 1100011110010111101001101011011001011011100101110010001111
    HE300EU 1:OFF, Switch:I 1100011110010111101001101011011001011011100101101010001111
    HE300EU2 :ON ,Switch:I 1100011110010111101001101011011001011011100101110010010111
    HE300EU2 :OFF, Switch:I 1100011110010111101001101011011001011011100101101010010111
    HE300EU3 :ON, Switch:I 1100011110010111101001101011011001011011100101110010011011
    HE300EU3 :OFF, Switch:I 1100011110010111101001101011011001011011100101101010011011
    HE300EU4 :ON, Switch:I 1100011110010111101001101011011001011011100101110010011101
    HE300EU4 :OFF, Switch:I 1100011110010111101001101011011001011011100101101010011101
    HE300EUGroup:ON, Switch:I 1100011110010111101001101011011001011011100110010110001111
    HE300EUGroup:OFF, Switch:I 1100011110010111101001101011011001011011100110001110001111
    HE300EU1:ON, Switch:II 1100011110010111101001101011011001011011100101110010100111
    HE300EU1:OFF, Switch:II 1100011110010111101001101011011001011011100101101010100111
    HE300EU2:ON, Switch:II 1100011110010111101001101011011001011011100101110010101011
    HE300EU2:OFF, Switch:II 1100011110010111101001101011011001011011100101101010101011
    HE300EU3:ON, Switch:II 1100011110010111101001101011011001011011100101110010101101
    HE300EU3:OFF, Switch:II 1100011110010111101001101011011001011011100101101010101101
    HE300EU4:ON,S witch:II 1100011110010111101001101011011001011011100101110010110011
    HE300EU4:OFF,Switch:II 1100011110010111101001101011011001011011100101101010110011
    HE300EUGroup:ON,Switch:II 1100011110010111101001101011011001011011100110010110001111
    HE300EUGroup:OFF,Switch:II 1100011110010111101001101011011001011011100110001110001111
    HE300EU1:ON,Switch:III 1100011110010111101001101011011001011011100101110010110101
    HE300EU1:OFF,Switch:III 1100011110010111101001101011011001011011100101101010110101
    HE300EU2:ON,Switch:III 1100011110010111101001101011011001011011100101110010111001
    HE300EU2:OFF,Switch:III 1100011110010111101001101011011001011011100101101010111001
    HE300EU3:ON,Switch:III 1100011110010111101001101011011001011011100101110011000111
    HE300EU3:OFF,Switch:III 1100011110010111101001101011011001011011100101101011000111
    HE300EU4:ON,Switch:III 1100011110010111101001101011011001011011100101110011001011
    HE300EU4:OFF,Switch:III 1100011110010111101001101011011001011011100101101011001011
    HE300EUGroup:ON,Switch:III 1100011110010111101001101011011001011011100110010110001111
    HE300EUGroup:OFF,Switch:III 1100011110010111101001101011011001011011100110001110001111
    HE300EU1:ON,Switch:IV 1100011110010111101001101011011001011011100101110011001101
    HE300EU1:OFF,Switch:IV 1100011110010111101001101011011001011011100101101011001101
    HE300EU2:ON,Switch:IV 1100011110010111101001101011011001011011100101110011010011
    HE300EU2:OFF,Switch:IV 1100011110010111101001101011011001011011100101101011010011
    HE300EU3:ON,Switch:IV 1100011110010111101001101011011001011011100101110011010101
    HE300EU3:OFF,Switch:IV 1100011110010111101001101011011001011011100101101011010101
    HE300EU4:ON,Switch:IV 1100011110010111101001101011011001011011100101110011011001
    HE300EU4:OFF,Switch:IV 1100011110010111101001101011011001011011100101101011011001
    HE300EUGroup:ON,Switch:IV 1100011110010111101001101011011001011011100110010110001111
    HE300EUGroup:OFF,Switch:IV 1100011110010111101001101011011001011011100110001110001111

    Can anybody give me more detailed information about the protocol or which function have any single wire bit? How long is the ID, what bits are used for sync and so on … thx.

  8. Hello, i am using http://playground.arduino.cc/Code/HomeEasy eble to operate Remote Control Bulb Holders, Remote Control Socket, but unable to control Remote Control Light Switch – HE108W with arduino. I am eble to read from arduino sender code and recipiient ID from remote control HE100. But when i sent these comands thru arduino HE108 remote control swistsh don’t recognizes thes codes. Does anyone know is tehere something diferent with HE108W ?

    sender 55840328
    no group
    on
    recipient 4

    Or there is some diderence in timing for HE108?

    • its solved, i have to use originall delay, but not tweaked HE108 is sensitve on accurate timings

      delayMicroseconds(310); //275 orinally, but tweaked.
      digitalWrite(txPin, LOW);
      delayMicroseconds(1340); //1225 orinally, but tweaked.
      }

      • Hi Edijs,

        I also have a HE108 switch and am having trouble getting this working.

        Can you let me know what you changed to make it work?

        I tried changing:

        void sendBit(int pin, bool b)
        {
        digitalWrite(pin, HIGH);
        delayMicroseconds(310); //275 orinally, but tweaked.
        digitalWrite(pin, LOW);
        delayMicroseconds(b ? 1340 : 310); //1225 orinally, but tweaked.
        }

        To

        void sendBit(int pin, bool b)
        {
        digitalWrite(pin, HIGH);
        delayMicroseconds(275); //275 orinally, but tweaked. Was 310
        digitalWrite(pin, LOW);
        delayMicroseconds(b ? 1225 : 310); //1225 orinally, but tweaked. Was 1340
        }

        but that didnt work, i also tried changing the last 310 to 275 and that made no difference.

        Any help would be appreciated.

        Kind regards
        Alex

  9. Anybody figured out the Homeeasy EU Protocol by now? I have a HE844a remote and some lightsiwtches and I can’t get them to work with my arduino.

    • I have a fully working Arduino that sends and recieves HE auto and simple messages but I have just discovered one of my wall switches doesnt work, its HE843. I will measure the waveforms and post them.

      • Steve, did you find out the correct protocol? I’m searching the net without success yet…

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s