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.