Giter Site home page Giter Site logo

Comments (15)

dedors avatar dedors commented on May 28, 2024

I discovered a "heavy" load on my network causing nonstopp 4-12MB/s. It also causes my GPU to spin up its fans.

I found the roots to be the vacuum-card when using the camera. When removing it, it does continue for some time, but after restart browser/tab it's back to normal.

I did a test with picture glance card and it does not happen there (below 20KB/s).

from vacuum-card.

docBliny avatar docBliny commented on May 28, 2024

Just adding my "me too" to this thread. Looks like there's an infinite loop on loading the vacuum maps.

from vacuum-card.

denysdovhan avatar denysdovhan commented on May 28, 2024

Unfortunately, I can't help with this issue, since I don't have a rooted vacuum with Voletudo firmware. I'd be grateful if someone could take a look at this issue.

from vacuum-card.

docBliny avatar docBliny commented on May 28, 2024

@denysdovhan Could you try to trace how often https://github.com/denysdovhan/vacuum-card/blob/master/src/vacuum-card.js#L108 is called? The map update seems to be happening outside the following check for changes to state. I didn't have the time to debug and understand when/how the updated method gets called. The HASS documentation (https://developers.home-assistant.io/docs/frontend/custom-ui/lovelace-custom-card/) does state Home Assistant will call setConfig(config) when the configuration changes (rare) but Home Assistant will set the hass property when the state of Home Assistant changes (frequent), so if the latter is triggering the method, that might be a possible cause.

Another option might actually be to have a configurable update frequency on the map (regardless of a bug fix) allowing the user to specify how often the map should be updated.

from vacuum-card.

denysdovhan avatar denysdovhan commented on May 28, 2024

Could you try to trace how often … is called?

It's called every time a prop gets updated. In the case of static image, it updates approx on every state change of the vacuum. However, in the case of a live map, it might update a way faster.

@docBliny allowing a user to set the frequency of updates might be a good solution. We can use throttling for that.

from vacuum-card.

vaproloff avatar vaproloff commented on May 28, 2024

@denysdovhan Could you try to trace how often https://github.com/denysdovhan/vacuum-card/blob/master/src/vacuum-card.js#L108 is called?

I don't know how to trace function calling by time, but, as I wrote in issue opening, in Chrome "Network" tab I have infinite requests for jpeg image named "camera.rockrobo_map?token=..." every 5-10 milliseconds (about 150 requests per second). I think if I have more powerfull CPU, requests will be even more often.
I have screenshot here.

I can do more tests. You just say, please, what to do and how.

Configurable map updating frequency will be solution, yes.
But it will be better to somehow bind updating of a map in widget to camera image updating.

from vacuum-card.

daemongloom avatar daemongloom commented on May 28, 2024

It's called too often.
this.map.attributes.entity_picture +&t=${new Date().getTime()};
That line effectively kills cache as it has new URL every millisecond. Probably, it would be enough to switch "t" parameter to seconds.

I was not able to check it as HASS always loads original version of js from HACS for me. Editing file via samba addon, editing via file editor, restarting browser, HASS from its interface, restarting VM with HASS - nothing worked for me. I'll be able to check it myself if you can point me where that js can be cached.

from vacuum-card.

aalbul avatar aalbul commented on May 28, 2024

Hello.
Any updates on this?
Now you don't need a rooted device to see the map: https://github.com/PiotrMachowski/Home-Assistant-custom-components-Xiaomi-Cloud-Map-Extractor

from vacuum-card.

denysdovhan avatar denysdovhan commented on May 28, 2024

@aalbul Wow, cool! Let me take a look on that.

from vacuum-card.

krystiancharubin avatar krystiancharubin commented on May 28, 2024

https://github.com/PiotrMachowski/lovelace-xiaomi-vacuum-map-card/blob/ba073d307c9c2e5d591a7102ede16a185349422f/dist/xiaomi-vacuum-map-card.js#L661

we should try that

from vacuum-card.

vaproloff avatar vaproloff commented on May 28, 2024

Problem is not solved, why did you close the issue?
I have the same behaviour as it had been before update. Even with map_refresh

from vacuum-card.

krystiancharubin avatar krystiancharubin commented on May 28, 2024

The card should be refreshing every 5 seconds now by default.
Try clearing your cache if you are experiencing high refreshes like before.
also delete the vacuum-card.js.gz file to make sure its not running older gzipped version.

from vacuum-card.

daemongloom avatar daemongloom commented on May 28, 2024

For me it works fine now, updated to latest version with HACS. Request goes every 5 seconds if vacuum is active. And there are no new requests when vacuum is paused/docked.

from vacuum-card.

vaproloff avatar vaproloff commented on May 28, 2024

I've done all that following your recomendations.
And voila: everything worked as it should.
Sorry for my mistake!
And thanks!

from vacuum-card.

krystiancharubin avatar krystiancharubin commented on May 28, 2024

no problem, glad that its working now.
we should probably add more troubleshooting steps in the readme.

from vacuum-card.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.