CharlesBlonde / libpurecoollink

Dyson Pure Cool link python library
http://libpurecoollink.readthedocs.io
Other
206 stars 53 forks source link

Add support for the new 2018 pure cool devices (TP04) #15

Closed etheralm closed 4 years ago

etheralm commented 6 years ago

Hi, I just extended the libpurecoollink module with support for the new 2018 pure cool purifier modules. Let me know what you think. Btw currently this supports only the tower model since I don't have the product type of the desktop one, if someone has it I'll be happy to add it to the list and test if everything works properly.

coveralls commented 6 years ago

Coverage Status

Coverage increased (+0.3%) to 99.505% when pulling 65f814f52776a34bc8bafb704c90731b01435686 on etheralm:master into a91362c57a0bc4126279c8c51c407dd713b08e10 on CharlesBlonde:master.

etheralm commented 6 years ago

ops, just realised I missed one spot with the tests, I'll add them in a sec.

CharlesBlonde commented 6 years ago

Thanks a lot for your work! I'll try to take a look at this PR this WE and merge it as soon as possible.

etheralm commented 6 years ago

You're welcome, I would like to thank you for the awesome job with the module too, glad I could help.

danburke commented 6 years ago

@CharlesBlonde - any chance we could merge this PR? Any help needed testing it?

exking commented 6 years ago

This PR works great for my TP04, thanks a lot! Hope it gets merged soon.

exking commented 6 years ago

BTW, it looks like new version of the app allows a fixed direction control without oscillation, for example setting both angles to 180 points the fan straight, setting both to 90 - to the left.

etheralm commented 6 years ago

@exking

you can actually do that with this pr too. Use the enable_oscillation method and pass the same angle to oscillation_angle_low and oscillation_angle_high (the angle can be between 5 and 355 degrees and represents the position of the fan). For example if you want to move the fan to 90 use: fan.enable_oscillation(90, 90) This is what the app sends via MQTT as far as I saw when I was looking at it. If you find it more convenient i can add a set_angle(angle) and move_left(degrees) and move_right(degrees) methods to make it easier to manipulate the position.

exking commented 6 years ago

@etheralm Thanks, I missed the fact that 30 degree spilt is now required only if angels are different. Single method should be fine!

xmorpheus commented 6 years ago

@CharlesBlonde please check & merge this pr

etheralm commented 6 years ago

@CharlesBlonde I don't want to bother you, but I'm almost ready to submit a pr for support for those fans in home assistant and I really don't want to to link this module statically in it, or push a separate module to pypi. Can you please review and merge this.

andrewmooreio commented 6 years ago

@CharlesBlonde a merge of this PR would be greatly appreciated. I've just bought a TP04 and was looking at making the changes myself, then came across the great work @etheralm has been making.

bigkraig commented 6 years ago

@CharlesBlonde Hi, can you please find time to review/merge this?

@etheralm If @CharlesBlonde is unable, can you just work off of a fork for home-assistant?

trevorludgate commented 5 years ago

@CharlesBlonde Would be very appreciated if you could merge this PR :)

etheralm commented 5 years ago

Hi guys, sorry about the delay, was really busy last 2 months.

I just submitted a PR for home assistant which uses this PR and adds support for the 2018 models. You can track the progress here: link

@CharlesBlonde I pushed this pr in pypi under the name libpurecool so that I can use it for home assistant. Let me know when you get the time to merge it and I'll remove the fork there.