Skip to content
This repository has been archived by the owner on Feb 14, 2022. It is now read-only.

Send initial read commands on reconnect, too? #10

Open
onkelandy opened this issue Jan 26, 2022 · 3 comments
Open

Send initial read commands on reconnect, too? #10

onkelandy opened this issue Jan 26, 2022 · 3 comments

Comments

@onkelandy
Copy link
Collaborator

Maybe have an option in the plugin settings.. that is True by default.

@Morg42
Copy link
Owner

Morg42 commented Jan 26, 2022

Not possible as a generic solution, as some connection classes do not connect (or, more exactly, connect anew for every send event). This would behave differently in different connection/protocol classes.

Maybe therefore a non-default extension? Or a protocol layer handling reconnect and resend (as in kodi/json-rpc?)

@onkelandy
Copy link
Collaborator Author

understood, however not sure what you mean by extension..
non-default is fine, manual enabling via plugin settings...?

@Morg42
Copy link
Owner

Morg42 commented Feb 3, 2022

Either a "custom" :) extension of the device.py class, e.g. using on_connect() to initiate initial reading (again) (take care of the self._initial_values_read), or a simple protocol layer which implements reconnecing as often and with custom delay/block counts.
Initial reading is a device function, so maybe the first attempt is more practical.

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

No branches or pull requests

2 participants