Dooya Curtain Motor RS485

RS485 is like RS232. It is a simple serial bus but with balanced data (two data lines, one is high when the other is low). RS485 can be used over longer distances. But that is your least problem. You need information about protocol and speed to be able to hack something. You can find cheap serial to RS484 boards on ebay. It is information about the protocol you need. I assume you do not have any controller that connects to the RJ11 that you can reverse engineer with a serial sniffer

I don’t have an adaptor at the moment but I need to order one.

I found this repo on github that contains some C and references Dooya curtains and RS485… Obviously I’ve got a bit excited that this may be a solution… but I don’t understand whether it is.

Do you have any updates on the RJ11 and RS485 protocol of your dooya curtains motor?

I have been using rfxcom to control my curtains but I would like to explore the RJ11/RS485 interface protocol to be able to control the curtains openings by percentage and also to track the state of the curtains in HA.

I have found this chinese link which detailed all the RS485 communication protocol from the RJ11 port.

https://bbs.crodigynat.com/forum.php?mod=viewthread&tid=229

I have ordered and received the RS485 to serial converter but haven’t have the time to start probing. Let me know if you have any progress since your last post. I will update my progress/findings here later.

P/S: The github repo C code correspond to the chinese communication protocol document. Just need to hook it up and try it out.

Did you make any progress with this? I’ve got a couple of Dooya motor’s sitting around I’m keen to use, but like you I don’t want to use 433mHz unless I’ve got to.
Unfortunately I can’t interpret any of your link.

I never looked into this after asking the question. I can’t get the track aligned due to a lumpy ceiling, so the belt catches and the curtains won’t draw (i’m really annoyed by this!).

I’ve taken a look at the doc @zeliant linked, and fired it through google translate. The formatting has been screwed as the tables have disappeared, but it’s here if you want it.

Sorry I didnt managed to test it out yet. I changed from RFXCOM to Sonoff RF Bridge and its very stable. The incentive to implement percentage control of curtains became lower now as I am currently focusing on implementing object detection using frigate

1 Like

You don’t need to google translate the document. The github repo that you shared already implement the same protocol. You can just refer to the C code in the repo to understand the protocol.

I could help translate the doc if you really need it.

Honestly, I had no idea what was in the document until i translated it :slight_smile: Given that the github code isn’t commented, but this doc had some comments in the code it could have helped my understanding. Anyway, it’s there and it may help someone else that’s interested in this too.

Here, this may help. I have a dooya kt82tv without wifi. So i think i have RS485.

1 Like

Hi there, I am new to this forum, thanks for the github link.

I also have translated the documents of dooya, there are multiple of them. And also a RS485 terminal to control the curtains. This should be very usefull although it is in chinese. The terminal looks straight forward as far as I have seen using google lens on my phone to translate the buttons, but I do not have a usb to RS485 converter.

Knipsel this might explain a bit mor of the rj11 adapter.

I am trying to get the motor work with an arduino and a max485. has somebody already made software to control the curtains?

you might also checkout this link to setup the motorshttps://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=&ved=2ahUKEwjchJnkuYrtAhVDEWMBHWq4B24QFjACegQIAxAC&url=https%3A%2F%2Fproducts.z-wavealliance.org%2FProductManual%2FFile%3Ffolder%3D%26filename%3DManuals%2F2926%2FeDT82TV-F%2520A-00.pdf&usg=AOvVaw0dLKB4vX9Bheeke2dL2jgk

Hi! I don’t think i have a direct serial connection from my motors. I have RJ11 but i think i have a RS485 so i need a converter to TTL. i am waiting for the material to start testing this. Do you have 3,3V in that pin? You measured it?

I have not measured it yet but this image is from the manual. See also the link at the bottom of my post. If I have time I will do some testing with it.

From what i read i think the serial port is for the wifi version of the motor. i have the non wifi version so the port should be rs485, but i still have to measure.

Hello. I faced the following issue with my Dooya RS485 motor (DT82TV)
Once I reseted it to factory defaults I don’t see any activities on my Dooya RS485 port. SHould I somehow activate my RS485 after factory reset?

For those using ESPHome, I have submitted a PR to support the Dooya RS485 protocol as referenced here by @zeliant. Do test it and feedback! :slight_smile:

Great work! Are you using dooya tubular motor for shades for testing?

My house got struck by lightning recently and it fried my 2 dooya DT360E motor. Which gave me the chance to swap to a new OEM dooya motor made by a China Home Assistant Forumner.

Its wifi enabled and integrates into HA perfectly by MQTT. It can achieve cover percentage control. Price is cheaper than xiaomi curtain motor. Below is the taobao link, its in chinese though.

https://item.taobao.com/item.htm?spm=a230r.1.14.16.5ee9f8dbCV7Ypf&id=583342242770&ns=1&abbucket=5#detail

If anyone is interested to buy the motor, i can try ask the seller see if he can ship overseas.

image

So instead of poking around with the RS485 protocol, this curtain motor solves the integration of my curtain into HA perfectly.

Yep! I’m using the RS485 version of the Dooya tubular shade motor DM45EQL/J. Command codes referenced from the same pdf as the one you linked. Installed in a bedroom in my house and works very well, intending to scale out housewide soon :slight_smile:.

I got this model also from taobao, the whole set together with the shade fabric, motor enclosure and side rails, using a freight forwarder to ship it out of china. The whole thing weighs >30kg and >3m long, hence sea shipping was the only viable option. Since I live in an apartment and couldn’t fit it in the lifts, had to carry it up 13 flights of stairs with someone else :sweat_smile:. Definitely not an easy thing to scale.

I’m intrigued by that MQTT WiFi motor you linked, is that by any chance based on ESP8266? I don’t use MQTT to connect my ESP32s to home assistant as ESPHome uses its own native protocol; it’d be cool if we can directly flash ESPHome onto it. That’d save a
lot of hassle trying to pull CAT5 cables to every window and door for RS485.

Since my motor integrates HA nicely, i din even open it to check it out.

The firmware is running a forked tasmota so it should be using ESP8266 based chip.

If you do get it, just use as it is, don’t try to put in esphome as it already have perfect integration into HA. Save your time to do something else.

Regarding your ESPhome implementation, could you flash it on 1 ESP8266 chip and have it control 1 motor, this way you do not need to run cable to each window. I suspect my curtain motor also uses the RS485 protocol to talk to the dooya motor.

Nice! I have installed a curtain motor similar to yours, with RS485 provided over the same RJ11 port. The documentation did mention pinouts for native UART (TTL) variants, so perhaps yours may be using TTL to interface with the add-on logic board. Either way both RS485 and TTL should be using the same frame structure/protocol, main difference being the electrical levels.

As for integrating with home assistant, I did deploy MQTT when I first started going into HA (was also using Tasmota back then). Didn’t quite like having to run a seperate broker service (another single point of failure; more config; additional perf overhead; etc.). The ESPHome native API imo is more performant, as it consists of a server running on the ESP itself and HA connects directly to it instead.

As long as it has a ESP8266 chip, ESPHome can be flashed to it easily. Just need to find the datasheet for the chip variant pinouts and connect the appropriate leads to it. A better way is to get pogo pins from aliexpress and 3d print programming jigs such as this TYWE3S or this PSF-B04.

I bought the pogo pins from china and have the jig printed. End result, pogo pins too thick for the jig and jig didn’t print correctly too, still using my steady hands and some tape to flash TYWE3S sometimes. :frowning:

Please do share some of your tubular motor pics and the wiring.