Dooya DC1802 sniffing and repeat



  • I really get stucked at it and need some help.
    My main goal is to control my shutters with my arduino uno. I have this dooya dc1802 remote.
    What i can achive now is that:

    And this is where i get stucket and don't know what to di whit this data. I already tried using the modified rc-switch lib with timing arrays without success, or simply put these High low changes manually lie this

    
    
    int TRANS = 10;
    
    
    void setup() {
      Serial.begin(9600);
      Serial.println("Ready...");
      pinMode(TRANS, OUTPUT);
    }
    
    void loop() {
      Serial.println("Start...");
      
      for(int i = 0; i<4; i++){
        digitalWrite(TRANS, LOW);
        delayMicroseconds(7800);      
        digitalWrite(TRANS, HIGH);
        delayMicroseconds(4660);
        digitalWrite(TRANS, LOW);    
        delayMicroseconds(1510);
        sendData();
      }
      Serial.println("Stop...");
      delay(5000);
      
      //stop
      
      
    }
    
    void sendData(){  
      for (const char* p = "0101110000110100110001111010010100111100"; *p; p++) {
        
        if (*p != '0'){
          digitalWrite(TRANS, HIGH);
          delayMicroseconds(660);
          digitalWrite(TRANS, LOW);
          delayMicroseconds(410);
        }else{
          digitalWrite(TRANS, HIGH);
          delayMicroseconds(310);
          digitalWrite(TRANS, LOW);
          delayMicroseconds(760);
        }
      }
      
    }
    

    But nothing works.



  • @peter-gonczy I'm only a noob, but is that the whole sketch? Doesn't it need to be setup so it talks to the gateway?


Log in to reply
 

Suggested Topics

15
Online

11.2k
Users

11.1k
Topics

112.5k
Posts