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

[OH3] Chart only with 0 as values #1781

Closed
lolodomo opened this issue Oct 31, 2020 · 14 comments · Fixed by #1782 or #1789
Closed

[OH3] Chart only with 0 as values #1781

lolodomo opened this issue Oct 31, 2020 · 14 comments · Fixed by #1782 or #1789

Comments

@lolodomo
Copy link
Contributor

Now that I can display charts, charts are containing only 0 values.
If I use the persistence API to request the last data for one of these temperature items, I get values.
image

@kaikreuzer
Copy link
Member

I just upgraded my system and saw the same.
How shall we solve it? @ghys As you mention other tools in the UI being broken by this, I assume we best strip off the unit from the state here and define that the REST API always responds with the items' default unit?

@ghys
Copy link
Member

ghys commented Oct 31, 2020

I have now downgraded to the M1 version of the rrd4j bundle and I'm back to acceptable perf levels again:
(see ~60ms vs 3.5s)

image

@ghys
Copy link
Member

ghys commented Oct 31, 2020

How shall we solve it? @ghys As you mention other tools in the UI being broken by this, I assume we best strip off the unit from the state here and define that the REST API always responds with the items' default unit?

That would solve the problem, note that I don't have a problem with parsing the number with the unit attached (the client can split on " " and take the first part) but the most severe issue is the performance degrading (openhab/openhab-addons#8866 (comment)).
(sorry my reply above was meant for this other issue).

@kaikreuzer
Copy link
Member

That would solve the problem, note that I don't have a problem with parsing the number with the unit attached (the client can split on " " and take the first part)

I nonetheless think it makes sense to define that historic states are always in the default unit - because otherwise, you would have to deal with changing unit on client side and that would imho be highly complicated. We also use the unit from the item state description and show that normally in the legend - so that would be all clean.
I've created #1782 for that.

I have now downgraded to the M1 version of the rrd4j bundle and I'm back to acceptable perf levels again

Could you please create a separate issue for it? Maybe you can also directly attach an rrd4j database file, so that it can be easily reproduced.

@lolodomo
Copy link
Contributor Author

lolodomo commented Nov 1, 2020

I installed snapshot 1998 and removed all my rrd files.
Values are still 0 in the charts.

@lolodomo
Copy link
Contributor Author

lolodomo commented Nov 1, 2020

Can the issue be reopened please.

@lolodomo
Copy link
Contributor Author

lolodomo commented Nov 2, 2020

@kaikreuzer : did you check ? Still not working for me with snapshot 2003.

@kaikreuzer
Copy link
Member

I just upgraded to 2003 and can confirm the issue - or at least a similar one:
All charts with Number items that have dimensions now only show 0 values.
This actually was always like this, we just didn't have any persistence services that deliver QuantityTypes so far 😄 .

The issue is with the chart provider, it cannot yet handle QuantityTypes as can be seen when debug logging is enabled:

08:52:04.042 [DEBUG] [ultchartprovider.DefaultChartProvider] - Unsupported item type in chart: class org.openhab.core.library.types.QuantityType

@kaikreuzer kaikreuzer reopened this Nov 2, 2020
@lolodomo
Copy link
Contributor Author

lolodomo commented Nov 2, 2020

This actually was always like this

You mean in OH3 I hope because it is working properly in OH2 since years.

@kaikreuzer
Copy link
Member

No, OH2 "didn't have any persistence services that deliver QuantityTypes".

@lolodomo
Copy link
Contributor Author

lolodomo commented Nov 2, 2020

I mean charts with these number with dimensions are working in OH2.
Do you need a screen capture ?

@kaikreuzer
Copy link
Member

No, as mentioned above, everything is totally clear.

@kaikreuzer
Copy link
Member

Just retested with build 2004 and the charts are working smoothly for me now.

@lolodomo
Copy link
Contributor Author

lolodomo commented Nov 2, 2020

Charts are back for me too. Thank you Kai.

splatch pushed a commit to ConnectorIO/copybara-hab-core that referenced this issue Jul 11, 2023
…ab#1789)

Fixes openhab#1781

Signed-off-by: Kai Kreuzer <kai@openhab.org>
GitOrigin-RevId: 35b0a12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants