SiriControl-System
SiriControl-System copied to clipboard
Use imaplib2 and idle()
I found I kept getting TIMEOUT and broken pipe errors after running for periods of more than a day, due to the constant polling of the email server in the previous version. The update to imaplib2 allows use of idle() so the script waits until there is email to process. Seems much more reliable and uses less CPU. Works fine now on an old/original raspi as well as more recent.