3 static int intertechno_callback(uint8_t bb[BITBUF_ROWS][BITBUF_COLS], int16_t bits_per_row[BITBUF_ROWS]) {
5 //if (bb[1][1] == 0 && bb[1][0] != 0 && bb[1][3]==bb[2][3]){
6 if(bb[0][0]==0 && bb[0][0] == 0 && bb[1][0] == 0x56){
7 fprintf(stderr, "Switch event:\n");
8 fprintf(stderr, "protocol = Intertechno\n");
9 fprintf(stderr, "rid = %x\n",bb[1][0]);
10 fprintf(stderr, "rid = %x\n",bb[1][1]);
11 fprintf(stderr, "rid = %x\n",bb[1][2]);
12 fprintf(stderr, "rid = %x\n",bb[1][3]);
13 fprintf(stderr, "rid = %x\n",bb[1][4]);
14 fprintf(stderr, "rid = %x\n",bb[1][5]);
15 fprintf(stderr, "rid = %x\n",bb[1][6]);
16 fprintf(stderr, "rid = %x\n",bb[1][7]);
17 fprintf(stderr, "ADDR Slave = %i\n",bb[1][7] & 0b00001111);
18 fprintf(stderr, "ADDR Master = %i\n",(bb[1][7] & 0b11110000) >> 4);
19 fprintf(stderr, "command = %i\n",(bb[1][6] & 0b00000111));
20 fprintf(stderr, "%02x %02x %02x %02x %02x\n",bb[1][0],bb[1][1],bb[1][2],bb[1][3],bb[1][4]);
23 debug_callback(bb, bits_per_row);
30 r_device intertechno = {
32 /* .name = */ "Intertechno 433",
33 /* .modulation = */ OOK_PWM_D,
34 /* .short_limit = */ 100,
35 /* .long_limit = */ 350,
36 /* .reset_limit = */ 3000,
37 /* .json_callback = */ &intertechno_callback,
38 /* .json_callback = */ //&debug_callback,