The relaunch of the portal made it so unreliable, that the most sensible
thing to do right now is ignore connect timeouts.
'userName': userName,
'pwd': password
},
'userName': userName,
'pwd': password
},
r = s.post(
'https://www.envertecportal.com/ApiStations/getStationInfo',
data={
'stationId': stationId
},
r = s.post(
'https://www.envertecportal.com/ApiStations/getStationInfo',
data={
'stationId': stationId
},
- timeout=(10, 60)).json()
+ timeout=(20, 60)).json()
power = r['Data']['Power']
r = s.post('https://www.envertecportal.com/apiAccount/Logout',
power = r['Data']['Power']
r = s.post('https://www.envertecportal.com/apiAccount/Logout',
+ timeout=(20, 40))
+
+ # connect timeouts occur so frequently since the portal relaunch,
+ # ignore them for the time beeing completely
+ except requests.exceptions.ConnectTimeout as eTimeout:
+ sys.exit(1)
except requests.exceptions.RequestException as e:
except requests.exceptions.RequestException as e:
raise SystemExit(e)
return float(power)
raise SystemExit(e)
return float(power)