Smart Curtain Motors (Broadlink RM Pro, Dooya)

Look here

https://xiaomi-mi.com/sockets-and-sensors/xiaomi-aqara-smart-curtain-controller-white/

Zigbee need a hub

I have the Xiaomi curtain motor together with Dooya DT82 track and it is a top quality piece of kit. It has soft start & finish and is very quiet. You will need a xiaomi hub which connects to your WiFi and communicates with the motor by Zigbee.

I’ve not used the curtain motors, but the roller blind motors which are 433MHz and controlled by a remote work flawlessly with Broadlink RM PRO. Very easy to pair the remote to the motor, and then copy the the up / down commands with the RM PRO and then allow HASSIO to control. I also use my echo DOT to either raise or lower the blinds, by themselves or within a routine ie…‘bedtime’ lowers the blinds, turns on bedroom light. then in the morning the I have an automation to raise the blinds at a specific time. All controlled with HASSIO and Broadlink, reliability is not a problem it just all works.

3 Likes

i just got a dooya DT52E and it seems to work fine and reliable. i’m controlling the device with an rfxtrx, which needs a little initial setup with the windows rfxtrx manager software. my secondary rf emitter (rflink) also seems to have no problem to control the unit. like all 433 mhz devices, there’s no real back channel or status feedback. controlling the curtain with a pull actually works, though you have to pull a little harder than „slight“, to start the motor.

1 Like

@diplix How did you configured the DT25E in HA? I was able to configure the motor in rfxtrx_manager, but not able so far to configure it in HA.

see:

1 Like

The Xiaomi zigbee motor may be able to work with zigbee2mqtt. It’s not supported yet but as long as it runs zigbee, it should be able to add

1 Like

I thought I would update this topic with what I ended up getting. I picked up some Dooya DT82TV with 3 Meters of Rail (£107.97) and a pair of 135 degree joints (£24.15) to fit my bay windows.

I got them from a seller called "Friend Industry Holding Co., Ltd" on Ali Express. They were in a sale after Christmas and in total the whole setup cost me £141 on the complete package with RF Bridge (it would have been £110 without the extra 135 degree joints). A fraction of the cost of other systems. The seller was very good, and we had several email conversations about the exact dimensions I need, he was very keen to get it exactly right. When they in arrived in 8 Days! (fast for the slow boat from china to the UK). They were pre-cut to length. you just have to work out how the hell to put them together without any instructions. I ended up watching this youtube video through a lot and doing lots of pausing / rewinding. The hard bits had been done for you but he supplier.

I got the DT82tv motors because firstly they were cheap (in my experiences so far defiantly not an inferior product, cant fault them). Secondly they had 4 wire control and RF control. I had my doubts about how well RF would work with Home Assistant. I didn’t like the idea of the curtains missing RF Signals and that maybe I couldn’t get the RF Signals to be sent properly from home assistant. This turned out to be unfounded and RF is working perfectly every time. It also has the option of 4 wire control, so you have Live, Natural, Up, Down & Ground (technically 5 wires). So if the RF wasn’t reliable I could revert back to a wired Z-wave Controller, I was thinking of using a Fibaro Roller Shutter 2 but they are £50 just for the controller, which bumps the price quite a lot. So I thought I will try the RF route first. I may still go this route when I re-plaster the living room and run the wires in properly which I am doing in a few months.

I had heard about the Broadlink RM Pro (£30 ish) and heard good things about it. Again budget is a definite element and I had heard about the Sonoff RF bridge (£8.88) flashed with Tasmota is a third of the cost.

I have a lot of Tasmota devices running and it is worth a bash. It took patience and soldering to get working but once I got my head round it all it works great. I wanted to document it to help other people not have the same painful journey I had. This next section my be quite loooong. I would have been a lot easier just to pay the £48 and get a Z-wave controller. But I am pig headed and only spent a fraction of other systems.

Getting the RF Bridge Working

