core: GogoGate2 connection timeout of 2 results in many logged connection failures. Minor increase resolves.
The problem
Repeated connection timeouts are logged for a GogoGate2 since (at least) v0.112.x, causing the cover to become unavailable very briefly and errors to be logged. This is typically resolved within 5 seconds.
Environment
GogoGate2 firmware 2.60 Unifi Network with UAC-AC-PRO GogoGate 2 reports WiFi Link Quality: 61/70 | Signal level: -49 dBm
-
Home Assistant Core release with the issue: This issue has appeared within the last few releases, definitely present in 0.112.x and current 0.113.2
-
Last working Home Assistant Core release (if known): Cannot recall, however I’ve been using the GoGoGate2 integration since its release and this issue did not used to occur.
-
Operating environment (OS/Container/Supervised/Core): HomeAssistant Core 0.113.2 in Python 3.7 venv on Ubuntu 18.04 Server
-
Integration causing this issue: GogoGate2
-
Link to integration documentation on our website: https://www.home-assistant.io/integrations/gogogate2/
Problem-relevant configuration.yaml
Integration configured through user interface. NB: issue occurs when connecting to the GogoGate2 with both the admin account, and a non-admin account
Traceback/Error logs
2020-07-28 14:01:29 ERROR (MainThread) [homeassistant.components.gogogate2.common] Error fetching gogogate2 data: Error communicating with API: HTTPConnectionPool(host='192.168.1.223', port=80): Max retries exceeded with url: /api.php?data=redacteddata (Caused by ConnectTimeoutError(<urllib3.connection.HTTPConnection object at 0x7f100473db50>, 'Connection to 192.168.1.223 timed out. (connect timeout=2)'))
Additional information

After increasing the request function timeout from 2 to 3 in …/lib/python3.7/site-packages/gogogate2_api’init.py and restarting HA I have had no further timeout errors logged. Could this be provided as a configuration option, or increased slightly to permanently resolve the issue please?.
#timeout was 2
response = requests.get(
self._api_url,
params={"data": self._api_cipher.encrypt(command_str)},
timeout=3,
)
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 1
- Comments: 15 (3 by maintainers)
cc @vangorra
Yup got that, was a question for owner or someone that is maintaining this code 😃