python-broadlink icon indicating copy to clipboard operation
python-broadlink copied to clipboard

How to get status Dooya DT360E

Open Maxmudjon opened this issue 9 years ago • 10 comments

How to get status Dooya DT360E

Maxmudjon avatar May 12 '17 14:05 Maxmudjon

I don't know, I'm afraid. Do you know if they use the same protocol?

mjg59 avatar May 13 '17 16:05 mjg59

it seems so. just got mine here.

In [17]: devices = broadlink.discover(timeout=5)

In [18]: devices[0]
Out[18]: <broadlink.device instance at 0x1107cafc8>

In [19]: devices[0].auth()
Out[19]: True

In [20]: devices[0].type
Out[20]: 'Unknown'

i can see traffic between it and e-control ios app through wireshark. any advice on how to decrypt/decode/reverse packets structure?

jaxer avatar May 20 '17 14:05 jaxer

after some digging i can only say that its id is 0x4E4D. seems to be broadlink protocol, but might be some new flavor of it.

jaxer avatar May 21 '17 13:05 jaxer

opened PR to add Dooya: https://github.com/mjg59/python-broadlink/pull/134

jaxer avatar Dec 24 '17 16:12 jaxer

@jaxer I am writing code to control dooya cover in HomeAssistant using broadlink.dooya class but when I call open() function, i failed and get a bug like:

File "/srv/homeassistant/lib/python3.5/site-packages/broadlink/init.py", line 837, in _send return ord(payload[4]) TypeError: ord() expected string of length 1, but int found

Hoanthieu avatar Nov 20 '18 09:11 Hoanthieu

@Hoanthieu right, need to remove ord wrapper from _send in broadlink. I guess i need to open PR for that. Maybe you can do that?

Thanks for creating proper hass component.

jaxer avatar Nov 20 '18 10:11 jaxer

@jaxer I'm not sure that I can do that =))). I'm only a beginner

Hoanthieu avatar Nov 20 '18 14:11 Hoanthieu

@jaxer I tried and could open and stop dooya curtain, but how to get its state, on or off ???

Hoanthieu avatar Nov 20 '18 15:11 Hoanthieu

i've opened PR https://github.com/mjg59/python-broadlink/pull/216

get_percentage() should return 0-100 number where 0=closed and 100=opened.

jaxer avatar Nov 20 '18 18:11 jaxer

Fixed with https://github.com/mjg59/python-broadlink/pull/134. Thank you!

felipediel avatar Feb 17 '21 05:02 felipediel