Comments (4)
A resend interval and response timeout that large are not recommendable.
Imagine a frame is lost, that means it will be resend only a minute later.
And if the heartbeat fails during that time, the connection will be terminated.
From the protocols perspective, it is almost impossible to tell if the device is just busy, dead or there is a network issue.
The library is fairly low-level. It doesn't do reconnects.
I suggest building something on top which does rebuild the tunnel client when it fails.
from knx-go.
Thanks,
so I should use a shorter resendInterval (500 mili), and something like 2mins for the responseTimeout as the previous unclosed connection will only be released after 1 min.
Then handle the disconnect/unavailable gateway on my app.
from knx-go.
I image it would be a channel-like abstraction on top of the TunnelClient
that on repeated failure to send or on the inbound channel being closed (which indicates a closed connection) simply discards the TunnelClient
and instantiates a new one. Possibly needs to make the errResponseTimeout
error public so you can compare against it. That would be a simple solution.
I've had a bit of time to think about it and I think this can actually be integrated into the TunnelClient
directly. However it wouldn't be too easy and I have neither the time nor the motivation nor the means to test it. In any case I am happy to accept PRs though 😄
from knx-go.
Actually, I think the TunnelClient
already tries reconnect: https://github.com/vapourismo/knx-go/blob/master/knx/tunnel.go#L508
However, it only retries once. So what is needed is to extend the TunnelConfig to support a reconnect attempt counter.
from knx-go.
Related Issues (20)
- DPT 251.600 HOT 6
- Update telegraf's import to newest knx-go version HOT 3
- MessageCode differs on GOARM 5 HOT 10
- Missing datatypes HOT 1
- Impossible to read memory address with Authentication HOT 3
- more example HOT 3
- Advice needed HOT 2
- Implement DESCRIPTION_REQUEST HOT 4
- Missing telegrams in IP KNX tunnel HOT 36
- cemi.NewGroupAddrString() does not report error with some wrong addresses HOT 2
- DPT232 HOT 2
- Query value-status of a group address HOT 3
- DPT242 changes discussion HOT 1
- support for knx secure tunnel? HOT 2
- Problem in Telegraf that connection loss from KNX-Router is not recognized HOT 13
- Problem with DPT with 4 digits after dot
- knx-go is writing wrong "source" tag HOT 6
- All DPT1.xxx are boolean HOT 4
- NewGroupAddr2 needs to shift a by 11 bits HOT 1
- Read on command group address
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from knx-go.