summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorxengineering <me@xengineering.eu>2025-12-20 13:53:06 +0100
committerxengineering <me@xengineering.eu>2025-12-20 13:53:06 +0100
commit576e1bf2300e7a324713710871d9bcd5424ff286 (patch)
tree13f9b59eadcb8b6baac765c21d51eb76be56abe0
parent6978bf0635372b0330629469fb86ddb640cdd863 (diff)
downloadsia-server-576e1bf2300e7a324713710871d9bcd5424ff286.tar
sia-server-576e1bf2300e7a324713710871d9bcd5424ff286.tar.zst
sia-server-576e1bf2300e7a324713710871d9bcd5424ff286.zip
Implement Homematic reconnects
This is as simple as do not handling errors on state polling. It ensures the server does not panic when the connection to the OpenCCU is temporarily not alive.
-rw-r--r--homematic.go5
1 files changed, 1 insertions, 4 deletions
diff --git a/homematic.go b/homematic.go
index ae12760..7ccc1ad 100644
--- a/homematic.go
+++ b/homematic.go
@@ -24,10 +24,7 @@ func HomematicRun(tx chan MQTTMessage) {
for {
start := time.Now()
- states, err := Poll(req, inventory)
- if err != nil {
- log.Fatalf("Failed to poll states: %v", err)
- }
+ states, _ := Poll(req, inventory)
cache.Update(states)