jesserizzo / envoy_reader

MIT License
37 stars 26 forks source link

Increase default timeout from 5secs to 30secs for async inverter call #34

Closed gtdiehl closed 3 years ago

gtdiehl commented 4 years ago

The default timeout for the httpx library is 5 seconds. I noticed after I updated HA to 0.112 that I was receiving timeouts during setup. Increasing the timeout to 30 seconds seems to solve the timeout problem

Change: https://github.com/jesserizzo/envoy_reader/blob/12206fbe2e9784497fa34a4d23184aec5e8c01ab/envoy_reader/envoy_reader.py#L360-L362

To:

                response = await client.get("http://{}/api/v1/production/inverters"
                                            .format(self.host), timeout=30,
                                            auth=httpx.DigestAuth(self.username, self.password))