I just updated this topic Smart Curtain Motors (Broadlink RM Pro, Dooya) but thought it might be worth its own post. 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)
- python v3.4.1 (32bit). 9 (installed as this user only not all) and add python as path
- Pycurl (python 3.4 pycurl 7.21.5)
- PIP (from Windows CMD run PIP install pillow)
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"
set_position_topic: "cmnd/sonoff-RF-Bridge/backlog"
position_topic: "cmnd/sonoff-RF-Bridge/backlog"
(EDIT 6/6/21 add new parts of the config to fix changes to the mqtt cover that were changed in HA v2021.6)
Then you get a nice control in Home assistant UI
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!