Closed markrennie71 closed 3 years ago
I have tried this one from @alceasan but I get this error in the docker.. I think it is the 0.3.0
i-cant-believe-its-not-valetudo@0.3.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
SyntaxError: Unexpected token in JSON at position 0
at JSON.parse (<anonymous>)
at MqttClient.<anonymous> (/app/lib/MqttClient.js:85:42)
at MqttClient.emit (events.js:314:20)
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)
at writeOrBuffer (/app/node_modules/readable-stream/lib/_stream_writable.js:417:5)
at Writable.write (/app/node_modules/readable-stream/lib/_stream_writable.js:334:11)
Hi @markrennie71 , I have tried the rotate option with my docker build and it works without problem. The parameter goes into the mapSettings block of config.json, I paste here my config with a 90 degrees rotation:
"mapSettings": {
"drawPath": true,
"drawCharger": true,
"drawRobot": true,
"scale": 2,
"rotate": 90,
"colors": {
"floor": "#0076ff",
"obstacle_weak": "#6699ff",
"obstacle_strong": "#52aeff",
"path": "#ffffff"
}
}
This is the function used for rotation, from Jimp package. If your config isn't working, try to delete config.json and it will create a default new one on start.
thanks, I have tried everything and I get the same error each time using your docker image, looks like when it connects to mqtt it bombs out
Connected to MQTT Broker
SyntaxError: Unexpected token in JSON at position 0
at JSON.parse (<anonymous>)
at MqttClient.<anonymous> (/app/lib/MqttClient.js:85:42)
at MqttClient.emit (events.js:314:20)
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)
at writeOrBuffer (/app/node_modules/readable-stream/lib/_stream_writable.js:417:5)
at Writable.write (/app/node_modules/readable-stream/lib/_stream_writable.js:334:11)
going to close this as I realised I flashed with a different version of valetudo!! sorry
Hello
I cannot find a dockerfile that uses the newer option of rotate. Can you point me in the right direction please? As you don't have a docker for it?
Cheers Mark