rgerganov / py-air-control

Command line app for controlling Philips air purifiers
MIT License
257 stars 52 forks source link

Refactor into library + command line client #34

Open ryancdotorg opened 4 years ago

ryancdotorg commented 4 years ago

II want to do some automation, and I'd rather not wrap the command line client to do so.

If I refactor this client into a library which the command line client imports and uses, will you accept a pull request?

rgerganov commented 4 years ago

Sure, I'd be happy to accept a pull request for this. There have been also people in the past asking for this, e.g. issue #15

ekeih commented 4 years ago

Maybe joining forces with https://github.com/urbas/philips-air-purifier could be an option here?

@ryancdotorg I am currently looking into writing a home assistant integration based on py-air-control. I already wanted to do this a year ago in #15, but now that the allergy season in Germany is starting again, I want to give it another try. In case you are working on the same, we should talk to each other to avoid duplicate work. :)

ryancdotorg commented 4 years ago

I already went through and made heavy modifications to urbas/philips-air-purifier, which is working nicely, but is HTTP only. That will be easy to roll back in to this project, though. I tried to pick the best of both worlds. I will try to get that posted somewhere today.

I'm trying to get the CoAP stuff working since the AC2889/60 I bought does not support HTTP, and not having much luck.

@ekeih I would be happy to work with you on this. I'm about to go AFK for a bit, but perhaps we can talk a little later to figure out how to split this up? I'm happy to converse via Signal, Wire, Keybase, Twitter DM or IRC.

ryancdotorg commented 4 years ago

My refactor of the other codebase is here: https://github.com/ryancdotorg/philips-air-purifier/blob/refactor/philips_air_purifier/air_purifier.py

I'd like to add some caching to it, tempted to just remove all the explicit methods.

GeorgeSG commented 4 years ago

+1, is anyone working on this? I'm willing to give it a shot if nobody is doing it.

@ekeih, I want to refactor https://github.com/xMrVizzy/philips-airpurifier to use this for Home Assistant.

rgerganov commented 4 years ago

+1, is anyone working on this? I'm willing to give it a shot if nobody is doing it.

Sure, contributions are welcome! Now that we have the CoAP support almost ready, we can spend some time on refactoring and providing a library for other projects to integrate.

ekeih commented 4 years ago

@GeorgeSG @ryancdotorg Sorry for not responding earlier. Each spring during the allergy season I am interested in this and then when the season ends after a few weeks/months I loose interest when our purifier goes back into storage :see_no_evil: So @GeorgeSG feel free to take a shot at it :)