From 804f6573970c2448dc8f159af5126723639c08b0 Mon Sep 17 00:00:00 2001 From: David Rapan Date: Tue, 31 Dec 2024 01:27:46 +0100 Subject: [PATCH] refactor: Tune down socket timeout --- custom_components/solarman/const.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/custom_components/solarman/const.py b/custom_components/solarman/const.py index 4345090..26e9ec8 100644 --- a/custom_components/solarman/const.py +++ b/custom_components/solarman/const.py @@ -48,9 +48,9 @@ CONF_PORT: 8899, CONF_MB_SLAVE_ID: 1, CONF_LOOKUP_FILE: "Auto", + CONF_MOD: False, CONF_MPPT: 4, CONF_PHASE: 3, - CONF_MOD: False, CONF_BATTERY_NOMINAL_VOLTAGE: 48, CONF_BATTERY_LIFE_CYCLE_RATING: 6000, UPDATE_INTERVAL: 60, @@ -89,9 +89,8 @@ TIMINGS_INTERVAL_SCALE = 1 TIMINGS_UPDATE_INTERVAL = td(seconds = TIMINGS_INTERVAL * TIMINGS_INTERVAL_SCALE) TIMINGS_UPDATE_TIMEOUT = TIMINGS_INTERVAL * 6 -TIMINGS_SOCKET_TIMEOUT = TIMINGS_INTERVAL * 4 - 1 +TIMINGS_SOCKET_TIMEOUT = TIMINGS_INTERVAL * 3 - 1 TIMINGS_WAIT_SLEEP = 0.2 -TIMINGS_WAIT_FOR_SLEEP = 1 # Constants also tied to TIMINGS_INTERVAL to ensure maximum synergy ACTION_ATTEMPTS = 5