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.
  • petewillP Offline
    petewillP Offline
    petewill
    Admin
    wrote on last edited by petewill
    #1

    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

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

    M Stanley MeloS 3 Replies Last reply
    7
    • hekH Offline
      hekH Offline
      hek
      Admin
      wrote on last edited by
      #2

      Thanks for the guide and Arduino sensor example @petewill .

      Really fun to read about how you sniffed the radio signal from your blinds! I had no idea it would be that "simple".

      1 Reply Last reply
      0
      • petewillP Offline
        petewillP Offline
        petewill
        Admin
        wrote on last edited by
        #3

        I am working on an updated version of this code to include multiple remotes as well as send status back to Vera. I have the multiple remotes code working well but I'm running into problems updating the status. I don't think I'm understanding how to properly send an update to the S_COVER sensor type. I have read the API instructions 2 or 3 times but I'm not a coder so I'll admit I don't fully understand it all. I think that I should use this code to update the Vera: "gw.sendVariable(message.header.childId, V_UP, 100)" but it's not working as I thought would. Should I maybe be sending a 1 instead of a 100? Or, something else? When I look at the advanced settings the LoadLevelStatus is 100 when the blind is up (done through web interface) so I think sending 100 is correct. Maybe I should be sending it as a different variable like V_Dimmer? Here is my code where I'm sending the status back to Vera. Thanks!

              if (message.header.type==V_STOP){ //Stop
                  unsigned char i;
                  for(i=0;i<2;i++) {  
                    blindAction(message.header.childId, 3); //blindAction(channel, action) action: 1=up, 2=down, 3=stop
                    delay(100);
                  }
                  Serial.println("STOP command");
              }
              else if(incomingBlindData == 100 || message.header.type==V_UP){//100 = Open/Up
                 unsigned char i;
                 for(i=0;i<2;i++) {
                   blindAction(message.header.childId, 1);
                   delay(100);
                 }
                 Serial.println("UP command");
                 gw.sendVariable(message.header.childId, V_UP, 100); // Update Vera with status of blinds (up/down) 
              }
              else if (incomingBlindData == 0 || message.header.type==V_DOWN) { //0 = Closed/Down
                 unsigned char i;
                 for(i=0;i<2;i++) { 
                   blindAction(message.header.childId,2); 
                   delay(100);
                 }
                 Serial.println("DOWN command");
                 gw.sendVariable(message.header.childId, V_DOWN, 0); // Update Vera with status of blinds (up/down)
           
              }
        

        S_Cover Advanced Settings.png

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

        1 Reply Last reply
        0
        • hekH Offline
          hekH Offline
          hek
          Admin
          wrote on last edited by
          #4

          UP/DOWN/STOP is commands and does not have any values associated with them.

          And yes, LoadLevelStatus is updated by setting dimmer value.

          petewillP 1 Reply Last reply
          0
          • hekH hek

            UP/DOWN/STOP is commands and does not have any values associated with them.

            And yes, LoadLevelStatus is updated by setting dimmer value.

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

            @hek
            Excellent, thank you! Now to make some code changes and test some more.

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

            1 Reply Last reply
            0
            • greglG Offline
              greglG Offline
              gregl
              Hero Member
              wrote on last edited by
              #6

              Really cool Pete...
              Ive some blind motors on the way..they are not RF though..so don't think ill need to decode the RF but thanks for the video explaining how it is done!

              Cheers,
              Greg

              1 Reply Last reply
              0
              • petewillP Offline
                petewillP Offline
                petewill
                Admin
                wrote on last edited by
                #7

                @gregl You're welcome. I have received much more help than I have given but I do try to help when I can. Thanks for your posts as well. This community is great!

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

                1 Reply Last reply
                0
                • C Offline
                  C Offline
                  C.r.a.z.y.
                  wrote on last edited by
                  #8

                  Awesome work!

                  Is three anyway to copy a ROLLING code?

                  petewillP 1 Reply Last reply
                  0
                  • C C.r.a.z.y.

                    Awesome work!

                    Is three anyway to copy a ROLLING code?

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

                    @C.r.a.z.y. Not sure but I'm guessing it wouldn't be as easy as this since it is used for security. I would guess there is some key that it uses to generate the codes and you would need to figure that out. All just guesses though.

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

                    C 1 Reply Last reply
                    0
                    • petewillP petewill

                      @C.r.a.z.y. Not sure but I'm guessing it wouldn't be as easy as this since it is used for security. I would guess there is some key that it uses to generate the codes and you would need to figure that out. All just guesses though.

                      C Offline
                      C Offline
                      C.r.a.z.y.
                      wrote on last edited by
                      #10
                      This post is deleted!
                      1 Reply Last reply
                      0
                      • C Offline
                        C Offline
                        C.r.a.z.y.
                        wrote on last edited by
                        #11

                        433mhz-outlet
                        please check this ;

                        http://forum.mysensors.org/topic/713/433mhz-outlet

                        1 Reply Last reply
                        0
                        • petewillP Offline
                          petewillP Offline
                          petewill
                          Admin
                          wrote on last edited by
                          #12

                          Here is the updated code for 1.4 if anyone needs it...
                          https://codebender.cc/sketch:67780

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

                          BulldogLowellB C 2 Replies Last reply
                          1
                          • petewillP petewill

                            Here is the updated code for 1.4 if anyone needs it...
                            https://codebender.cc/sketch:67780

                            BulldogLowellB Offline
                            BulldogLowellB Offline
                            BulldogLowell
                            Contest Winner
                            wrote on last edited by
                            #13

                            @petewill

                            great to see the update... gives me another thing to do!

                            1 Reply Last reply
                            0
                            • petewillP petewill

                              Here is the updated code for 1.4 if anyone needs it...
                              https://codebender.cc/sketch:67780

                              C Offline
                              C Offline
                              C.r.a.z.y.
                              wrote on last edited by
                              #14

                              @petewill Thank you Pete. I tried this code and found 9 devices. I changed 433 codes but didnt work.

                              Before mySensors how can i test the 433 code if it works or not?

                              Are these settings correct?
                              1101010101011100000000110
                              1101010101011100000011000

                              define SEND_DATA 3 //Data pin for RF Transmitter
                              define ZERO_HIGH 270 //Delay for the high part of a 0 in microseconds
                              define ZERO_LOW 950 //Delay for the low part of a 0 in microseconds
                              define ONE_HIGH 910 //Delay for the high part of a 1 in microseconds
                              define ONE_LOW 300//Delay for the low part of a 1 in microseconds

                              Audocity file : http://1drv.ms/1wmgh2e

                              https://codebender.cc/sketch:67840

                              1 Reply Last reply
                              0
                              • petewillP Offline
                                petewillP Offline
                                petewill
                                Admin
                                wrote on last edited by
                                #15

                                @C.r.a.z.y. This code is designed specifically for my blinds. You will need to modify it for your outlets based on the pattern of the code that is being sent. I took a look at your audacity file but I'm not exactly sure what I'm looking at. Did you press the On button 3 times then the Off button 3 times?
                                As far as testing, what I did was just start with one command (On or Off in your case) and put it all in the loop function. Just put it an if statement so it only executes once. It will execute once when you plug in the arduino. Then you can get it sending the right codes correctly and not worry about the Vera setup.

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

                                1 Reply Last reply
                                0
                                • petewillP Offline
                                  petewillP Offline
                                  petewill
                                  Admin
                                  wrote on last edited by petewill
                                  #16

                                  @C.r.a.z.y. Also, I forgot to mention this in my post above but you may want to consider making outlets with HEKs sketch. That's what I ended up doing because then I could see the status. With the RF stuff you can only send a signal but you don't get an acknowledgment as to if it worked or not.

                                  EDIT: I made my own outlets using HEKs relay sketch. That's how I see the status. I didn't end up using RF for outlets although I had originally planned to. I realized I wasn't very clear in my post above.

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

                                  C 1 Reply Last reply
                                  0
                                  • petewillP petewill

                                    @C.r.a.z.y. Also, I forgot to mention this in my post above but you may want to consider making outlets with HEKs sketch. That's what I ended up doing because then I could see the status. With the RF stuff you can only send a signal but you don't get an acknowledgment as to if it worked or not.

                                    EDIT: I made my own outlets using HEKs relay sketch. That's how I see the status. I didn't end up using RF for outlets although I had originally planned to. I realized I wasn't very clear in my post above.

                                    C Offline
                                    C Offline
                                    C.r.a.z.y.
                                    wrote on last edited by
                                    #17

                                    @petewill thank you Pete. I will try to modify at least i will sent rf code. Yes audocity file pressed 3 times on + 3 times off..

                                    1 Reply Last reply
                                    0
                                    • C Offline
                                      C Offline
                                      C.r.a.z.y.
                                      wrote on last edited by
                                      #18

                                      I think these are not the same with youtube video?

                                      define SEND_DATA 3 //Data pin for RF Transmitter
                                      define ZERO_HIGH 270 //Delay for the high part of a 0 in microseconds
                                      define ZERO_LOW 950 //Delay for the low part of a 0 in microseconds
                                      define ONE_HIGH 910 //Delay for the high part of a 1 in microseconds
                                      define ONE_LOW 300//Delay for the low part of a 1 in microseconds

                                      I read one of my remote with RC-Switch but other remote didnt work with RC-Switch.

                                      Your method is more general because RC-Switch only reads some kind of chipsets... SC5262 / SC5272, HX2262 / HX2272, PT2262 / PT2272, EV1527, RT1527, FP1527 or HS1527

                                      How can i convert this data to 32bit?
                                      1101 0101 0101 1100 0000 0011 0

                                      first 4 bits 0000 in your sketch + 25 bits from my remote = 29 bits

                                      1 Reply Last reply
                                      0
                                      • petewillP Offline
                                        petewillP Offline
                                        petewill
                                        Admin
                                        wrote on last edited by
                                        #19

                                        @C.r.a.z.y. I am doing my best to understand but I think I'm still missing something. Basically what you want to do is to reproduce the pattern you recorded in Audacity. I did this somewhat crudely with blindAction function (someone smarter than me could code it much better but it works). You will need to modify (and probably rename) this function to meet your needs. In this function I call other functions (fourBits and eightBits) to actually send the RF signal out. I would start with these methods to get your timings right. You can then record what you send out in Audacity and compare. After you have got this working with one command you can work on interfacing it with Vera. I hope that helps a little.

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

                                        C 1 Reply Last reply
                                        0
                                        • petewillP petewill

                                          @C.r.a.z.y. I am doing my best to understand but I think I'm still missing something. Basically what you want to do is to reproduce the pattern you recorded in Audacity. I did this somewhat crudely with blindAction function (someone smarter than me could code it much better but it works). You will need to modify (and probably rename) this function to meet your needs. In this function I call other functions (fourBits and eightBits) to actually send the RF signal out. I would start with these methods to get your timings right. You can then record what you send out in Audacity and compare. After you have got this working with one command you can work on interfacing it with Vera. I hope that helps a little.

                                          C Offline
                                          C Offline
                                          C.r.a.z.y.
                                          wrote on last edited by
                                          #20

                                          @petewill Thank you i know you are very helpful. I tried to copy my remote to an universal remote learner(which has no name chipset) but it didnt copy. It is hard to understand and solve for a newbie.

                                          I simply tried to send 10101010codes with this sketch https://code.google.com/p/rc-switch/wiki/HowTo_Send?tm=6 and didnt work.

                                          Something interesting i found while tranmitting,
                                          If i remove the delay () than signal is always sent. I made a jammer! :) Any of my 433 remotes didnt work!

                                          I want to learn if any universal remote learner with EV1527 Chipset works with RCSwitch?
                                          My plan is to copy some remote codes to EV1527 universal remote and read the code from serial with RCSwitch-rfSniffer.

                                          Now i will try IR SENDER-RECEIVER http://www.mysensors.org/build/ir maybe i can get new ideas for 433mhz things..

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


                                          11

                                          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