pergolafabio / Hikvision-Addons

Home Assistant: Hikvision Doorbell
182 stars 40 forks source link

Invalid username and password. But they are valid! #212

Closed theendfear1 closed 4 months ago

theendfear1 commented 4 months ago

What happened?

When i try to connect to the doorbell it says: "Error while logging into Doorbell: Invalid user and password". But they are valid, i'm logged in with client on my mobile and on my desktop!

Add-on

Hikvision Doorbell

What version of the add-on are you running?

3.0.0-beta.63

Installation type

Home Assistant add-on

Relevant log output

2024-06-24 05:52:17.763 | DEBUG    | config:load_mqtt_config:129 - Loading MQTT configuration from supervisor
2024-06-24 05:52:17.764 | DEBUG    | config:mqtt_config_from_supervisor:36 - Requesting MQTT service configuration to supervisor
2024-06-24 05:52:17.792 | DEBUG    | __main__:main:31 - Importing Hikvision SDK
2024-06-24 05:52:17.796 | INFO     | sdk.utils:loadSDK:44 - Using OS: Linux with architecture: x86_64
2024-06-24 05:52:17.797 | DEBUG    | sdk.utils:loadSDK:57 - Loading library from lib-amd64/libhcnetsdk.so
2024-06-24 05:52:17.827 | DEBUG    | __main__:main:35 - Hikvision SDK loaded
2024-06-24 05:52:17.828 | DEBUG    | sdk.utils:setupSDK:86 - Initializing SDK
loop[2] find 2 mac and 1 ip
2024-06-24 05:52:17.861 | DEBUG    | sdk.utils:setupSDK:100 - SDK initialized
2024-06-24 05:52:17.862 | DEBUG    | doorbell:__init__:51 - Setting up doorbell: Doorbell
2024-06-24 05:52:17.862 | DEBUG    | doorbell:authenticate:59 - Logging into doorbell
[2024-06-24 05:52:17.861][DBG] CCoreGlobalCtrlBase::LoadDSo, HPR_LoadDSo Succ, Path[/lib/x86_64-linux-gnu/libz.so.1.2.11], hHandleRet[1046219040]
[2024-06-24 05:52:17.861][INF] The COM:HCCoreBase ver is 6.1.4.15, 2020_03_05. Async:1.
[2024-06-24 05:52:17.861][INF] The COM:Core ver is 6.1.6.45, 2021_03_02. Async:1.
[2024-06-24 05:52:17.861][INF] This HCNetSDK ver is 6.1.6.45 Ver 2021_03_02.
[2024-06-24 05:52:17.864][INF] Login dev 192.168.0.149:8000.
[2024-06-24 05:52:17.864][INF] dwTotalNum[2048]
[2024-06-24 05:52:17.866][INF] Private connect 192.168.0.149:8000 sock=134 this=0x3ea24624 cmd=0x10000 port=51962
[2024-06-24 05:52:17.866][INF] LogonDev1 in[192.168.0.149:8000]
[2024-06-24 05:52:17.871][DBG] CCoreGlobalCtrlBase::LoadDSo, HPR_LoadDSo Succ, Path[/app/lib-amd64/libcrypto.so], hHandleRet[1050034032]
[2024-06-24 05:52:17.874][DBG] CCoreGlobalCtrlBase::LoadDSo, HPR_LoadDSo Succ, Path[/app/lib-amd64/libssl.so], hHandleRet[1049904848]
[2024-06-24 05:52:17.874][INF] SSLTRANSAPI::LoadAPI, libeay, Load Real Path[/app/lib-amd64/libcrypto.so]
[2024-06-24 05:52:17.874][INF] SSLTRANSAPI::LoadAPI, libssl, Load Real Path[/app/lib-amd64/libssl.so]
[2024-06-24 05:52:17.874][INF] SSLTRANSAPI::IsAllAPILoaded, OpenSSL_version Unload
[2024-06-24 05:52:17.874][INF] OpenSSL, Not All Function Loaded!
[2024-06-24 05:52:17.874][INF] SSLTRANSAPI::PrintVersion, SSLeay_version info [OpenSSL 1.0.2t  10 Sep 2019]
[2024-06-24 05:52:17.874][INF] CSSLTrans::SSLCtxInit, dwSSLVersion[0], m_fnClientMethodV23
2024-06-24 05:52:18.286 | ERROR    | __main__:<module>:101 - Error while logging into Doorbell: Invalid user and password. Error code:1
[2024-06-24 05:52:18.284][ERR] LogonDev1[192.168.0.149]
[2024-06-24 05:52:18.284][ERR] [192.168.0.149:8000]PRO_LoginHikDevice fail[err=153].[0x-0000001,0x-0000001]
[2024-06-24 05:52:18.285][ERR] CMemberMgrBase::AllocIndex2, MemberStart Failed, iIndex[0]
[2024-06-24 05:52:18.309][INF] COM_Logout[-1][1]

Relevant configuration

- name: Doorbell
  ssl: false
  ip: 192.168.0.149
  port: 8000
  username: admin
  password: xxxxxxx (my password)

Anything else?

No response

pergolafabio commented 4 months ago

Can you try rebooting your device? Maybe you are blocked? Try also an easier password, maybe you are using a special character?

femajocri commented 2 months ago

I have also the same problem image

image

pergolafabio commented 2 months ago

Special char in the password? SDK is different login then Isapi... Try easy password maybe? Also without quote in the addon config, try without special chars, only number/letter

femajocri commented 2 months ago

Special char in the password? SDK is different login then Isapi... Try easy password maybe? Also without quote in the addon config, try without special chars, only number/letter

No, simple letter and number password.

Maybe...:

pergolafabio commented 2 months ago

Nah, those are for http, the addon doesnt use http login

femajocri commented 2 months ago

Nah, those are for http, the addon doesnt use http login

I have always a 401 and a 200. image

The problem is that Hikvision Doorbell stops image

pergolafabio commented 2 months ago

Hmm, no idea , what kind of password/device do you have?