I tried to follow the Dr ZZZ youtube video on flashing the RF Bridge. It is exactly the same to flashing a Sonoff Basic with Tasmota as I am sure many of you have done (if you follow the first part of the Dr ZZZ video he walks you through it. You just have to setup what type of sonoff it is in the web GUI (configuration > Configure Module > Sonoff Bridge (25) and the MQTT Setting like normal. Where I stopped following DR ZZZ’s video was the part where he received a string of data in the console. I wasn’t receiving any signal when I was pressing the RF Remote control I got with the Curtain Motors (Dooya DC2700). So I had to upgrade the RF Chips firmware on Sonoff RF Bridge with Portisch Firmware. This is different to flashing Tasmota onto the device, it is a different chip on the board. but very simple to do. It is all documented on the Tasmota Wiki Page for the RF Bridge.

I soldered two wires onto the rear of the board and scratched off a couple of tracks (Apparently here are other ways to do it without soldering, but I am comfortable doing it so went that way).

Then in the Tasmota GUI go to firmware upgrade and upload the latest version of the hex file found in Portisch Firmware that is on the Tasmota Github page. Then after it uploads and restarts you can go to the console and type the command "rfraw 177". Now when pressing the RF Remote button in the console you get some B0 codes.

Press each button on the remote a few times then copy the section of the sonoff console and save into a txt file.

13:57:08 CMD: rfraw
13:57:08 MQT: stat/sonoff-RF-Bridge/RESULT = {"RfRaw":"OFF"}
13:57:18 CMD: rfraw 177
13:57:18 MQT: stat/sonoff-RF-Bridge/RESULT = {"RfRaw":"ON"}
13:57:18 MQT: tele/sonoff-RF-Bridge/RESULT = {"RfRaw":{"Data":"AAA055"}}
13:58:42 MQT: tele/sonoff-RF-Bridge/RESULT = {"RfRaw":{"Data":"AA B1 05 12FC 05D2 02DA 0172 1EBE 0123322332233223233223232332233223233232323223233232323232322332233232232332322324 55"}}
13:58:42 MQT: tele/sonoff-RF-Bridge/RESULT = {"RfRaw":{"Data":"AA B1 05 1306 05D2 02E4 015E 1E8C 0123322332233223233223232332233223233232323223233232323232322332233232232332322324 55"}}
13:58:43 MQT: tele/sonoff-RF-Bridge/RESULT = {"RfRaw":{"Data":"AA B1 05 1306 05C8 02EE 015E 1E96 0123322332233223233223232332233223233232323223233232323232322332233232232332322324 55"}}
13:58:43 MQT: tele/sonoff-RF-Bridge/RESULT = {"RfRaw":{"Data":"AA B1 05 1306 05C8 02E4 015E 1E96 0123322332233223233223232332233223233232323223233232323232322332233232232332322324 55"}}
13:58:43 MQT: tele/sonoff-RF-Bridge/RESULT = {"RfRaw":{"Data":"AA B1 05 1310 05BE 02EE 0154 1FFE 0123322332233223233223232332233223233232323223233232323232322332233232232323233234 55"}}
13:58:47 MQT: tele/sonoff-RF-Bridge/RESULT = {"RfRaw":{"Data":"AA B1 05 12FC 05E6 02D0 0172 1ED2 0123322332233223233223232332233223233232323223233232323232322332233232322332323224 55"}}
13:58:48 MQT: tele/sonoff-RF-Bridge/RESULT = {"RfRaw":{"Data":"AA B1 05 1306 05C8 02E4 015E 1E96 0123322332233223233223232332233223233232323223233232323232322332233232322332323224 55"}}
13:58:48 MQT: tele/sonoff-RF-Bridge/RESULT = {"RfRaw":{"Data":"AA B1 05 1306 05C8 02E4 015E 1E78 0123322332233223233223232332233223233232323223233232323232322332233232322332323224 55"}}
13:58:48 MQT: tele/sonoff-RF-Bridge/RESULT = {"RfRaw":{"Data":"AA B1 05 1306 05C8 02E4 015E 1E8C 0123322332233223233223232332233223233232323223233232323232322332233232322332323224 55"}}
13:58:48 MQT: tele/sonoff-RF-Bridge/RESULT = {"RfRaw":{"Data":"AA B1 05 1306 05C8 02E4 015E 1E82 0123322332233223233223232332233223233232323223233232323232322332233232322323232334 55"}}
13:58:48 MQT: tele/sonoff-RF-Bridge/RESULT = {"RfRaw":{"Data":"AA B1 05 1310 05C8 02E4 015E 1FF4 0123322332233223233223232332233223233232323223233232323232322332233232322323232334 55"}}

Unfortunately these are B1 codes and to send signals you need B0 codes. So you need to convert them using a program called BitBucket Converter I have to admit this is where I lost hours of my life trying to get this script to run (all due to my inexperience with python, not the quality of the script)

To convert the codes I had to install (on windows 10 laptop)

to be able to run a script called BitBucketConverter. There were lots of slightly different versions out there but this one was the only one I got to work. The link takes you to a script you download and change the extension to *.py. Then in Windows CMD and run …

C:\Python34>BitBucketConverter.py -f sonoffconsole.txt -e 192.168.0.46

This is telling python to run the script "BitBucketConverter.py" using the File (-f) with the console text in it (open.txt) then run it on a device (-e) with the ip address of the RF bridge.

the script will then transmit the B0 commands. If they work, you can copy them and use them as follows in home assistant. You can test them by typing into the Tazmota console "RfRaw" then the B0 code you just converted.

Below are the B0 command I converted (hopefully they just might work for anyone with a Dooya DC2700 remote control like mine

  • Open Curtains: RfRaw AA B0 35 05 04 12F2 05FA 02B2 0140 1EA0 2401233223322332232332232323322332232332323232232332323232323223322332323223323232 55

  • Close Curtains: RfRaw AA B0 35 05 04 1306 05D2 02DA 0168 1E96 2401233223322332232332232323322332232332323232232332323232323223322332322323323223 55

  • Stop Curtains: RfRaw AA B0 35 05 04 1310 05C8 02E4 015E 1E96 0123322332233223233223232332233223233232323223233232323232322332233223322332233224 55

Home Assistant Configuration

That is the hard bit is done. Now you just have to add in the following lines into the Home assistant Configuration.yaml file.

cover:
  - platform: mqtt
    name: "Living Room Curtains"
    command_topic: "cmnd/sonoff-RF-Bridge/backlog"
    payload_open: "rfraw AA B0 35 05 04 12F2 05FA 02B2 0140 1EA0 2401233223322332232332232323322332232332323232232332323232323223322332323223323232 55;rfraw 177"
    payload_close: "rfraw AA B0 35 05 04 1306 05D2 02DA 0168 1E96 2401233223322332232332232323322332232332323232232332323232323223322332322323323223 55;rfraw 177"
    payload_stop: "rfraw AA B0 35 05 04 1310 05C8 02E4 015E 1E96 0123322332233223233223232332233223233232323223233232323232322332233223322332233224 55;rfraw 177"
    set_position_template: "50"

Then you get a nice control in Home assistant UI

Capture

I have setup automatons to open them at 8am in the morning and close them when it gets dark. Which I did by Sun elevation but would be better if you had an outdoor Luminance Sensor.

- id: '1548292477978'
  alias: Living Room - Curtains - Close at sunset
  trigger:
  - below: '-2.5'
    entity_id: sun.sun
    platform: numeric_state
    value_template: '{{ state.attributes.elevation }}'
  condition: []
  action:
  - data:
      entity_id: cover.living_room_curtains
    service: cover.close_cover
  - data:
      entity_id: light.living_room_lamp
    service: light.turn_on
  - data:
      entity_id: light.fireplace
    service: light.turn_on
- id: '1548411184246'
  alias: Living Room -  Curtains - Open in the morning
  trigger:
  - at: 08:00
    platform: time
  condition: []
  action:
  - data:
      entity_id: cover.living_room_curtains
    service: cover.open_cover

So far I have been running them for a month and they haven’t missed a beat. Every morning they open and every morning they shut. No more climbing over the back of the sofa to shut them and when we are on holiday they curtains will make it look like we are home. Great Stuff!

8 Likes

Thanks for this update, this answered all of the questions I had.

I love that the icon you used was the Ms Windows logo :joy:

I’ve done something similar works a treat

So i have just got my 4 dooya dm25leq/l tubular motors with battery, but instead with a dooya 2702 remote. This is a 15 channel remote where the 2700 is a single channel. So i can steer the motors individually.

I got my codes converted by installing python 3.6, running pip install pillow from command prompt, and running pip install pycurl. Then the bitbucketconverter script from this post started working, took me a good few hours to figure this one out. I had already gotten the rfraw codes using this very helpful post.

I got my 4 motors all on a seperate channel, and here are the codes for the first 4 channels if anyone is interested:

ch1 - up - down - stop
rfraw AA B0 35 05 04 12DE 05FA 015E 02F8 2242 A481A3B2B2A3A3A3B2A3A3A3B2B2A3B2A3A3B2A3B2B2B2B2B2B2B2A3B2A3A3A3A3B2A3A3A3B2B2B2B2 55
rfraw AA B0 35 05 04 12CA 05FA 015E 02E4 222E A481A3B2B2A3A3A3B2A3A3A3B2B2A3B2A3A3B2A3B2B2B2B2B2B2B2A3B2A3A3A3A3B2A3A3B2B2B2B2A3 55
rfraw AA B0 35 05 04 12C0 05FA 015E 02E4 230A B481A3B2B2A3A3A3B2A3A3A3B2B2A3B2A3A3B2A3B2B2B2B2B2B2B2A3B2A3A3A3A3B2A3B2A3B2A3B2A3 55

ch2
rfraw AA B0 35 05 04 12CA 05FA 0154 02E4 231E A481A3B2B2A3A3A3B2A3A3A3B2B2A3B2A3A3B2A3B2B2B2B2B2B2B2A3B2A3A3A3B2A3A3A3A3B2B2B2B2 55
rfraw AA B0 35 05 04 12CA 05F0 0168 02E4 222E A481A3B2B2A3A3A3B2A3A3A3B2B2A3B2A3A3B2A3B2B2B2B2B2B2B2A3B2A3A3A3B2A3A3A3B2B2B2B2A3 55
rfraw AA B0 35 05 04 12CA 05F0 0168 02EE 2224 B481A3B2B2A3A3A3B2A3A3A3B2B2A3B2A3A3B2A3B2B2B2B2B2B2B2A3B2A3A3A3B2A3A3B2A3B2A3B2A3 55

ch3
rfraw AA B0 35 05 04 12C0 05FA 015E 02E4 2242 A481A3B2B2A3A3A3B2A3A3A3B2B2A3B2A3A3B2A3B2B2B2B2B2B2B2A3B2A3A3A3B2B2A3A3A3B2B2B2B2 55
rfraw AA B0 35 05 04 12C0 05F0 015E 02E4 2224 A481A3B2B2A3A3A3B2A3A3A3B2B2A3B2A3A3B2A3B2B2B2B2B2B2B2A3B2A3A3A3B2B2A3A3B2B2B2B2A3 55
rfraw AA B0 35 05 04 12CA 05FA 015E 02E4 230A B481A3B2B2A3A3A3B2A3A3A3B2B2A3B2A3A3B2A3B2B2B2B2B2B2B2A3B2A3A3A3B2B2A3B2A3B2A3B2A3 55

ch4
rfraw AA B0 35 05 04 12CA 05FA 0168 02E4 222E A481A3B2B2A3A3A3B2A3A3A3B2B2A3B2A3A3B2A3B2B2B2B2B2B2B2A3B2A3A3B2A3A3A3A3A3B2B2B2B2 55
rfraw AA B0 35 05 04 12C0 05F0 015E 02E4 222E A481A3B2B2A3A3A3B2A3A3A3B2B2A3B2A3A3B2A3B2B2B2B2B2B2B2A3B2A3A3B2A3A3A3A3B2B2B2B2A3 55
rfraw AA B0 35 05 04 12CA 05F0 0168 02E4 2224 B481A3B2B2A3A3A3B2A3A3A3B2B2A3B2A3A3B2A3B2B2B2B2B2B2B2A3B2A3A3B2A3A3A3B2A3B2A3B2A3 55

2 Likes

@jelle2503 & @c_wolsey I’m lost with this, and maybe you guys can point me in the right direction given project similarities? I don’t really know what I’m doing…

Sorry I have never used ESPhome and the codes look completly diffrent to the tazmota ones. I dont know where I would start

1 Like

No worries, thanks for quick response. I don’t suppose you know of there’s an easy way to convert between the codes in @jelle2503 post (I have the same remote, maybe they will work) and this format of raw code? https://esphome.io/components/remote_transmitter.html#setting-up-rf-devices

# Or raw output if it's not known yet
# The values may fluctuate a bit, but as long as they're similar it's ok
[D][remote.raw] Received Raw: 4088, -1542, 1019, -510, 513, -1019, 510, -509, 511, -510, 1020,
[D][remote.raw]   -1020, 1022, -1019, 510, -509, 511, -510, 511, -509, 511, -510,
[D][remote.raw]   1020, -1019, 510, -511, 1020, -510, 512, -508, 510, -1020, 1022

So after failing with using a Sonoff RF Bridge hack with esphome to learn/send commands (2nd link), I finally have my Dooya DM25LE roller blind motors (1st link) integrated/contolled with a Broadlink “RM2 Pro Plus3” (which is now a bit of a hassle to integrate for the reasons in third link below)

https://www.aliexpress.com/item/32737131751.html?spm=a2g0s.9042311.0.0.482a4c4drdKLWF

Just an addition to this post. Here’s the B0 codes for channel 0, which controls all channels with one press of a button.
Super useful. Also if you cannot get the command to trigger your blinds, try change the transmit length of the rfraw code which is the 10 in these commands… They are default at 04 which is a very short pulse, which sometimes does not trigger the blinds. I have mine set to 20 for the stop “hold” button to trigger the “half-open” state. <3

channel 0 (all channels)
open
rfraw AA B0 35 05 10 12CA 05F0 015E 02E4 2238 A481A3B2B2A3A3A3B2A3A3A3B2B2A3B2A3A3B2A3B2B2B2B2B2B2B2A3B2A3A3A3A3A3A3A3A3B2B2B2B2 55

close
rfraw AA B0 35 05 10 12CA 05E6 0168 02E4 222E A481A3B2B2A3A3A3B2A3A3A3B2B2A3B2A3A3B2A3B2B2B2B2B2B2B2A3B2A3A3A3A3A3A3A3B2B2B2B2A3 55

stop
rfraw AA B0 35 05 10 12D4 05FA 0154 02EE 2238 B481A3B2B2A3A3A3B2A3A3A3B2B2A3B2A3A3B2A3B2B2B2B2B2B2B2A3B2A3A3A3A3A3A3B2A3B2A3B2A3 55

My problem is not HA, I have that bit sorted using the sonoff and tasmota/portisch.

How do you reset the motor travel limits? I have a sunflower branded motor and a dooya dc2700 remote - and no instructions !

Hi Annaka and community :slight_smile:

I am pleased that this is working all well for you.
I’m having no luck with this at all.

I have a motorised blind with 433mhz remote and while adding it as an appliance (curtain) on my Broadlink RM Pro+ it just wouldn’t recognize the on or off press at all. However it does recognize the first long press.

PS: I’ve tried 2 units of RM Pro+ and same problem.
And I am also having trouble pairing other devices like TV, Foxtel etc. Although the very first unit (My Aircon) works like a charm and integrated with Ok Google too.

And, I don’t have Hassio and not familiar with it.

Also, I am using Broadlink’s app which has a dotted B logo because IHC was clunky.

Any suggestions on how to get it to work for my blinds?

Thanks!
Zak

Hey,
Dooya looks like the path I want to take as well. Great work on working out the RF codes.
I’m interested in the bidirectional communication that most of Dooya’s motors have now.
http://downloads.dooya.com/interiorapplication.pdf
They provide position feedback; Bi-directional motor: ‘UP/STOP/DOWN’ + Percentage control + Position feedback.
Has anyone been able to determine the RF codes RECEIVED from the motor to determine position? Or send a position command TO the motors?

I have been using DM25TE dooya motors and they work flawlessly. Easy to get the code, quite silent and speed adjustable. The highest speed opens up my blinds in less than 30second. DM45F/SK seems to be the perfect replacement. But never seen them sold. I guess they are quite new.