Hypfer / lovelace-valetudo-map-card

Display the map from a valetudo-enabled robot in a home assistant dashboard card.
MIT License
242 stars 36 forks source link

Map won't show up after plugin update #58

Closed nunodsrodrigues closed 4 years ago

nunodsrodrigues commented 4 years ago

Hello,

I've been running the plugin smoothly and yesterday I decided to run the update. After that I can't see the map anymore and sometimes it even hides all the content from the lovelace tab where the map is. Any suggestion to fix this?

Regards.

TheLastProject commented 4 years ago

I'm not too surprised this happened, I tried to find testers that were still on old Valetudo versions because 0.6 has a completely new map format, but I couldn't find any :)

First things first, what version of Valetudo are you running exactly? And is there anything in your browser console?

nunodsrodrigues commented 4 years ago

I'm running Valetudo 0.4.0 and my browser console shows this:

valetudo-map-card.js:72 Uncaught (in promise) TypeError: attributes.layers is not iterable at HTMLElement.getLayers (valetudo-map-card.js:72) at HTMLElement.set hass [as hass] (valetudo-map-card.js:634) at chunk.8b29f0c82629b54e915d.js:23978 at Array.forEach () at HTMLElement.value (chunk.8b29f0c82629b54e915d.js:23978) at HTMLElement.performUpdate (app.5aafc0f2.js:1) at HTMLElement._enqueueUpdate (app.5aafc0f2.js:1)

TheLastProject commented 4 years ago

Can you try again? Should be better now. If it still isn't fine please give your browser console again and if possible screenshots of the map :)

nunodsrodrigues commented 4 years ago

Still not showing:

valetudo-map-card.js:227 Uncaught ReferenceError: no_go_areas is not defined at HTMLElement.getNoGoAreas (valetudo-map-card.js:227) at HTMLElement.drawMap (valetudo-map-card.js:395) at HTMLElement.set hass [as hass] (valetudo-map-card.js:695) at HTMLElement.value (chunk.8b29f0c82629b54e915d.js:23543) at HTMLElement.value (chunk.8b29f0c82629b54e915d.js:23978) at HTMLElement.t.addEventListener.once (chunk.8b29f0c82629b54e915d.js:23543) at n (app.5aafc0f2.js:1) at chunk.8b29f0c82629b54e915d.js:12852

TheLastProject commented 4 years ago

Okay, fixed that one too. Anything left now? :)

kurumuru commented 4 years ago

aletudo-map-card.js:184:7 ReferenceError: assignment to undeclared variable virtual_walls

nunodsrodrigues commented 4 years ago

Same:

valetudo-map-card.js:228 Uncaught TypeError: attributes.no_go_areas is not iterable at HTMLElement.getNoGoAreas (valetudo-map-card.js:228) at HTMLElement.drawMap (valetudo-map-card.js:395) at HTMLElement.set hass [as hass] (valetudo-map-card.js:695) at HTMLElement.value (chunk.8b29f0c82629b54e915d.js:23543) at HTMLElement.value (chunk.8b29f0c82629b54e915d.js:23978) at HTMLElement.t.addEventListener.once (chunk.8b29f0c82629b54e915d.js:23543) at n (app.5aafc0f2.js:1) at chunk.8b29f0c82629b54e915d.js:12852

TheLastProject commented 4 years ago

Okay, those two errors should be fixed too now

nunodsrodrigues commented 4 years ago

Yes, now it's showing the map! =D The obstacle colors are different but in general seems fine, had to set the wall_color :)

TheLastProject commented 4 years ago

Okay good, tell me if you run into any other issues. Thanks for helping me debug and fix it :)

nunodsrodrigues commented 4 years ago

Okay good, tell me if you run into any other issues. Thanks for helping me debug and fix it :)

Well, I faced another issue that forced me to use rest api instead of mqtt but that's for another thread ;) Thank you for the support.