ptz0n / homebridge-verisure

 Platform plugin for Homebridge allowing to manage and control Verisure devices.
https://www.npmjs.com/package/homebridge-verisure
MIT License
66 stars 15 forks source link

FYI: Hoobs crashes when installing this plugin #119

Closed jkrogsgaard closed 3 years ago

jkrogsgaard commented 3 years ago

From log:

7.4.2021 09.32.15 (node:1239) UnhandledPromiseRejectionWarning: Error: Request failed with status code 401
7.4.2021 09.32.15 at createError (/home/hoobs/.hoobs/node_modules/axios/lib/core/createError.js:16:15)
7.4.2021 09.32.15 at settle (/home/hoobs/.hoobs/node_modules/axios/lib/core/settle.js:17:12)
7.4.2021 09.32.15 at IncomingMessage.handleStreamEnd (/home/hoobs/.hoobs/node_modules/axios/lib/adapters/http.js:260:11)
7.4.2021 09.32.15 at IncomingMessage.emit (events.js:327:22)
7.4.2021 09.32.15 at endReadableNT (internal/streams/readable.js:1327:12)
7.4.2021 09.32.15 at processTicksAndRejections (internal/process/task_queues.js:80:21)
7.4.2021 09.32.15 (Use node --trace-warnings ... to show where the warning was created)
7.4.2021 09.32.15 (node:1239) 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: 4)
7.4.2021 09.32.15 (node:1239) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
ptz0n commented 3 years ago

Hi & thanks for reaching out. The log states the issue:

Request failed with status code 401

Unauthorized - Authentication failed. This is either due to invalid email, password or token if the user have MFA enabled. For steps to handle the latter, please see Multi-factor authentication in the README.

jkrogsgaard commented 3 years ago

I was using the MFA as followed:

{
    "platform": "verisure",
    "plugin_map": {
        "plugin_name": "homebridge-verisure"
    },
    "pollInterval": 60,
    "email": “xxxx@gmail.com",
    "token": “xxxxxxxxxxxxxxxxx”,
    "alarmCode": “xxxx”
}
jkrogsgaard commented 3 years ago

I tried again and now it woks, sorry.