Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. My Project
  3. Controlling Blinds.com RF Dooya Motors with Arduino and Vera

Controlling Blinds.com RF Dooya Motors with Arduino and Vera

Scheduled Pinned Locked Moved My Project
90 Posts 29 Posters 74.0k Views 24 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • かいとか かいと

    Please help me,
    My remote is dooya. And sniff code:
    10000011 01000010 01001001 11100001 00110011 pause
    10000011 01000010 01001001 11100001 01010101 up
    10000011 01000010 01001001 11100001 00111100 down

    I had use USB Saleae Analyzer sniff code.

    But not work, :(

    alt text

    petewillP Offline
    petewillP Offline
    petewill
    Admin
    wrote on last edited by
    #66

    @かいと The pattern for the control may have changed...? Because you have a recording of the remote I would try to record what you are sending with your transmitter and compare the waveform of the two devices. They should be identical. That is how I ended up figuring out the exact timing needed for my motors.

    My "How To" home automation video channel: https://www.youtube.com/channel/UCq_Evyh5PQALx4m4CQuxqkA

    1 Reply Last reply
    0
    • かいとか Offline
      かいとか Offline
      かいと
      wrote on last edited by
      #67

      My remote alt text

      1 Reply Last reply
      0
      • P Offline
        P Offline
        PeteKnight
        wrote on last edited by
        #68

        Hi guys,
        I realise that this is quite an old thread, but i found it a useful source of info when looking for a solution for my 433MHz problem, so I thought I'd share some of my findings...

        We have a holiday home in Spain and it has some external 'awnings' that extend over the windows to provide shade from the sun. In Spain these are called Toldos. They operate using tubular motors controlled using 433MHz remote controls – one remote for each awning, three in total. I'd tried all the regular methods to sniff the 433MHz protocol, but none of the standard Arduino libraries would even acknowledge that the remote was sending out any sort of signal. Other remotes, such as garage door openers, PIR detectors etc work fine with my sniffer, so the hardware/software I was using is good.

        I eventually resorted to using my sound card and Audacity software to capture the transmissions from the remote controls and this work surprisingly well (I'd tried every digital approach you can imagine up to this point, including a logic analyser, and was reluctant to try the analogue approach but wish I’d trued it earlier).

        What I discovered is that when I press either the UP or the Down buttons on the remote, it transmits a timing pulse followed by 40 bits of data. At first I thought that this sequence was repeated 8 times, but I eventually realised that one 40-bit code was used for the first 4 repetitions of the data, followed by a different code for the next 4 repetitions. I later realised that whenever one of these buttons is pressed, the initial 40 bit code is transmitted continuously then the other code is transmitted 4 times when the button is released. When the button is pressed quickly I just get the 'Pressed' code 4 times followed by the 'Released' code 4 times.
        The Stop button works slightly differently - only one code is used and this is transmitted at least 4 times and will continue to be transmitted as long as the button is pressed. (in other words, the Stop button has a 'Pressed' code, but not a 'Released' code).

        It's actually the 'Pressed' code for each button that controls the awnings. The 'Released' code doesn't seem to serve any function with my awnings.
        These 'Released' codes really confused me to begin with, as I when I checked two different bursts of data from the same button using Audacity, I was getting different results. This was obviously because on one occasion I’d picked one of the ‘Pressed’ codes to analyse, but on the second occasion I’d inadvertently analysed a ‘Released’ code. At first I’d thought the analogue capture process was unreliable, but then I thought that maybe some sort of rolling code system was being used. I eventually realised what was going on, but not until I'd spent quite a bit of time cursing the remote control and the PC.
        I was able to replicate the transmitted code fairly accuracy using a version of @peashooter's code (thanks!) and this worked well
        I’m repeating the ‘Pressed’ code 4 times and it seems to work very reliably.

        As well as being able to control the awnings using an Arduino/ESP8266 transmitter, I also wanted to be able to use the existing handheld remotes, so to be able to understand the current position of each awning I needed a way of receiving the commands from the remotes and using them to keep track of each individual awning. This bought me back to the original problem of not being able to find a way to listen to the 433MHz messages from the remotes using any of the current Arduino libraries.
        In started delving into the idea of modifying the RC-Switch library, now that I knew the timing characteristics of the signals. At that point I stumbled across this small library:
        https://github.com/bjwelker/Raspi-Rollo

        It has an Arduino sketch that is written to identify the codes that are being transmitted by remote controllers for blinds, so that these codes can then be used to control the blinds using a Raspberry Pi.
        When I ran the Arduino sketch it immediately produced results from my Awning remotes – If only I’d found this earlier!
        The results it gives are in a “Quad Bit” format, but when I modified the code to print out the raw received codes they were identical to the results I’d obtained from Audacity.
        I’m not interested in using a Pi to transmit the codes to the blinds, and this wasn’t needed anyway, as using @peashooter's code I already had a transmission solution. I’m now in the process of fine-tuning the code that tracks each blind’s position based on the commands that are sent from either the hand-held remotes or my transmitter. The position is simply based on time between the start and stop transmissions and the known time that it takes to fully extend each awning.

        The primary reason for wanting to control the awnings is that when it gets windy, I want to be able to automatically retract them. I’m using data from a weather station to monitor the wind speed and if it meets the criteria (very strong winds for a short period, or not quite so strong winds for a slightly longer period, then the awnings will be retracted (assuming that they’re extended of course). I’m also automatically retracting them when it gets dark, as it’s easy to forget to do this and a bit cumbersome to walk around and do all three awnings using the separate hand-held remote controls.
        Here’s some pictures of one of the remotes:
        0_1531672414982_IMG_3613.jpg
        0_1531672435282_IMG_3611.jpg
        0_1531672454575_IMG_3610.jpg
        0_1531672467499_IMG_3609.jpg

        The brand name on the remote is Gaviota and the circuit board says “Designed by D Team” “DC104/105” “V2.1” and “No.DA288”.

        Here are what the awnings look like:

        0_1531672501926_IMG_3631.jpg
        I have no idea what the brand name is on the tubular motors, as they’re hidden inside the mechanism.
        Hopefully this saves someone at least some of the pain that I’ve been through to get to this point.

        Pete.

        1 Reply Last reply
        1
        • petewillP petewill

          I recently figured out how to control my Blinds.com motorized cellular shades (http://www.blinds.com/control/product/productID,97658) with my Vera 3. The blinds have Dooya DV24CE motors (which use a 433 MHz RF for remote control) built into them but I couldn't find any already built RF transmitter that integrated directly with the Vera. I had recently started building Arduino sensors with Henrik's amazing MySensors Arduino Sensor Plugin (http://www.mysensors.org) so I decided to try to build my own. Thanks to many helpful resources on the internet I was able to control my blinds for less than $20 in Arduino parts.

          Here is a link to a YouTube video with an overview of the process: http://youtu.be/EorIqw-9eJw

          Here is a pdf with more info on the process if you are interested in doing it yourself:
          Controlling Blinds.com RF Dooya Motors with Arduino and Vera.pdf

          Arduino Code MySensors Version 2.x:
          https://gist.github.com/petewill/ac31b186291743e046f83497de0ffa87

          And the Arduino Code (OLD CODE):
          BlindsVera.ino

          2020-12-06: Edited to add updated code

          M Offline
          M Offline
          MortenVinding
          wrote on last edited by
          #69

          @petewill
          Great guide.
          I stumbled upon this when I realised that my Debel awning was using a Dooya motor and remote.

          I did not use your cool system with the soundcard to sniff the RF codes, but instead used my RTL-SDR usb receiver, since I already had it laying around 😀

          After finding the codes I programmed an Arduino with it and connected it to my OpenHAB installation. Now the awning can be controlled with the OpenHAB app, and my wife just loves it 😀

          Just wanted to point it out for others looking for RF codes for Debel awnings.

          petewillP 1 Reply Last reply
          2
          • M MortenVinding

            @petewill
            Great guide.
            I stumbled upon this when I realised that my Debel awning was using a Dooya motor and remote.

            I did not use your cool system with the soundcard to sniff the RF codes, but instead used my RTL-SDR usb receiver, since I already had it laying around 😀

            After finding the codes I programmed an Arduino with it and connected it to my OpenHAB installation. Now the awning can be controlled with the OpenHAB app, and my wife just loves it 😀

            Just wanted to point it out for others looking for RF codes for Debel awnings.

            petewillP Offline
            petewillP Offline
            petewill
            Admin
            wrote on last edited by
            #70

            @mortenvinding cool! I looked at a couple of code "sniffers" when I did this but none of them worked. Good to hear progress has been made on that. Should save quite a bit of time.

            My "How To" home automation video channel: https://www.youtube.com/channel/UCq_Evyh5PQALx4m4CQuxqkA

            1 Reply Last reply
            0
            • ssuckowS Offline
              ssuckowS Offline
              ssuckow
              wrote on last edited by
              #71

              I recognize this is an old post, but I've not found any newer discussion and I have hit a roadblock. I've followed all of the very helpful posts to build a sniffer and decode it as tools like RCSwitch wouldn't work. I even used @PeteKnight 's tip to notice there was a different code sent initially when a button was pressed. I've tried sending both versions, emulating the initial (timing?) signal at the start. I tweaked the high and low delays and I think I've got a rf signal that is extremely close to the one from the remote. Here are the two different sources in audacity for comparison.
              ![0_1598212142451_RemoteInAudacity.JPG](Uploading 100%)

              //Define Variables
              #define GND 3
              #define VCC 4
              #define DATA 5 //Data pin for RF Transmitter
              #define ZERO_HIGH 307 //Delay for the high part of a 0 in microseconds
              #define ZERO_LOW 750 //Delay for the low part of a 0 in microseconds
              #define ONE_HIGH 648 //Delay for the high part of a 1 in microseconds
              #define ONE_LOW 409 //Delay for the low part of a 1 in microseconds
              
              int startUp = 1;
              
              unsigned char standardBits1 = 0b00001111; //integer value of the 28 bit standard sequence referenced above. "0b" prefix is for *******
              unsigned char standardBits2 = 0b01111100;
              unsigned char standardBits3 = 0b01100100;
              unsigned char standardBits4 = 0b00000001;
              unsigned char standardBits5 = 0b00011110;
              
              
              void setup() {
                pinMode(GND,OUTPUT);
                pinMode(VCC,OUTPUT);
                pinMode(DATA,INPUT);
                digitalWrite(GND,LOW);
                digitalWrite(VCC,HIGH);
                
                 Serial.begin(9600);
               
              }
              
              void loop() {
               unsigned char i;
                    delay(3000);
                  if(startUp ==1){
                  for(i=0;i<10;i++) {
                    delay(1000);
                    digitalWrite(DATA, HIGH);
                    delayMicroseconds(5000);
                    digitalWrite(DATA, LOW);    
                    delayMicroseconds(1500);        
              
                    eightBits(standardBits1);
                    eightBits(standardBits2);
                    eightBits(standardBits3);
                    eightBits(standardBits4);
                    eightBits(standardBits5);
                    startUp = 0;
                  }
               }
              }
                    void eightBits(unsigned char bits){
                    
                        unsigned char k;
                        int delayTime;
                        for(k=0;k<8;k++) {
                          int highTime;
                          int lowTime;
                          delayTime = ((bits>>(7-k)) & 1 ? 1 : 0); 
                        
                          if (delayTime == 1){
                            highTime = ONE_HIGH;
                            lowTime = ONE_LOW;
                          }
                          else {
                            highTime = ZERO_HIGH;
                            lowTime = ZERO_LOW;
                          }
                            digitalWrite(DATA, HIGH);
                            delayMicroseconds(highTime);
                            digitalWrite(DATA, LOW);    
                            delayMicroseconds(lowTime);        
                      }
                   
              }
              

              Here are all the codes I was able to extract from audacity for one of the blinds.
              Down1: 00001111 01111100 01100100 00000001 00111100
              Up1: 00001111 01111100 01100100 00000001 00011110
              Stop1: 00001111 01111100 01100100 00000001 01010101
              Start1: 00001111 01111100 01100100 00000001 00010001
              Does anyone have an idea of what I might still be missing in getting this work?

              petewillP D 2 Replies Last reply
              0
              • ssuckowS ssuckow

                I recognize this is an old post, but I've not found any newer discussion and I have hit a roadblock. I've followed all of the very helpful posts to build a sniffer and decode it as tools like RCSwitch wouldn't work. I even used @PeteKnight 's tip to notice there was a different code sent initially when a button was pressed. I've tried sending both versions, emulating the initial (timing?) signal at the start. I tweaked the high and low delays and I think I've got a rf signal that is extremely close to the one from the remote. Here are the two different sources in audacity for comparison.
                ![0_1598212142451_RemoteInAudacity.JPG](Uploading 100%)

                //Define Variables
                #define GND 3
                #define VCC 4
                #define DATA 5 //Data pin for RF Transmitter
                #define ZERO_HIGH 307 //Delay for the high part of a 0 in microseconds
                #define ZERO_LOW 750 //Delay for the low part of a 0 in microseconds
                #define ONE_HIGH 648 //Delay for the high part of a 1 in microseconds
                #define ONE_LOW 409 //Delay for the low part of a 1 in microseconds
                
                int startUp = 1;
                
                unsigned char standardBits1 = 0b00001111; //integer value of the 28 bit standard sequence referenced above. "0b" prefix is for *******
                unsigned char standardBits2 = 0b01111100;
                unsigned char standardBits3 = 0b01100100;
                unsigned char standardBits4 = 0b00000001;
                unsigned char standardBits5 = 0b00011110;
                
                
                void setup() {
                  pinMode(GND,OUTPUT);
                  pinMode(VCC,OUTPUT);
                  pinMode(DATA,INPUT);
                  digitalWrite(GND,LOW);
                  digitalWrite(VCC,HIGH);
                  
                   Serial.begin(9600);
                 
                }
                
                void loop() {
                 unsigned char i;
                      delay(3000);
                    if(startUp ==1){
                    for(i=0;i<10;i++) {
                      delay(1000);
                      digitalWrite(DATA, HIGH);
                      delayMicroseconds(5000);
                      digitalWrite(DATA, LOW);    
                      delayMicroseconds(1500);        
                
                      eightBits(standardBits1);
                      eightBits(standardBits2);
                      eightBits(standardBits3);
                      eightBits(standardBits4);
                      eightBits(standardBits5);
                      startUp = 0;
                    }
                 }
                }
                      void eightBits(unsigned char bits){
                      
                          unsigned char k;
                          int delayTime;
                          for(k=0;k<8;k++) {
                            int highTime;
                            int lowTime;
                            delayTime = ((bits>>(7-k)) & 1 ? 1 : 0); 
                          
                            if (delayTime == 1){
                              highTime = ONE_HIGH;
                              lowTime = ONE_LOW;
                            }
                            else {
                              highTime = ZERO_HIGH;
                              lowTime = ZERO_LOW;
                            }
                              digitalWrite(DATA, HIGH);
                              delayMicroseconds(highTime);
                              digitalWrite(DATA, LOW);    
                              delayMicroseconds(lowTime);        
                        }
                     
                }
                

                Here are all the codes I was able to extract from audacity for one of the blinds.
                Down1: 00001111 01111100 01100100 00000001 00111100
                Up1: 00001111 01111100 01100100 00000001 00011110
                Stop1: 00001111 01111100 01100100 00000001 01010101
                Start1: 00001111 01111100 01100100 00000001 00010001
                Does anyone have an idea of what I might still be missing in getting this work?

                petewillP Offline
                petewillP Offline
                petewill
                Admin
                wrote on last edited by
                #72

                @ssuckow I can't see the image but when I did this I started in small steps. Your first goal is to send a successful signal without all the MySensors code. I just created a standalone program with all my code in the setup so when it ran it would send a raise, stop or lower signal. Once you do that you can integrate it with MySensors much easier. It sounds like you have mostly done this based on your description above but I'm not sure. Also, are you sure the hardware is wired correctly? Is the 433Mhz device is getting enough power to send the signal to the blinds?

                My "How To" home automation video channel: https://www.youtube.com/channel/UCq_Evyh5PQALx4m4CQuxqkA

                ssuckowS 1 Reply Last reply
                0
                • ssuckowS ssuckow

                  I recognize this is an old post, but I've not found any newer discussion and I have hit a roadblock. I've followed all of the very helpful posts to build a sniffer and decode it as tools like RCSwitch wouldn't work. I even used @PeteKnight 's tip to notice there was a different code sent initially when a button was pressed. I've tried sending both versions, emulating the initial (timing?) signal at the start. I tweaked the high and low delays and I think I've got a rf signal that is extremely close to the one from the remote. Here are the two different sources in audacity for comparison.
                  ![0_1598212142451_RemoteInAudacity.JPG](Uploading 100%)

                  //Define Variables
                  #define GND 3
                  #define VCC 4
                  #define DATA 5 //Data pin for RF Transmitter
                  #define ZERO_HIGH 307 //Delay for the high part of a 0 in microseconds
                  #define ZERO_LOW 750 //Delay for the low part of a 0 in microseconds
                  #define ONE_HIGH 648 //Delay for the high part of a 1 in microseconds
                  #define ONE_LOW 409 //Delay for the low part of a 1 in microseconds
                  
                  int startUp = 1;
                  
                  unsigned char standardBits1 = 0b00001111; //integer value of the 28 bit standard sequence referenced above. "0b" prefix is for *******
                  unsigned char standardBits2 = 0b01111100;
                  unsigned char standardBits3 = 0b01100100;
                  unsigned char standardBits4 = 0b00000001;
                  unsigned char standardBits5 = 0b00011110;
                  
                  
                  void setup() {
                    pinMode(GND,OUTPUT);
                    pinMode(VCC,OUTPUT);
                    pinMode(DATA,INPUT);
                    digitalWrite(GND,LOW);
                    digitalWrite(VCC,HIGH);
                    
                     Serial.begin(9600);
                   
                  }
                  
                  void loop() {
                   unsigned char i;
                        delay(3000);
                      if(startUp ==1){
                      for(i=0;i<10;i++) {
                        delay(1000);
                        digitalWrite(DATA, HIGH);
                        delayMicroseconds(5000);
                        digitalWrite(DATA, LOW);    
                        delayMicroseconds(1500);        
                  
                        eightBits(standardBits1);
                        eightBits(standardBits2);
                        eightBits(standardBits3);
                        eightBits(standardBits4);
                        eightBits(standardBits5);
                        startUp = 0;
                      }
                   }
                  }
                        void eightBits(unsigned char bits){
                        
                            unsigned char k;
                            int delayTime;
                            for(k=0;k<8;k++) {
                              int highTime;
                              int lowTime;
                              delayTime = ((bits>>(7-k)) & 1 ? 1 : 0); 
                            
                              if (delayTime == 1){
                                highTime = ONE_HIGH;
                                lowTime = ONE_LOW;
                              }
                              else {
                                highTime = ZERO_HIGH;
                                lowTime = ZERO_LOW;
                              }
                                digitalWrite(DATA, HIGH);
                                delayMicroseconds(highTime);
                                digitalWrite(DATA, LOW);    
                                delayMicroseconds(lowTime);        
                          }
                       
                  }
                  

                  Here are all the codes I was able to extract from audacity for one of the blinds.
                  Down1: 00001111 01111100 01100100 00000001 00111100
                  Up1: 00001111 01111100 01100100 00000001 00011110
                  Stop1: 00001111 01111100 01100100 00000001 01010101
                  Start1: 00001111 01111100 01100100 00000001 00010001
                  Does anyone have an idea of what I might still be missing in getting this work?

                  D Offline
                  D Offline
                  doteq
                  wrote on last edited by
                  #73

                  @ssuckow said in Controlling Blinds.com RF Dooya Motors with Arduino and Vera:

                  pinMode(DATA,INPUT);

                  Why data pin is input? I think it should be output.

                  ssuckowS 1 Reply Last reply
                  0
                  • petewillP petewill

                    @ssuckow I can't see the image but when I did this I started in small steps. Your first goal is to send a successful signal without all the MySensors code. I just created a standalone program with all my code in the setup so when it ran it would send a raise, stop or lower signal. Once you do that you can integrate it with MySensors much easier. It sounds like you have mostly done this based on your description above but I'm not sure. Also, are you sure the hardware is wired correctly? Is the 433Mhz device is getting enough power to send the signal to the blinds?

                    ssuckowS Offline
                    ssuckowS Offline
                    ssuckow
                    wrote on last edited by
                    #74

                    @petewill Sorry, it seems I had to use the .jpeg extension instead of .jpg. My code is just trying to move the blinds without any extra code. This image shows the remote signal on the top and the Arduino generated signal on the bottom.
                    RemoteInAudacity.JPeG

                    1 Reply Last reply
                    1
                    • D doteq

                      @ssuckow said in Controlling Blinds.com RF Dooya Motors with Arduino and Vera:

                      pinMode(DATA,INPUT);

                      Why data pin is input? I think it should be output.

                      ssuckowS Offline
                      ssuckowS Offline
                      ssuckow
                      wrote on last edited by
                      #75

                      @doteq You are correct. That was a holdover from when I was trying to sniff. I tweaked that and this image shows the updated version as Arduino7. Apparently it worked with it defined as input (as receiver connected to audacity was picking it up), but their was a lot more noise. Now, the signal looks very much like the source remote. However, It still doesn't move the blinds. :disappointed:

                      Capture.jpeg

                      P 1 Reply Last reply
                      0
                      • electrikE Offline
                        electrikE Offline
                        electrik
                        wrote on last edited by
                        #76

                        From the code it looks like you're switching on the receiver by enabling the gnd and vcc pins with an output of the microcontroller. Do you have additional transistors to do so, or just with the output pins directly? In the last case I would recommend to connect it to gnd and vcc directly, to make sure enough current is available.

                        1 Reply Last reply
                        0
                        • ssuckowS Offline
                          ssuckowS Offline
                          ssuckow
                          wrote on last edited by
                          #77

                          I just tried moving it to the VCC and ground pins and it didn't work either.

                          1 Reply Last reply
                          0
                          • D Offline
                            D Offline
                            doteq
                            wrote on last edited by
                            #78

                            @ssuckow I managed to control blinds with your code. Make sure you have wire attached for antenna.

                            1 Reply Last reply
                            0
                            • ssuckowS ssuckow

                              @doteq You are correct. That was a holdover from when I was trying to sniff. I tweaked that and this image shows the updated version as Arduino7. Apparently it worked with it defined as input (as receiver connected to audacity was picking it up), but their was a lot more noise. Now, the signal looks very much like the source remote. However, It still doesn't move the blinds. :disappointed:

                              Capture.jpeg

                              P Offline
                              P Offline
                              PeteKnight
                              wrote on last edited by
                              #79

                              @ssuckow what you’ve posted seems to be a good match for the original.
                              I’m wondering, based on your other comments, if your blinds need the message repeating several times (with my blinds it’s 4 times) or if the initial message is a sort of ‘stand by to receive a command’ instruction that needs to then be followed by the command message (maybe multiple times?).
                              Try quickly stabbing at the remote control button whilst recording in Audacity and look at the bigger picture. This might give you a bigger picture of the complete command set that the remote is sending when a button is pressed.

                              Pete.

                              1 Reply Last reply
                              0
                              • M Offline
                                M Offline
                                mmartins
                                wrote on last edited by
                                #80

                                @PeteKnight I'm also trying to control my Gaviota awnings with no success, my remote is not from Gaviota but a white label one (It says it uses rolling codes - it's the MX96 https://cloud.motorline.pt/download/manuais/eletronica/mx95-96-97_pt.pdf). I've tried decoding the codes with a cheap RF receiver hooked up with an ESP32 with espHome. I can get some codes sometimes, if I keep my finger pressed for a long time, but none of them work and they do not seam consistent. Since I do not have a raspberry I cannot run that code from Raspi-Rollo.

                                How did you use audacity to decode the codes? Would you mind sharing the codes you got so I can see if they work here? I have 2 awnings, and I can select which one I control on the remote, does that mean that they are using different codes?

                                Thanks

                                P 1 Reply Last reply
                                0
                                • M mmartins

                                  @PeteKnight I'm also trying to control my Gaviota awnings with no success, my remote is not from Gaviota but a white label one (It says it uses rolling codes - it's the MX96 https://cloud.motorline.pt/download/manuais/eletronica/mx95-96-97_pt.pdf). I've tried decoding the codes with a cheap RF receiver hooked up with an ESP32 with espHome. I can get some codes sometimes, if I keep my finger pressed for a long time, but none of them work and they do not seam consistent. Since I do not have a raspberry I cannot run that code from Raspi-Rollo.

                                  How did you use audacity to decode the codes? Would you mind sharing the codes you got so I can see if they work here? I have 2 awnings, and I can select which one I control on the remote, does that mean that they are using different codes?

                                  Thanks

                                  P Offline
                                  P Offline
                                  PeteKnight
                                  wrote on last edited by
                                  #81

                                  @mmartins if you re-read what I wrote, you’ll see that the Raspi-Rollo software has an Arduino sketch to identity the codes. I ran this on a NodeMCU, so it should work on an ESP32.
                                  If you need to use Audacity then the process is well documented in the links earlier in this topic.

                                  I have three blinds and they all use independent remotes and each blind has its own codes.
                                  I’m not sure how my codes will help with yours, but here are the codes for one of my blinds:

                                  Up
                                  1011101000110000111011101001000100010001

                                  Stop
                                  1011101000110000111011101001000101010101

                                  Down
                                  1011101000110000111011101001000100110011

                                  If your blinds do actually use rolling codes the I don’t think you’ll be able to control them the same way that I do.

                                  Pete.

                                  1 Reply Last reply
                                  0
                                  • petewillP petewill

                                    I recently figured out how to control my Blinds.com motorized cellular shades (http://www.blinds.com/control/product/productID,97658) with my Vera 3. The blinds have Dooya DV24CE motors (which use a 433 MHz RF for remote control) built into them but I couldn't find any already built RF transmitter that integrated directly with the Vera. I had recently started building Arduino sensors with Henrik's amazing MySensors Arduino Sensor Plugin (http://www.mysensors.org) so I decided to try to build my own. Thanks to many helpful resources on the internet I was able to control my blinds for less than $20 in Arduino parts.

                                    Here is a link to a YouTube video with an overview of the process: http://youtu.be/EorIqw-9eJw

                                    Here is a pdf with more info on the process if you are interested in doing it yourself:
                                    Controlling Blinds.com RF Dooya Motors with Arduino and Vera.pdf

                                    Arduino Code MySensors Version 2.x:
                                    https://gist.github.com/petewill/ac31b186291743e046f83497de0ffa87

                                    And the Arduino Code (OLD CODE):
                                    BlindsVera.ino

                                    2020-12-06: Edited to add updated code

                                    Stanley MeloS Offline
                                    Stanley MeloS Offline
                                    Stanley Melo
                                    wrote on last edited by
                                    #82
                                    This post is deleted!
                                    1 Reply Last reply
                                    0
                                    • petewillP petewill

                                      I recently figured out how to control my Blinds.com motorized cellular shades (http://www.blinds.com/control/product/productID,97658) with my Vera 3. The blinds have Dooya DV24CE motors (which use a 433 MHz RF for remote control) built into them but I couldn't find any already built RF transmitter that integrated directly with the Vera. I had recently started building Arduino sensors with Henrik's amazing MySensors Arduino Sensor Plugin (http://www.mysensors.org) so I decided to try to build my own. Thanks to many helpful resources on the internet I was able to control my blinds for less than $20 in Arduino parts.

                                      Here is a link to a YouTube video with an overview of the process: http://youtu.be/EorIqw-9eJw

                                      Here is a pdf with more info on the process if you are interested in doing it yourself:
                                      Controlling Blinds.com RF Dooya Motors with Arduino and Vera.pdf

                                      Arduino Code MySensors Version 2.x:
                                      https://gist.github.com/petewill/ac31b186291743e046f83497de0ffa87

                                      And the Arduino Code (OLD CODE):
                                      BlindsVera.ino

                                      2020-12-06: Edited to add updated code

                                      Stanley MeloS Offline
                                      Stanley MeloS Offline
                                      Stanley Melo
                                      wrote on last edited by
                                      #83
                                      This post is deleted!
                                      1 Reply Last reply
                                      0
                                      • carlscicC Offline
                                        carlscicC Offline
                                        carlscic
                                        wrote on last edited by
                                        #84

                                        @petewill I've managed to get the binary code with Audacity quite easy but got stuck as for each button pressed sends out a combination of codes.

                                        Just for the open, always the same code in binary, 0111000000001100100011001110000100011110 twice and then 0111000000001100100011001110000100010001 three times.

                                        //Define Variables
                                        #define SEND_DATA 3 //Data pin for RF Transmitter
                                        #define ZERO_HIGH 376 //Delay for the high part of a 0 in microseconds
                                        #define ZERO_LOW 648 //Delay for the low part of a 0 in microseconds
                                        #define ONE_HIGH 713 //Delay for the high part of a 1 in microseconds
                                        #define ONE_LOW 306 //Delay for the low part of a 1 in microseconds
                                        
                                        int startUp = 1;
                                        
                                        unsigned char standardBits1 = 0b01110000; //sequence with "0b" prefix
                                        unsigned char standardBits2 = 0b00001100;
                                        unsigned char standardBits3 = 0b10001100;
                                        unsigned char standardBits4 = 0b11100001;
                                        unsigned char standardBits5 = 0b00011110;
                                        unsigned char standardBits6 = 0b00010001;
                                        int steps = 1;
                                        
                                        //0111000000001100100011001110000100011110  x2
                                        //0111000000001100100011001110000100010001  x3
                                        
                                        void setup() {
                                           
                                           Serial.begin(9600);
                                         
                                        }
                                        
                                        void loop() 
                                        {
                                         
                                          if(startUp == 1)
                                          {
                                            
                                        
                                          oneBits(standardBits1);
                                          oneBits(standardBits2);
                                          oneBits(standardBits3);
                                          oneBits(standardBits4);
                                          oneBits(standardBits6);
                                        
                                          twoBits(standardBits1);
                                          twoBits(standardBits2);
                                          twoBits(standardBits3);
                                          twoBits(standardBits4);
                                          twoBits(standardBits5); 
                                        
                                          startUp = 1;          //to keep repeating
                                          delayMicroseconds(5000);
                                          }
                                        
                                        }
                                        
                                        void oneBits(unsigned char bits){
                                            
                                            unsigned char k;
                                            int delayTime;
                                            for(k=0;k<8;k++) {
                                              int highTime;
                                              int lowTime;
                                              delayTime = ((bits>>(7-k)) & 1 ? 1 : 0); 
                                              
                                              if (delayTime == 1){
                                                highTime = ONE_HIGH;
                                                lowTime = ONE_LOW;
                                              }
                                              else {
                                                highTime = ZERO_HIGH;
                                                lowTime = ZERO_LOW;
                                                digitalWrite(SEND_DATA, HIGH);
                                                delayMicroseconds(highTime);
                                                digitalWrite(SEND_DATA, LOW);    
                                                delayMicroseconds(lowTime);
                                                }
                                            }
                                            
                                        
                                        }
                                        void PAUSE()
                                        {
                                        delayMicroseconds(1650);
                                        }
                                        
                                        
                                        void twoBits(unsigned char bits)
                                        {
                                        
                                            unsigned char l;
                                            int delayTime;
                                            for(l=0;l<8;l++)
                                                {
                                                  
                                               
                                              int highTime;
                                              int lowTime;
                                              delayTime = ((bits>>(7-l)) & 1 ? 1 : 0); 
                                            
                                              if (delayTime == 1){
                                                highTime = ONE_HIGH;
                                                lowTime = ONE_LOW;
                                              }
                                              else {
                                                highTime = ZERO_HIGH;
                                                lowTime = ZERO_LOW;
                                                }      
                                              
                                                digitalWrite(SEND_DATA, HIGH);
                                                delayMicroseconds(highTime);
                                                digitalWrite(SEND_DATA, LOW);    
                                                delayMicroseconds(lowTime);
                                              }
                                                }   
                                        

                                        I'm seeing the 'results' back on Audacity since the code is set on a loop. Not to complicate more I'm just using 2 different codes but they are broadcasted to each other.

                                        Is there anything I could do to separate them as any delay in between the processes won't work??

                                        Thanks

                                        Carl

                                        petewillP 1 Reply Last reply
                                        0
                                        • carlscicC carlscic

                                          @petewill I've managed to get the binary code with Audacity quite easy but got stuck as for each button pressed sends out a combination of codes.

                                          Just for the open, always the same code in binary, 0111000000001100100011001110000100011110 twice and then 0111000000001100100011001110000100010001 three times.

                                          //Define Variables
                                          #define SEND_DATA 3 //Data pin for RF Transmitter
                                          #define ZERO_HIGH 376 //Delay for the high part of a 0 in microseconds
                                          #define ZERO_LOW 648 //Delay for the low part of a 0 in microseconds
                                          #define ONE_HIGH 713 //Delay for the high part of a 1 in microseconds
                                          #define ONE_LOW 306 //Delay for the low part of a 1 in microseconds
                                          
                                          int startUp = 1;
                                          
                                          unsigned char standardBits1 = 0b01110000; //sequence with "0b" prefix
                                          unsigned char standardBits2 = 0b00001100;
                                          unsigned char standardBits3 = 0b10001100;
                                          unsigned char standardBits4 = 0b11100001;
                                          unsigned char standardBits5 = 0b00011110;
                                          unsigned char standardBits6 = 0b00010001;
                                          int steps = 1;
                                          
                                          //0111000000001100100011001110000100011110  x2
                                          //0111000000001100100011001110000100010001  x3
                                          
                                          void setup() {
                                             
                                             Serial.begin(9600);
                                           
                                          }
                                          
                                          void loop() 
                                          {
                                           
                                            if(startUp == 1)
                                            {
                                              
                                          
                                            oneBits(standardBits1);
                                            oneBits(standardBits2);
                                            oneBits(standardBits3);
                                            oneBits(standardBits4);
                                            oneBits(standardBits6);
                                          
                                            twoBits(standardBits1);
                                            twoBits(standardBits2);
                                            twoBits(standardBits3);
                                            twoBits(standardBits4);
                                            twoBits(standardBits5); 
                                          
                                            startUp = 1;          //to keep repeating
                                            delayMicroseconds(5000);
                                            }
                                          
                                          }
                                          
                                          void oneBits(unsigned char bits){
                                              
                                              unsigned char k;
                                              int delayTime;
                                              for(k=0;k<8;k++) {
                                                int highTime;
                                                int lowTime;
                                                delayTime = ((bits>>(7-k)) & 1 ? 1 : 0); 
                                                
                                                if (delayTime == 1){
                                                  highTime = ONE_HIGH;
                                                  lowTime = ONE_LOW;
                                                }
                                                else {
                                                  highTime = ZERO_HIGH;
                                                  lowTime = ZERO_LOW;
                                                  digitalWrite(SEND_DATA, HIGH);
                                                  delayMicroseconds(highTime);
                                                  digitalWrite(SEND_DATA, LOW);    
                                                  delayMicroseconds(lowTime);
                                                  }
                                              }
                                              
                                          
                                          }
                                          void PAUSE()
                                          {
                                          delayMicroseconds(1650);
                                          }
                                          
                                          
                                          void twoBits(unsigned char bits)
                                          {
                                          
                                              unsigned char l;
                                              int delayTime;
                                              for(l=0;l<8;l++)
                                                  {
                                                    
                                                 
                                                int highTime;
                                                int lowTime;
                                                delayTime = ((bits>>(7-l)) & 1 ? 1 : 0); 
                                              
                                                if (delayTime == 1){
                                                  highTime = ONE_HIGH;
                                                  lowTime = ONE_LOW;
                                                }
                                                else {
                                                  highTime = ZERO_HIGH;
                                                  lowTime = ZERO_LOW;
                                                  }      
                                                
                                                  digitalWrite(SEND_DATA, HIGH);
                                                  delayMicroseconds(highTime);
                                                  digitalWrite(SEND_DATA, LOW);    
                                                  delayMicroseconds(lowTime);
                                                }
                                                  }   
                                          

                                          I'm seeing the 'results' back on Audacity since the code is set on a loop. Not to complicate more I'm just using 2 different codes but they are broadcasted to each other.

                                          Is there anything I could do to separate them as any delay in between the processes won't work??

                                          Thanks

                                          Carl

                                          petewillP Offline
                                          petewillP Offline
                                          petewill
                                          Admin
                                          wrote on last edited by
                                          #85

                                          @carlscic Sorry, I'm not clear on what you're looking to do. Have you compared the original Audacity recording to the signals you are sending from the Arduino? You should be able to compare them and make the necessary adjustments to the code so the two recordings are identical.

                                          My "How To" home automation video channel: https://www.youtube.com/channel/UCq_Evyh5PQALx4m4CQuxqkA

                                          1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          13

                                          Online

                                          11.7k

                                          Users

                                          11.2k

                                          Topics

                                          113.1k

                                          Posts


                                          Copyright 2025 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • MySensors
                                          • OpenHardware.io
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular