Hypfer / ICantBelieveItsNotValetudo

A Valetudo companion service which renders maps to pngs
Apache License 2.0
129 stars 80 forks source link

Fix high usage when refreshing map #33

Closed kubiq closed 3 years ago

kubiq commented 4 years ago

Fixes high cpu load when generating map image.

alceasan commented 4 years ago

Hi @kubiq, i have tried your changes in my own fork first, but I'm having some problems with background color. The color outside the walls is black in the MQTT camera on HA:

image

kubiq commented 3 years ago

Hi, i know about it, i have kinda working version. But don't have time to finish it :-/

mjkl-gh commented 3 years ago

H i'm very interested in trying this out and maybe helping to finish it. I'm running ICantBelieveItsNotValetudo as Hassio addon (https://github.com/Poeschl/Hassio-Addons). However it's high cpu usage is throwing a real spanner in the works (slows down esphome compiling and home assistant in general)

Just a heads up your current commit doesn't npm install on linux/arm:

`canvas@2.6.1 install /app/node_modules/canvas

8 115.3 > node-pre-gyp install --fallback-to-build`

And than it fails downloading using node-pre-gyp and the install keeps on failing from there

alceasan commented 3 years ago

Just a heads up your current commit doesn't npm install on linux/arm:

canvas@2.6.1 install /app/node_modules/canvas #8 115.3 > node-pre-gyp install --fallback-to-build

And than it fails downloading using node-pre-gyp and the install keeps on failing from there

You can try my build, same code as this repo but multiarch build (including arm): https://hub.docker.com/r/alceasan/icantbelieveitsnotvaletudo

mjkl-gh commented 3 years ago

I might, Many thanks!

just tried forking https://github.com/Poeschl/Hassio-Addons and including this code. It worked for multiarch build but failed uploading it due to me not fully grasping the Hassio build method yet.

Poeschl commented 3 years ago

@mjkl-gh Found this issue and ended up making a beta-repository for it. Here can you find it and after including in the Home Assistant Store you should be able to install @kubiq's branch on your HA installation. ;)