Hypfer / ICantBelieveItsNotValetudo

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

Map drawing error after updating Valetudo to 0.6.1 #35

Closed vaproloff closed 4 years ago

vaproloff commented 4 years ago

After updating Valetudo to 0.6.1 ICantBelieveItsNotValetudo (is running in docker) drops an error. I have logs from Portainer here:

> i-cant-believe-its-not-valetudo@0.2.0 start /app
> node app.js
Loading configuration file: /app/config.json
Connecting to MQTT Broker
Webserver running on port 3000
Connected to MQTT Broker
TypeError: Cannot read property 'dimensions' of undefined
    at Object.DRAW_MAP_PNG (/app/lib/Tools.js:69:72)
    at MqttClient.updateMapTopic (/app/lib/MqttClient.js:97:19)
    at MqttClient.client.on (/app/lib/MqttClient.js:80:22)
    at emitThree (events.js:136:13)
    at MqttClient.emit (events.js:217:7)
    at MqttClient._handlePublish (/app/node_modules/mqtt/lib/client.js:987:12)
    at MqttClient._handlePacket (/app/node_modules/mqtt/lib/client.js:336:12)
    at work (/app/node_modules/mqtt/lib/client.js:292:12)
    at Writable.writable._write (/app/node_modules/mqtt/lib/client.js:302:5)
    at doWrite (/app/node_modules/readable-stream/lib/_stream_writable.js:428:64)

And this error TypeError: ... appears every 5 seconds. Valetudo works, displays picture in Valetudo interface, updates map_data in Mqtt correctly (I think). But ICantBelieveItsNotValetudo doesn't update map image in Mqtt.

Any suggestions?

Hypfer commented 4 years ago

It is highly recommended to read the release notes of valetudo since those do mention breaking changes such as the one you're experiencing here.