Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Timeout on connection lost #15

Open
MaxXor opened this issue Sep 5, 2018 · 3 comments
Open

Timeout on connection lost #15

MaxXor opened this issue Sep 5, 2018 · 3 comments

Comments

@MaxXor
Copy link
Contributor

MaxXor commented Sep 5, 2018

Hi, is there any configurable timeout when knxmap loses the connection to the KNX/IP Gateway? Currently when you start knxmap in bus monitor mode and then disconnect the gateway by unplugging the cable knxmap is basically stuck forever. Is there any option for timeout or reconnect on timeout?

@takeshixx
Copy link
Owner

Running the bus monitor does not establish a session because KNXnet/IP is based on UDP. The client will most likely not know if a gateway drops the connection. Introducing a timeout would be a potential solution. However, it might not make much sense to have one by default.
There should be some kind of keep alive for the tunnel connection, but I have to look into the bus monitor to see if it will indeed kill the connection after some extended amount of time.

@MaxXor
Copy link
Contributor Author

MaxXor commented Sep 18, 2018

@takeshixx Yes, that would be awesome.

@MaxXor
Copy link
Contributor Author

MaxXor commented Sep 18, 2018

Look here:

# After receiving a CONNECTIONSTATE_RESPONSE schedule the next one
self.loop.call_later(50, self.knx_keep_alive)

I think a possible solution would be after sending the next keepalive packet, start a timer that checks if within the next X seconds no response is received, the connection should be restarted?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants