Skip to content

Support reading of multiple values at once. #29

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

Closed
1 task done
TheChatty opened this issue Oct 25, 2022 · 8 comments · Fixed by #56
Closed
1 task done

Support reading of multiple values at once. #29

TheChatty opened this issue Oct 25, 2022 · 8 comments · Fixed by #56
Labels
enhancement New feature or request

Comments

@TheChatty
Copy link

Did you read the instructions?

The request

I simply tried to read multiple values and it worked. I documented it here.

Additional information

No response

@TheChatty TheChatty added the enhancement New feature or request label Oct 25, 2022
@golles
Copy link
Owner

golles commented Oct 25, 2022

Thank you for sharing, this would be a really nice improvement

@golles golles mentioned this issue Nov 2, 2022
17 tasks
@golles
Copy link
Owner

golles commented Nov 4, 2022

@TheChatty
Copy link
Author

At the moment __init__.py loops through all sensors defined in SENSORS.items() and calls readvar for each one.

The new way would be to pass SENSORS.items() down to new function readvars which prepares a single request for all sensors. The new request would look like:

3F 10 <numSensors> <codeOfSens1> <codeOfSens2> <codeOfSens3> ...

And the single response needs to be taken apart matched to each sensor:

3F 10 <codeOfSens1> <respSens1> <codeOfSens2> <respSens2> <codeOfSens2> ...

See this example for how to request 7 sensors at once and how to decipher the response.

@golles
Copy link
Owner

golles commented Nov 5, 2022

Thanks, my previous comment was supposed to go to #31 (sorry for that)

For now, I marked this as a nice to have in #30. If I won't make it in that PR, I'll do it in the next one

@github-actions
Copy link

github-actions bot commented Dec 6, 2022

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions github-actions bot added the Stale label Dec 6, 2022
@golles golles removed the Stale label Dec 6, 2022
@github-actions
Copy link

github-actions bot commented Jan 6, 2023

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions github-actions bot added the Stale label Jan 6, 2023
@golles golles removed the Stale label Jan 6, 2023
@golles golles linked a pull request Jan 11, 2023 that will close this issue
@golles
Copy link
Owner

golles commented Jan 11, 2023

PR for this feature is available, see #56

Please, if you have time, test this branch: 29-support-reading-of-multiple-values-at-once

@golles
Copy link
Owner

golles commented Jan 15, 2023

FYI: This feature has been released in version 2.1.0

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

Successfully merging a pull request may close this issue.

2 participants