Skip to content

Conversation

jsjames
Copy link
Contributor

@jsjames jsjames commented May 18, 2025

Description

This PR modifies how historical data is queried from the Flume API. Flume made the following restrictions to the API:

  • Restricted the duration of a query to be no longer than 1 year
  • Restricted the bucket size to be no larger than 100

The binding now submits multiple yearly queries to get the baseline only on the first start of the binding and stores the number using the StorageService. It will also update the baseline number at the beginning of every month. Subsequent queries are done from the start of month.

A few minor cosmetic changes as well.

This issue has been mentioned and the fix verified here: https://community.openhab.org/t/flume-water-monitoring/119526/13?u=jsjames

@jsjames jsjames added the bug An unexpected problem or unintended behavior of an add-on label May 18, 2025
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.

Thanks, just two questions. Otherwise LGTM

Signed-off-by: Jeff James <jeff@james-online.com>
Copilot

This comment was marked as resolved.

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.

Thanks, LGTM

@lsiepel lsiepel merged commit 4a9af71 into openhab:main Jun 12, 2025
2 checks passed
@lsiepel lsiepel added this to the 5.0 milestone Jun 12, 2025
@lsiepel lsiepel changed the title [flume] Modifications required to support new restrictions in Flume's API [flume] Adapt to new restrictions in Flume API Jun 12, 2025
phenix1990 pushed a commit to phenix1990/openhab-addons that referenced this pull request Jul 31, 2025
psmedley pushed a commit to psmedley/openhab-addons that referenced this pull request Aug 6, 2025
…enhab#18696)

Signed-off-by: Jeff James <jeff@james-online.com>
Signed-off-by: Paul Smedley <paul@smedley.id.au>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug An unexpected problem or unintended behavior of an add-on

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants