First of all, you don't have to modify Livolo library files in any way (but you can modify example) and you don't have to save your sketch (program code) as *.h unless you want your own library.Arduino Guide to libraries
will give you basic understanding of what Arduino library is and how it is installed.
To get everything working you will need ASK/OOK 433.92 MHz transmitter and receiver. Like these
for example. You will also need to solder antennas to them (about 175 mm of wire).
Make sure you connected transmitter and receiver right.
Transmitter: DATA to pin 8; GND to GND; VCC to 5V;
Receiver: DATA to pin 2; GND to GND; VCC to 5V;
In case you want to use Arduino along with your existing remote, you will need to read your remote's codes. That is what daledale's code
1) Copy and paste it
into Arduino IDE (e.g. start Arduino IDE or use File/New inside open Arduino IDE).
2) Upload to Arduino
3) Open Serial monitor
4) Press original remote buttons you wish to use with Arduino
5) Write down codes shown in Serial monitor window (remote ID and button code).
In case you don't need your remote, you can use button map as in readme.txt file.
Now you can test your own code to control switches with Arduino:
1) Install Livolo library into Arduino IDE (see above, or just copy Livolo folder under your Arduino\libraries folder)
2) Open blink.ino example from Livolo library (File/Examples/Livolo/blink). It will give you something to start with.
3) Replace remote ID and button code in "livolo.sendButton(6400, 120);" with any pair that you wrote down earlier.
4) Make sure you "paired" switch with the same button of the original Livolo remote.
5) Upload to Arduino
6) "Paired" switch now must turn on and off every 3 seconds
You can switch on/off any "paired" switch like this. Just be sure to include Livolo library in your project ("#include <livolo.h>" in example) and use Livolo method to create a Livolo instance ("Livolo livolo(
;" in example)
Note, that you won't be able to control "unpaired" switches. There are two ways to pair switch: use original remote or:
1) Open blink example
2) Replace remote ID with your remote ID
3) Replace button code with a button to pair switch with
4) Upload code to Arduino
5) Put target switch into learning mode
6) Switch will beep and pair in case you did it right.
Sorry, I'm not sure if I can tell more than this. I really tried to make it as simple as I could.