matijse / eufy-ha-mqtt-bridge

Receive Eufy alerts and thumbnails in Home Assistant via MQTT
124 stars 25 forks source link

connection issue #103

Open hutchtg opened 3 years ago

hutchtg commented 3 years ago

Getting the following connection issue when starting up the integration (via the MaxWinterstein add-on)

(node:352) UnhandledPromiseRejectionWarning: Error: Connection refused: Not authorized

I've had a lok through other issues, and can't find anything relatable. I'm using a separate EUFY account. any help would be appreciated.

code is as follows: `[12:08:06] INFO: starting original stuff...

eufy-ha-mqtt-bridge@1.0.0 start /app NODE_ENV=production node --unhandled-rejections=strict index.js info: Found device: Camera (T8C6 - type: T8411) {"timestamp":"2021-11-12T12:08:10.833Z"} (node:352) UnhandledPromiseRejectionWarning: Error: Connection refused: Not authorized at MqttClient._handleConnack (/app/node_modules/mqtt/lib/client.js:1190:15) at MqttClient._handlePacket (/app/node_modules/mqtt/lib/client.js:424:12) at work (/app/node_modules/mqtt/lib/client.js:321:12) at Writable.writable._write (/app/node_modules/mqtt/lib/client.js:335:5) at doWrite (/app/node_modules/readable-stream/lib/_stream_writable.js:409:139) at writeOrBuffer (/app/node_modules/readable-stream/lib/_stream_writable.js:398:5) at Writable.write (/app/node_modules/readable-stream/lib/_stream_writable.js:307:11) at Socket.ondata (internal/streams/readable.js:726:22) at Socket.emit (events.js:400:28) at addChunk (internal/streams/readable.js:290:12) (Use node --trace-warnings ... to show where the warning was created) (node:352) UnhandledPromiseRejectionWarning: Unhandled promise rejection. 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(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! eufy-ha-mqtt-bridge@1.0.0 start: NODE_ENV=production node --unhandled-rejections=strict index.js npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the eufy-ha-mqtt-bridge@1.0.0 start script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2021-11-12T12_08_11_078Z-debug.log [cmd] /run.sh exited 1 [cont-finish.d] executing container finish scripts... [cont-finish.d] 99-message.sh: executing...

Oops! Something went wrong.

We are so sorry, but something went terribly wrong when starting or running this add-on.

Be sure to check the log above, line by line, for hints.

[cont-finish.d] 99-message.sh: exited 0. [cont-finish.d] done. [s6-finish] waiting for services. [s6-finish] sending all processes the TERM signal.`

hutchtg commented 3 years ago

Anyone?

MaxWinterstein commented 3 years ago

Smells like an issue with MQTT, not the addon itself. You sure you are using a correct username/passwort/host for mqtt?

vandinglewop commented 2 years ago

I have what looks to be the same issue. I have tried with default login and tried creating a separate user for MQTT. 2nd login for Eufy logs in fine on the app without 2 factor auth and can see the cameras.

eufy-ha-mqtt-bridge@1.0.0 start /app NODE_ENV=production node --unhandled-rejections=strict index.js (node:353) UnhandledPromiseRejectionWarning: TypeError: devices is not iterable at EufyHttp.refreshStoredDevices (/app/eufy/http.js:45:24) at processTicksAndRejections (internal/process/task_queues.js:95:5) at async EufyClient.init (/app/eufy/client.js:17:5) (Use node --trace-warnings ... to show where the warning was created) (node:353) UnhandledPromiseRejectionWarning: Unhandled promise rejection. 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(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! eufy-ha-mqtt-bridge@1.0.0 start: NODE_ENV=production node --unhandled-rejections=strict index.js npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the eufy-ha-mqtt-bridge@1.0.0 start script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2022-02-13T17_14_10_393Z-debug.log [cmd] /run.sh exited 1 [cont-finish.d] executing container finish scripts... [cont-finish.d] 99-message.sh: executing...

Oops! Something went wrong.

We are so sorry, but something went terribly wrong when starting or running this add-on.

Be sure to check the log above, line by line, for hints.

[cont-finish.d] 99-message.sh: exited 0. [cont-finish.d] done. [s6-finish] waiting for services. [s6-finish] sending all processes the TERM signal.

atv2016 commented 2 years ago

Hmm i get the same but this:

NODE_ENV=production node --unhandled-rejections=strict index.js (node:353) UnhandledPromiseRejectionWarning: TypeError: devices is not iterable at EufyHttp.refreshStoredDevices (/app/eufy/http.js:45:24) at processTicksAndRejections (internal/process/task_queues.js:95:5) at async EufyClient.init (/app/eufy/client.js:17:5) (Use node --trace-warnings ... to show where the warning was created)