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

sysvarlist.cgi Retrieve min/max values only when sysvar is numeric #46

Conversation

Michael-K-at-GitHub
Copy link
Contributor

min and max values are only requested if ValueType = 4 (numeric). This prevents Rega Log Entries "metadata property 'MIN' does not exist" and "metadata property 'MAX' does not exist" for every nonnumeric sysvar every time sysvarlist.cgi is called.

Fixes Issue #45

min and max values are only requested if ValueType = 4 (numeric). This prevents Rega Log Entries "metadata property 'MIN' does not exist" and "metadata property 'MAX' does not exist" for every nonnumeric sysvar every time sysvarlist.cgi is called.
@Michael-K-at-GitHub Michael-K-at-GitHub changed the title syscarlist.cgi Retrieve min/max values only when sysvar is numeric sysvarlist.cgi Retrieve min/max values only when sysvar is numeric Oct 29, 2020
@jens-maus
Copy link
Member

Thanks for the PR. However, two things remain:

  1. The log entries in /var/log/messages caused by ReGaHss are pure INFO entries, thus you can simply ignore them.
  2. How about the other value types? You just catch value type 4 which in fact is ivtFloat. But how sure are you that there are not other Value Types you have to catch?

@Michael-K-at-GitHub
Copy link
Contributor Author

ad 1) that's correct. It's simply a matter of calling functions that we know will fail, so we could save cpu per not doing so
ad 2) at least the web interface offers only one datatype for sysvars with a min/max entry. But maybe there are other types of sysvars which are created elsewhere. I do not have enough insight and knowledge to give a definitive answer.

@jens-maus jens-maus changed the base branch from master to v2 September 22, 2023 12:19
@jens-maus jens-maus merged commit 64efb62 into homematic-community:v2 Sep 22, 2023
jens-maus added a commit that referenced this pull request Sep 22, 2023
min and max values are only requested if ValueType = 4 (numeric). This prevents Rega Log Entries "metadata property 'MIN' does not exist" and "metadata property 'MAX' does not exist" for every nonnumeric sysvar every time sysvarlist.cgi is called.

Co-authored-by: Jens Maus <[email protected]>
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

Successfully merging this pull request may close these issues.

2 participants