Sorry for previous message. I missed some pieces of code you wrote. I've just tested your code on Mega and it is working flawlessly.
I guess problem is in switch "pairing". Try clearing previous code from switch first. For example:
Hold switch button until it beeps twice
Release switch button
Hold switch button until it beeps once
Enter "1" in Arduino port monitor input field and press Enter (switch shoud beep and accept new button)
Enter "1" in Arduino port monitor input field and press Enter (switch should turn on)
In case switch still not responding, make sure you have right antenna (163 mm of wire soldered to transmitter) and that transmitter is quite close to switch (at least for testing).
I know that this is strictly an Arduino forum, but I am working on the same project a long time now to control my Livolo switches, but with a Raspberry pi instead. As far as now I have not managed to achieve it. Hopefully someone inside the forum can translate the already working code for Arduino and make it work on Raspberry pi. There are already some useful codes for Raspberry pi that control the GPIO and send pulses to them (RCSwitch-pi and wiringPi) but I can note make them work with Livolo. Thank you very much for your reading!
You are right, reading remote IDs with Audacity is an akward routine. And I did try to build a code to read remote IDs, but have not succeeded yet. What's more, I'm not really sure I can do it.
But I'll get back to it as soon as I have enough time.
I'm not really sure it is possible to get switch status or send ON only command. There is a small chance of that, beause of "scenes" feature of advanced remote control.
As far as I remember (I've lost manual), there is a way to record several "scenes" with remote. Each scene means that one button can turn on several switches simultaneously. The thing is that required switches must be turned on prior to programing a scene. So I guess remote somehow "knows" which switches are on.
Again, I'm not sure it is working that way. I'll get back to this a bit later, sorry.
Sorry to mislead. There is no two-way communication between remote and switch. Scenes are being recorded on remote only, no interaction with switches required.
Yes, Itead switch is dual communication. It means switch send feedback status signal.
Whereas Livolo switch is not.
Anybody has any idea that where Itead source its switch from?
As I said earlier, another dual communication switch is Koti light switch. I have purchased them and play with them. It is nice and cool but its code is not open. I am waiting for FSK rf transmitter/receiver to decode them.
hi spch
As I said earlier, I have purchased koti light switch. It is working perfect.
After I received fsk transmitter and receiver, I tried to decode them. Again, I have no talent to interpret their code properly.
I used Goldwave software to decode. Can you help me to have a look the wave file that I captured?
There are 3 files. kotiT is captured transmitted code only, kotiR is feedback signal from light switch and kotiTR is combined transmitter+feedback signal.
My opinion on this switch is that it is better then Livolo, in terms of design and functionality. In addition, it send back status signal.
Everybody who work with rf transmitter/receiver know that sending rf signal is not reliable. If we know the status of the receiver, it is perfect.
Thanks in advance.
You are right, this one could be hard to decode. Could you, please, record several different keycodes?
What is more, I still didn't learn how to receive. I've only managed detect Livolo transmission, so that I know when Livolo remote transmits a code, but I can not decode what's being transmitted.