argilo / secplus

A software implementation of the Security+ system used by garage door openers
GNU General Public License v3.0
235 stars 31 forks source link

example with Arduino possible? #19

Open fntslz opened 1 year ago

fntslz commented 1 year ago

HI , I would like to be able to decode my remote control https://www.chamberlaindiy.com.au/product/three-button-mini-key-ring-garage-door-remote-security-2/ with Arduino but I can't do it. Does anyone have an example of RX and TX for use with the Arduino? Thank you

aeonSolutions commented 1 year ago

Can you explain in detail what you need?

fntslz commented 1 year ago

HI, I would like to build a receiver with arduino that recognizes my remote control to turn on some lights (a small corridor where I can't install sensors or buttons). I would also like to be able to transmit the code with arduino to open my garage. The remote control is the one in the first post.

I have arduino uno and a cheap rx and tx at 433.

Thanks for your help.

fntslz commented 1 year ago

my problem is that I can't write the code with arduino, I can't use the secplus.c and secplus.h libraries. Thank you

aeonSolutions commented 1 year ago

First, you need to establish successful communication with the remote control. And for that, you need to "hack" your remote control.

aeonSolutions commented 1 year ago

my problem is that I can't write the code with arduino, I can't use the secplus.c and secplus.h libraries. Thank you

I can code that for you at a fair cost. Send me a message on WhatsApp +32 471 632 520 .

While you decide, I leave here a tutorial by Manuel Schütze "Decode Rolling Code 433Mhz Signals with Arduino" https://www.manuelschutze.com/?p=333

There is also a discussion about this on the Arduino Forum here https://forum.arduino.cc/t/feasibility-can-the-arduino-open-rolling-code-garage-doors/403949/12

fntslz commented 1 year ago

Hi everyone, I studied a bit and finally I was able to use the library. Here is the arduino code:

include

const uint8_t frame1[20] = { 0, 0, 1, 1, 0, 2, 0, 2, 0, 1, 0, 2, 1, 0, 1, 0, 2, 1, 2, 0 }; const uint8_t frame2[20] = { 2, 2, 1, 0, 2, 0, 1, 1, 2, 2, 1, 1, 1, 2, 0, 1, 1, 1, 0, 1 };

const uint8_t frame3[20] = { 1, 1, 0, 1, 2, 1, 1, 2, 0, 1, 0, 2, 0, 2, 0, 1, 1, 1, 0, 1 }; const uint8_t frame4[20] = { 2, 2, 1, 0, 0, 1, 0, 1, 2, 2, 0, 0, 0, 0, 2, 1, 1, 1, 1, 2 };

const uint8_t frame5[20] = { 1, 1, 2, 0, 0, 1, 1, 2, 1, 2, 1, 1, 0, 1, 2, 2, 1, 2, 2, 1 }; const uint8_t frame6[20] = { 2, 2, 0, 2, 2, 2, 0, 2, 0, 1, 1, 0, 0, 0, 2, 1, 0, 0, 0, 0 };

uint32_t roll; uint32_t fix;

void setup() { Serial.begin(9600); // initialize serial Serial.println("Start Decoding"); delay(500); }

void loop() { decode_v1(frame1, frame2, &roll, &fix); Serial.print(roll); Serial.print(" "); Serial.println(fix); decode_v1(frame3, frame4, &roll, &fix); Serial.print(roll); Serial.print(" "); Serial.println(fix); decode_v1(frame5, frame6, &roll, &fix); Serial.print(roll); Serial.print(" "); Serial.println(fix); while (true) {} }

frame1 and frame2 are the data acquired the first time the remote control is pressed. frame3 and frame4 are the data acquired on the second press of the remote control. frame5 and frame6 are the data acquired when the remote control is pressed for the third time. it's definitely not perfect as code but at least it works.

Now I'm working on the HW part to correctly receive the signal and process it and then pass it to the secplus library.

thanks to aeonSolutions