python-sdk icon indicating copy to clipboard operation
python-sdk copied to clipboard

Connection to server lost

Open rbaltasar opened this issue 3 years ago • 2 comments

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!

rbaltasar avatar Oct 03 '22 16:10 rbaltasar

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/

kakopappa avatar Oct 08 '22 01:10 kakopappa

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

rbaltasar avatar Oct 17 '22 18:10 rbaltasar