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

[Meteostick] Add windvane calibration #16270

Merged
merged 4 commits into from Feb 10, 2024
Merged

[Meteostick] Add windvane calibration #16270

merged 4 commits into from Feb 10, 2024

Conversation

Chiuaua79
Copy link
Contributor

Ref. issue 16268

The Davis wind vanes 6410, 7911 and 7914 are
mounted to a flat surface on the shaft. To ensure
correct orientation of the wind vane, the
anemometer must be mounted so that the arm points
true north. This is not always possible. In these
cases the wind direction must be calibrated. This
commit adds the option to enter the direction the
arm is facing and the binding will recalculate the wind direction as received from the Meteostick
before publishing to the relevant channel.

Furthermore in my opinion one rain channel was
missing: accumulative rainfall for the current
date. Added this channel, which required some code changes (adding of cronScheduler so the value is
reset at midnight of the selected timezone). Tried to improve the code.

@lsiepel lsiepel added the enhancement An enhancement or new feature for an existing add-on label Jan 13, 2024
Copy link
Contributor

@lsiepel lsiepel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left some minor comments

@Chiuaua79
Copy link
Contributor Author

For some reason I did not commit and push all changes. Although the README was changed to include the "rain-today" channel, the code change for this channel was not included in the commit/push/pull.

Will do a rebase, add commit and repush.

Copy link
Contributor

@lsiepel lsiepel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, @cdjackson would be nice if you can comment as codeowner.

@Chiuaua79
Copy link
Contributor Author

Had to push once more as apparently the channel for rain-today was not showing up in the binding due to missing info in OH-INF/i18n/meteostick.properties and OH-INF/thing/thing-types.xml. Fixed these files as well to show the new channel (tested in my production OH server at home).

Copy link
Contributor

@lsiepel lsiepel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor label adjustment.

Chiuaua79 and others added 4 commits February 10, 2024 15:20
The Davis wind vanes 6410, 7911 and 7914 are
mounted to a flat surface on the shaft. To ensure
correct orientation of the wind vane, the
anemometer must be mounted so that the arm points
true north. This is not always possible. In these
cases the wind direction must be calibrated. This
commit adds the option to enter the direction the
arm is facing and the binding will recalculate the
wind direction as received from the Meteostick
before publishing to the relevant channel.

Furthermore in my opinion one rain channel was
missing: accumulative rainfall for the current
date. Added this channel, which required some code
changes (adding of cronScheduler so the value is
reset at midnight of the selected timezone). Tried
to improve the code.

Signed-off-by: Cor Hoogendoorn <chiuaua@hotmail.com>
In other commit mentioned adding daily rain accumulation
but forgot to add the code. This commit adds the code
for the daily rain accumulation channel.

Signed-off-by: Cor Hoogendoorn <chiuaua@hotmail.com>
In previous commit did not add the channel for daily
accumulated rain. Fixed with this commit.

Signed-off-by: Cor Hoogendoorn <chiuaua@hotmail.com>
Co-authored-by: lsiepel <leosiepel@gmail.com>
Signed-off-by: Cor Hoogendoorn <chiuaua@hotmail.com>
Copy link
Contributor

@lsiepel lsiepel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks

@lsiepel lsiepel merged commit d72c5b5 into openhab:main Feb 10, 2024
3 checks passed
@lsiepel lsiepel added this to the 4.2 milestone Feb 10, 2024
austvik pushed a commit to austvik/openhab-addons that referenced this pull request Mar 27, 2024
* [Meteostick] Add windvane calibration
* [Meteostick] Added daily rain accumulation

Signed-off-by: Cor Hoogendoorn <chiuaua@hotmail.com>
Signed-off-by: Jørgen Austvik <jaustvik@acm.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement An enhancement or new feature for an existing add-on
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[meteostick] Add windvane calibration and "accumulated rain today" channel
2 participants