TECH7Fox / asterisk-hass-integration

Asterisk integration for Home Assistant
57 stars 13 forks source link

Use python_ami #57

Closed TECH7Fox closed 1 year ago

TECH7Fox commented 2 years ago

Pyst2 is no longer maintained and has some bugs like reconnecting.

Python_ami seem's actively maintained and has a working reconnect function.

TimelessNL commented 1 year ago

Any update on this 😊? I just saw your post on stackoverflow. Seems that there is no way to re-use the original manager instance, but as the disconnect detection works an option would be to trash it and reload the module?

TECH7Fox commented 1 year ago

If I reload the module, all the entities would no longer work so the integration would need to fully reload and setup the new entities. And I don't really know how to do that, or if that is even possible.

The python_ami library does fully work, but it is quite some work to convert the integration to this. I did make a small start.

I do now see some new commits on pyst2. But unless this issue get's fixed soon, I will just use python_ami.

TimelessNL commented 1 year ago

the integration would need to fully reload and setup the new entities. And I don't really know how to do that, or if that is even possible.

If I'm not mistaken this has now been implemented in #65 😃, so restarting the integration on a disconnect could be an option now?

TECH7Fox commented 1 year ago

so restarting the integration on a disconnect could be an option now?

Yes indeed.

But the python-ami branch got merged, so it should stay connected now.