Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lorex 2K doorbell connection fails; port closed? #4

Open
Mike5357 opened this issue Jan 27, 2025 · 5 comments
Open

Lorex 2K doorbell connection fails; port closed? #4

Mike5357 opened this issue Jan 27, 2025 · 5 comments

Comments

@Mike5357
Copy link

Mike5357 commented Jan 27, 2025

I've just installed a Lorex 2k Doorbell (Model B451AJ) and have been having trouble getting it set up in mqtt, namely every addon I've been trying including this one results in an error similar to:

'01/27/25 14:26:01.0558' ERROR DahuaClient:63 -> Connection failed, Error: [Errno 111] Connect call failed ('xxx.xxx.xx.xx', 5000), Line: 55

I've enabled API_DEBUG as suggested on the Supported Models page, but still no luck.

Full Log (loops repeatedly):

'01/27/25 14:15:21.0396' INFO BaseClient:46 -> Starting to connect MQTTClient, Should connect: True
'01/27/25 14:15:21.0396' INFO BaseClient:27 -> Initialize DahuaClient
'01/27/25 14:15:21.0396' INFO BaseClient:46 -> Starting to connect DahuaClient, Should connect: True
'01/27/25 14:15:22.0396' INFO MQTTClient:55 -> Trying to connect to MQTT Broker...
'01/27/25 14:15:22.0397' INFO DahuaClient:43 -> Connecting
'01/27/25 14:15:22.0397' DEBUG selector_events:64 -> Using selector: EpollSelector
'01/27/25 14:15:22.0783' INFO MQTTClient:93 -> Connected to MQTT broker with result code: Success
'01/27/25 14:15:29.0420' ERROR DahuaClient:63 -> Connection failed, Error: [Errno 111] Connect call failed ('xxx.xxx.xx.xx', 5000), Line: 55
'01/27/25 14:15:29.0421' INFO DahuaClient:68 -> Disconnected, will try to connect in 30 seconds

From what I've been searching, it sounds like newer firmware versions may have locked down port 5000 and now use port 35000? Would this change be possible, or am I just doing something else wrong?

Edit: Current Doorbell firmware version is 2.820.010000000.28.R.20240520

@Mike5357
Copy link
Author

Port scan:
Image

@baudneo
Copy link
Owner

baudneo commented Jan 28, 2025

Hi, I switched to reolink but still have my old lorex 2k doorbell. I can get it set up this evening and make some changes to the code to try the new port.

With any luck, it's just switching port # to get things working.

@baudneo
Copy link
Owner

baudneo commented Jan 28, 2025

If you want to try something quick:

Edit https://github.com/baudneo/dahuavto2mqtt/blob/master/clients%2FDahuaClient.py#L50 this line to port 35000, build a new container with that modified code and try it.

So clone repo, edit file, make sure you're in the root of the repo dir, then issue docker build -t baudneo/dahuavto2mqtt:latest .

I'll add an env var to configure which port to connect to vto devices as well.

@Mike5357
Copy link
Author

I tried changing the port and now just get:

'01/28/25 11:55:57.0939' INFO DahuaAPI:323 -> pre_login:: Preparing first message to elicit a challenge...
'01/28/25 11:56:52.0944' INFO DahuaAPI:265 -> Server sent EOF message

@baudneo
Copy link
Owner

baudneo commented Jan 28, 2025

Not good, hopefully it's something simple rather than their efforts to lock it down

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants