uebelack / python-maxcube-api

A python api to control the Max! Cube thermostats.
https://github.com/uebelack/python-maxcube-api
MIT License
21 stars 26 forks source link

Support asyncio #18

Open ekaats opened 5 years ago

ekaats commented 5 years ago

A couple of weeks ago I made pull request for Home Asissant in order to add async support to the MaxCube module. However, it couldn't be accepted as the package itself is using sockets. I've tried to think of ways to change this but since it is a fundamental change to the package, I first file an issue.

The documentateion states this module is meant to be used with HA and since asyncio is the preferred way now, it would make sense to simply rewrite it, but that might break things elsewhere. What is your view on this? Personally I do not have enough knowledge of the proprietary part to come up with a solution.

unaiur commented 3 years ago

I think that this project is abandoned. There are merge requests fixing actual bugs that are rotting for more than two years. I am planning to make a fork of this package if the author does not show any sign of life soon.

My initial plan is to only accept bug fixes, since I do not have time to do a full redesign of this package. But I can change my mind if there are more people interested in maintaining this library.

uebelack commented 3 years ago

Yes, sorry I don't have a Max cube and that's why I wasn't interested in this lib anymore. I have now merged all open PR's and released a new version: https://pypi.org/project/maxcube-api/

Feel free to rewrite anything, overtake the project ... I no longer need it ;-)

unaiur commented 3 years ago

Can you add me as a project administrator in Pypi.org? That will allow me to release new versions from my repository if you are no longer interested in maintaining it. My email is unaiur@gmail.com.

uebelack commented 3 years ago

Sure ... i need your pypi username ... is it unaiur ? if so, you would need the verify your email there "User 'unaiur' does not have a verified primary email address and cannot be added as a Owner for project"

unaiur commented 3 years ago

Yes, it is the same than GitHub.

On Mon, 11 Jan 2021 at 14:17 John Doe notifications@github.com wrote:

Sure ... i need your pypi username ... is it unaiur ? if so, you would need the verify your email there "User 'unaiur' does not have a verified primary email address and cannot be added as a Owner for project"

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/hackercowboy/python-maxcube-api/issues/18#issuecomment-757944949, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABM4WB3BPCCGI4W32VGMPX3SZL26LANCNFSM4GV6VGHA .

uebelack commented 3 years ago

still get "User 'unaiur' does not have a verified primary email address and cannot be added as a Owner for project" when trying to invite you

unaiur commented 3 years ago

Okay, I have re-verified it. Seems that first verification was lost for some reason but now I can see a green bar on top of the pypi.org saying that my account is verified.

I has published a CR to HomeAssistant to upgrade maxcube-api dependency to 0.3.0: https://github.com/home-assistant/core/pull/45123

I have also been working on an asynchronous API that is now required by HASS for new plugins and I hope to have it ready this week.

On Mon, Jan 11, 2021 at 2:39 PM John Doe notifications@github.com wrote:

still get "User 'unaiur' does not have a verified primary email address and cannot be added as a Owner for project" when trying to invite you

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/hackercowboy/python-maxcube-api/issues/18#issuecomment-757956727, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABM4WB7RV2FGZZCNRLMXMLLSZL5RDANCNFSM4GV6VGHA .

unaiur commented 3 years ago

Okay, async code is harder than expected and I need to do some refactor before. I will target it for 1.0 release.

unaiur commented 3 years ago

Okay, I will start working on this task now that I managed to integrate in Home Assistant the most urgent fixes.

I hope to get it ready before the autumn, when we will need our thermostats again.

unaiur commented 3 years ago

Regarding your first question, I plan to move all common code out of MaxCube and into MaxDevice/MaxThermostat and so on. Then, I will create an AsyncMaxCube class that will be all asynchronous.