stfnhmplr / homebridge-synology

Control your Synology Diskstation with Homekit
MIT License
159 stars 16 forks source link

Problem with OTP #65

Closed mbierman closed 2 years ago

mbierman commented 2 years ago

Describe Your Problem: I put in the OTP-Code but I am getting the following error.

Logs:

[12/24/2021, 2:39:48 AM] [Pigpen] Can't get average disk temperature, Error: Failed to authenticate 2-step verification code

Plugin Config:

        {
            "name": "Pigpen",
            "host": "pigpen.lan",
            "mac": "***",
            "port": 5001,
            "username": "***",
            "password": "****",
            "protocol": "https",
            "version": "6.2.4",
            "startupTime": 60,
            "shutdownTime": 60,
            "otp": "***",
            "accessory": "synology"
        },

Screenshots: image

Environment:

stfnhmplr commented 2 years ago

Does the error message appear only once or does it appear with every temperature query? It sometimes happens that when restarting homebridge, the first or the first two queries fail. But after that, the authentication should work as expected.

If not, did you follow the guide linked in the readme to set up 2FA and get the code?

mbierman commented 2 years ago

Hard to say here are some log entries. I was restarting it so these could be related to what you said. I'll watch for a few days and see how it goes.


[12/24/2021, 3:00:20 AM] [Pigpen] Can't get average disk temperature, Error: Failed to authenticate 2-step verification code
[12/24/2021, 3:47:44 AM] [Pigpen] Can't get temperature, Error: getaddrinfo EAI_AGAIN pigpen.lan

Thanks!

bjornand1 commented 2 years ago

I have the same issue. I can turn on and off the Synology through the plugin, but getting the temperature fails due to missing 2FA code. My Synology is on DSM 7, which does not seem to be supported? I cannot find any secret code, as the instructions show, and version 7 is not recognized as version number.

stfnhmplr commented 2 years ago

@mbierman Any update on this? Did the error occur again during runtime or only after restarts as I suspected?

@bjornand1 Have you seen the ReadMe? Please take a look at the configuration instructions: https://github.com/stfnhmplr/homebridge-synology#some-explanations Your question about the version is answered there. There is also a link to instructions on how to set up the 2FA code.

bjornand1 commented 2 years ago

@stfnhmplr Thanks for you response. Yes, I have seen the instructions but they only seem to apply to DSM 6, in DSM 7 things look different.

stfnhmplr commented 2 years ago

Just because it looks different doesn't mean it doesn't work similarly. Can you be more specific about why you can't follow the instructions?

bjornand1 commented 2 years ago

@stfnhmplr Well, I can redo setting up 2FA, but I never get to see the secret key.

stfnhmplr commented 2 years ago

You can decode the provided QR-Code to get the secret key. Try this tool: https://zxing.org/w/decode.jspx

The result should be an URL that contains the secret key in its query string.

bjornand1 commented 2 years ago

@stfnhmplr Your help is much appreciated! However, there is no QR code in the 2FA setup and Googling how to find the secret key in DSM 7 gives no results.

bjornand1 commented 2 years ago

@stfnhmplr OK, so I turned off 2FA and started from scratch. To set it up again, I now get a QR code to use with the Synology Secure Signin app, but using the tool you linked says there is no valid bar code.

bjornand1 commented 2 years ago

@stfnhmplr Sorry for all this back and forth, but I finally figured out I could go into a manual mode and that finally revealed the "secret key". However, when I now try to install the plugin in Homebridge, I get this error message:

Screen Shot 2022-03-07 at 10 50 43

Any ideas about this?

stfnhmplr commented 2 years ago

Any ideas about this?

see #58