question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Best way to show long term data?

See original GitHub issue

I’ve noticed that HomeAssistant gets unresponsive if showing history data for about two weeks using the default sqlite database.

Is it possible to do some throttling when asking for the history data?

I have 4 mini-graph-cards showing history like this:

          - entities:
              - entity: sensor.floor_2_kwh_verlichting_total
                name: VERLICHTING
            font_size: 75
            hours_to_show: 336
            icon: 'mdi:flash'
            line_width: 8
            points_per_hour: 0.041667
            type: 'custom:mini-graph-card'

But the result is that my homeassistant gets unresponsive and goes to 100% CPU due to the history api calls.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
bramkragtencommented, May 11, 2019

I can think of 2 solutions:

Instead of updating the history on every state update, you could update it on a time interval if the state is changed, this could be a setting.

And on updating only get the new data instead of all data, store the last fetch timestamp and use that as start for the history api, then concat the new data with the old.

I could look into it in the next weeks or so if you think it is a good idea.

0reactions
kalkihcommented, May 17, 2019

Fetching of history is now much more efficient thanks to #88 There’s also a new option update_interval to set the interval between history requests, but with the changes in #88 I don’t really think it should be needed, unless your system is really struggling.

Read more comments on GitHub >

github_iconTop Results From Across the Web

13 Powerful Methods for Data Visualization Success l Sisense
1. Indicators show one KPI, clearly · 2. Line charts display trends · 3. Bar charts break things down, simply · 4. Column...
Read more >
Showing Data Over Time - The Data Visualisation Catalogue
Showing Data Over Time · Area Graph · Bubble Chart · Candlestick Chart · Gantt Chart · Heatmap · Histogram · Line Graph...
Read more >
How to Choose the Right Data Visualization | Tutorial by Chartio
There are many ways that charts can be used to visualize data. Read this article to learn which charts can be used for...
Read more >
11 Ways to Visualize Changes Over Time – A Guide
Let's start with the basics: the line graph. · Scatterplots work well if you have a lot of data points. · Bar charts...
Read more >
Visualizations That Really Work - Harvard Business Review
In some ways, “data visualization” is a terrible term. It seems to reduce the construction of good charts to a mechanical procedure. It...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found