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

Reading KNX message from bus after reconnect / x minutes after last telegram was received #15117

Open
userwithoutpassword opened this issue Apr 8, 2024 · 1 comment
Labels
feature request Requests for new plugin and for new features to existing plugins help wanted Request for community participation, code, contribution size/l 1 week or more effort

Comments

@userwithoutpassword
Copy link

userwithoutpassword commented Apr 8, 2024

Use Case

Some KNX telegrams are written to the bus in intervals, others are not (you have to send a read request) or just when their value changes. Same values change very rarely for example summer/winter state for heating (maybe only 2 times per year).

After reconnect some values could have been changed during the connection was offline.

Expected behavior

A solution could be how it is done in Home Assistant by adding an option called "sync_state"

sync_state boolean | string | integer (Optional, default: true)

Actively read the value from the bus. The maximum time interval (<minutes>) is 1440. The following values are valid

true equivalent to “expire 60” (default)
false no GroupValueRead telegrams will be sent to the bus
every <minutes> to update it regularly every <minutes>
expire <minutes> to read the state from the KNX bus when no telegram was received for <minutes>
<minutes> equivalent to “expire <minutes>”
init to just initialize the state on startup

Since the KNX Bus has a limited bandwidth its not a good idea send a read request for all groupaddresses at the same time.
Maybe this can be solved by reading them at different (random) seconds.

Lets say you want to read 100 values every 60minutes. The solution could be not reading them all at exactly 60min and 0 seconds but instead reading them at random seconds.

The same after reconnect. Maybe using the first 30 or 60seconds for reading all data that telegrams/second on the KNX Bus doesnt get too high. If its too high and the bus is "full" KNX devices only try to send 3 times and if thats not possible (because the bus is "full" ) they give up and you dont get an answer.

Actual behavior

see "use case"

Additional info

No response

@userwithoutpassword userwithoutpassword added the feature request Requests for new plugin and for new features to existing plugins label Apr 8, 2024
@srebhan
Copy link
Member

srebhan commented Apr 8, 2024

@userwithoutpassword a sync_on_startup option would make sense. PRs are welcome! ;-)

@srebhan srebhan added size/l 1 week or more effort help wanted Request for community participation, code, contribution labels Apr 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Requests for new plugin and for new features to existing plugins help wanted Request for community participation, code, contribution size/l 1 week or more effort
Projects
None yet
Development

No branches or pull requests

2 participants