gordlea / fireboard2mqtt

8 stars 5 forks source link

addon not connecting to mqtt #21

Closed asolochek closed 7 months ago

asolochek commented 1 year ago

This seems like is must be specific to my setup, but my setup is pretty standard with home assistant OS running in a VM, and the mosquitto broker running as an addon. I don't see any indications of failed connection attempts from this addon in the mosquitto logs. In the fireboard2mqtt log I see this:

21:57:01] INFO: Preparing to start... [21:57:01] INFO: Verbose logging enabled. [fireboard2mqtt:cli] starting fireboard2mqtt [fireboard2mqtt:cli] initializing mqtt client... [fireboard2mqtt:cli] mqtt client ready. [fireboard2mqtt:mqttclient] connecting to mqtt ErrorWithReasonCode: Connection refused: Not authorized at handleConnack (/opt/fireboard2mqtt/.yarn/cache/mqtt-npm-5.0.0-1da24a1deb-cad5180a95.zip/node_modules/mqtt/build/src/lib/handlers/connack.js:43:21) at handle (/opt/fireboard2mqtt/.yarn/cache/mqtt-npm-5.0.0-1da24a1deb-cad5180a95.zip/node_modules/mqtt/build/src/lib/handlers/index.js:42:35) at work (/opt/fireboard2mqtt/.yarn/cache/mqtt-npm-5.0.0-1da24a1deb-cad5180a95.zip/node_modules/mqtt/build/src/lib/client.js:226:40) at writable._write (/opt/fireboard2mqtt/.yarn/cache/mqtt-npm-5.0.0-1da24a1deb-cad5180a95.zip/node_modules/mqtt/build/src/lib/client.js:251:13) at writeOrBuffer (/opt/fireboard2mqtt/.yarn/cache/readable-stream-npm-4.4.2-ac0d67d9ca-6f4063763d.zip/node_modules/readable-stream/lib/internal/streams/writable.js:334:12) at _write (/opt/fireboard2mqtt/.yarn/cache/readable-stream-npm-4.4.2-ac0d67d9ca-6f4063763d.zip/node_modules/readable-stream/lib/internal/streams/writable.js:283:10) at Writable.write (/opt/fireboard2mqtt/.yarn/cache/readable-stream-npm-4.4.2-ac0d67d9ca-6f4063763d.zip/node_modules/readable-stream/lib/internal/streams/writable.js:286:10) at Socket.ondata (node:internal/streams/readable:766:22) at Socket.emit (node:events:514:28) at addChunk (node:internal/streams/readable:324:12) { code: 135 } node:internal/process/promises:288 triggerUncaughtException(err, true / fromPromise /); ^ [UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason "undefined".] { code: 'ERR_UNHANDLED_REJECTION' } Node.js v18.17.0

gordlea commented 7 months ago

Closing because this should be taken care of with v3. See #31