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

Data missing from graphs #267

Open
jazzmonger opened this issue Apr 5, 2023 · 7 comments
Open

Data missing from graphs #267

jazzmonger opened this issue Apr 5, 2023 · 7 comments
Labels
bug Something isn't working

Comments

@jazzmonger
Copy link

jazzmonger commented Apr 5, 2023

Describe the bug
A clear and concise description of what the bug is.
Data is often missing from graphs. Reproducible on iPad, iPhone, macOS, Ubuntu and Debian. Safari, chrome, Brave browsers. Hone assistant app on iOS and macOS.

This happens intermittently on all platforms. Sometimes it's one data point, sometimes it's multiple data points in a row. The data comes back most of the time if you refresh the page.

Screenshots
If applicable, add screenshots to help explain your problem.
960F29BD-375B-41EB-954D-DDEEC7444C61
F1AF8DF3-9DD0-4FEA-8AE3-2F837244ED05

yaml

type: custom:plotly-graph
defaults:
  entity:
    show_value: true
hours_to_show: 0.5
entities:
  - entity: sensor.house_stoking_sensor
    filters:
      - filter: y !== null && +y > 100
    yaxis: y1
    show_value: false
    line:
      color: red
      dash: dashdot
  - entity: sensor.house_auger_display_sensor
    filters:
      - filter: y !== null && +y > 90
    yaxis: y1
    show_value: false
    line:
      color: white
  - entity: sensor.house_heating_idling_sensor
    filters:
      - filter: y !== null && +y > 40
    yaxis: y1
    show_value: false
    line:
      color: white
  - entity: sensor.house_uart_pipe_temp
    name: UART pipe temp Avg
    internal: true
    filters:
      - median:
          window_size: 100
          extended: true
          centered: true
    yaxis: y1
    show_value: true
    line:
      color: green
      shape: spline
      width: 2
      smoothing: 1
  - entity: sensor.house_uart_pipe_temp
    unit_of_measurement: Pipe Temp
    yaxis: y1
    show_value: true
    line:
      color: yellow
      shape: spline
      width: 2
      smoothing: 1
autorange_after_scroll: true
refresh_interval: auto
default_trace:
  line:
    width: 1
layout:
  height: 600
  yaxis:
    zeroline: false
    fixedrange: true
    range:
      - 100
      - 350
  yaxis2:
    gridcolor: whitesmoke
    fixedrange: false
    zeroline: false
    range:
      - 100
      - 350
  yaxis3:
    gridcolor: whitesmoke
    zeroline: true
    fixedrange: true
  grid:
    ygap: 1
    rows: 1
    columns: 1
    pattern: coupled
    roworder: top to bottom
  xaxis:
    rangeselector:
      bgcolor: '#474747'
      'y': 1.11
      buttons:
        - count: 30
          step: minute
        - count: 1
          step: hour
        - count: 2
          step: hour
        - count: 3
          step: hour
        - count: 12
          step: hour
        - count: 1
          step: day
        - count: 2
          step: day
        - count: 7
          step: day

Additional context
Add any other context about the problem here.

@jazzmonger jazzmonger added the bug Something isn't working label Apr 5, 2023
@jazzmonger
Copy link
Author

jazzmonger commented Apr 5, 2023

2D6E0376-9222-4EF2-9819-04219F18042B

and after a refresh of the browser the missing data is back. I've tried it with and without the filters. No difference.

3BDC8041-DEFC-4C85-97DE-B704ACAE9E51

@dbuezas
Copy link
Owner

dbuezas commented Apr 10, 2023

Interesting. Does this also happen with refresh_interval: 10s (auto gets push updates from home assistant, setting a time interval pulls them)

@jazzmonger
Copy link
Author

jazzmonger commented Apr 10, 2023

Like MANY other folks I had trouble with refresh_interval in that it doesn't "refresh" so based on your recommendation I use auto which gives me near real-time updates, which I need.

If it gets cold again and I need to use the pellet stove, I can certainly test the other refresh option again.

why would a browser refresh make them show up? The data is clearly there, and I can see it in the log entries.

Jeff

@dbuezas
Copy link
Owner

dbuezas commented Apr 11, 2023

Yes, a browser refresh will fetch everything as one interval so everything should be visible.

  • I think the issue with auto is that home assistant may not send every single update if they come in quick succession
  • and the issue with something like 10s is that I ask home assistant "give me everything between 10 seconds ago and now", and then assume I don't need to fetch anything inside that interval anymore. So it could happen that an update comes later for a timestamp a bit in the past and the card won't asl for it because it thinks it already has it.

I'll take a look soon

@dbuezas
Copy link
Owner

dbuezas commented Apr 11, 2023

One thing I want to try is to assume there may always be data between now and the last know datapoint (instead of between now and the last time I fetched data.

And also to assume there may be missing data between any two datapoints that arrived via the web socket (auto mode)

@jazzmonger
Copy link
Author

jazzmonger commented Apr 12, 2023

I just tested the refresh option you suggested. Same problem exists.
8847213C-89B3-4666-B032-CB9B4B04419F

after a browser refresh
01957C4B-D2F1-4184-BF93-21FE40CE49CB

@dbuezas
Copy link
Owner

dbuezas commented Apr 12, 2023

Ok, thanks. I'll think about how to deal with this without bombarding the home assistant backend with requests

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants