After some of these the following error was logged:
Code: Select all
2021-02-04 08:46:06.324 Error: dzVents: Debug: Python script-starter: Error ==>> Traceback (most recent call last):
2021-02-04 08:46:06.324 File "/home/pi/evohome-client/radiator_temp.py", line 11, in <module>
2021-02-04 08:46:06.324 client = EvohomeClient(evoconfig.usr, evoconfig.pw)
2021-02-04 08:46:06.324 File "/home/pi/evohome-client/evohomeclient2/__init__.py", line 89, in __init__
2021-02-04 08:46:06.324 self._login()
2021-02-04 08:46:06.324 File "/home/pi/evohome-client/evohomeclient2/__init__.py", line 94, in _login
2021-02-04 08:46:06.324 self.user_account()
2021-02-04 08:46:06.324 File "/home/pi/evohome-client/evohomeclient2/__init__.py", line 228, in user_account
2021-02-04 08:46:06.324 response = requests.get(url, headers=self._headers())
2021-02-04 08:46:06.324 File "/home/pi/evohome-client/evohomeclient2/__init__.py", line 110, in _headers
2021-02-04 08:46:06.324 self._basic_login()
2021-02-04 08:46:06.324 File "/home/pi/evohome-client/evohomeclient2/__init__.py", line 150, in _basic_login
2021-02-04 08:46:06.324 self._obtain_access_token(credentials)
2021-02-04 08:46:06.324 File "/home/pi/evohome-client/evohomeclient2/__init__.py", line 180, in _obtain_access_token
2021-02-04 08:46:06.324 raise AuthenticationError(msg)
2021-02-04 08:46:06.324 evohomeclient2.AuthenticationError: Unable to obtain an Access Token, hint: {"error":"attempt_limit_exceeded"}
2021-02-04 08:46:06.325 Error: dzVents: Debug: Python script-starter: returnCode: 0 , result: Traceback (most recent call last):
2021-02-04 08:46:06.325 File "/home/pi/evohome-client/radiator_temp.py", line 11, in <module>
2021-02-04 08:46:06.325 client = EvohomeClient(evoconfig.usr, evoconfig.pw)
2021-02-04 08:46:06.325 File "/home/pi/evohome-client/evohomeclient2/__init__.py", line 89, in __init__
2021-02-04 08:46:06.325 self._login()
2021-02-04 08:46:06.325 File "/home/pi/evohome-client/evohomeclient2/__init__.py", line 94, in _login
2021-02-04 08:46:06.325 self.user_account()
2021-02-04 08:46:06.325 File "/home/pi/evohome-client/evohomeclient2/__init__.py", line 228, in user_account
2021-02-04 08:46:06.325 response = requests.get(url, headers=self._headers())
2021-02-04 08:46:06.325 File "/home/pi/evohome-client/evohomeclient2/__init__.py", line 110, in _headers
2021-02-04 08:46:06.325 self._basic_login()
2021-02-04 08:46:06.325 File "/home/pi/evohome-client/evohomeclient2/__init__.py", line 150, in _basic_login
2021-02-04 08:46:06.325 self._obtain_access_token(credentials)
2021-02-04 08:46:06.325 File "/home/pi/evohome-client/evohomeclient2/__init__.py", line 180, in _obtain_access_token
2021-02-04 08:46:06.325 raise AuthenticationError(msg)
2021-02-04 08:46:06.325 evohomeclient2.AuthenticationError: Unable to obtain an Access Token, hint: {"error":"attempt_limit_exceeded"}
2021-02-04 08:46:06.325 ::ERROR::
This explains why the error occurs not in all cases: the problem had nothing to do with the python script, but with exceeding Evohome access limits. In other words, it's caused by the Blocky timer (that I added for some tests) which fires the script every minute. I removed that and fired the script based on (manually triggered) smartphone presence only. No errors are logged now. So it seems to be solved. Rather confusing error message...
Thanks for your help and your script. It helps me to find the cause.