I managed to get the remote's binary code using an arduino lying around and the rcswitch library.
Using the same codes, I used the rcswitch module in Espruino to switch on and off the relay.
Here's what I'm using, if anyone's interested:
let _on = 0bxxxx;
let _off = 0byyyy;
var sw = require("RcSwitch").connect(1, D10, 10);
var on = false;
function toggle() {
on = !on;
if (on) {
sw.send(_on, 24);
console.log("switchOn");
}
else{
sw.send(_off, 24);
console.log("switchOff");
}
}
setInterval(toggle, 5000);
I'm still confused with the FIFO_FULL message but now that things are working (and that I know of a workaround if ever I need to do it again) it's not as big of an issue for me anymore.
I would still prefer to use Espruino for sniffing the codes though :)
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
I managed to get the remote's binary code using an arduino lying around and the rcswitch library.
Using the same codes, I used the rcswitch module in Espruino to switch on and off the relay.
Here's what I'm using, if anyone's interested:
I'm still confused with the FIFO_FULL message but now that things are working (and that I know of a workaround if ever I need to do it again) it's not as big of an issue for me anymore.
I would still prefer to use Espruino for sniffing the codes though :)