sinricpro / python-sdk

python3 sdk for sinric pro.
https://sinric.pro
23 stars 9 forks source link

Connection to server lost #44

Open rbaltasar opened 1 year ago

rbaltasar commented 1 year ago

Hi! I am using Sinric Pro to stimulate a python script that simulates a simple lamp, so I can control it with Alexa. My code is pretty much one of your code examples in https://github.com/sinricpro/python-sdk. It works fine for several hours, but after less than 24h the script shows an error message that says connection with the server has been lost. I have restarted the process many times with the same outcome: in less than 24h the connection with the server is lost (no re-connection attempts but the python process does not terminate). Is this a known issue? Thanks!

kakopappa commented 1 year ago

Hi @rbaltasar

I have released a new version of the SDK 2.6.3 which does a clean exit if the connection has been lost. You can use supervisord or something similar to reconnect I will look into adding an internal retry in the next release.

https://pypi.org/project/sinricpro/2.6.3/

rbaltasar commented 1 year ago

@kakopappa thanks! Now connection issues persist, but the script ends, so I think I can handle it by re-starting upon termination. Thanks!