UNEXPECTED ERROR reolink IP camera

hey there , I just bought the reolink duo camera (ethernet version ) and I’ve been trying to add it into HA, but I always Get the message " unexpected error " , I don’t know how to add it.

here’s the logs

This error originated from a custom integration.

``Logger: custom_components.reolink_dev.config_flow
Source: custom_components/reolink_dev/base.py:220
Integration: Reolink IP camera (documentation, issues)
First occurred: 2:09:17 AM (14 occurrences)
Last logged: 2:36:47 PM

Unexpected exception
Traceback (most recent call last):
File “/usr/local/lib/python3.10/site-packages/aiohttp/connector.py”, line 986, in _wrap_create_connection
return await self._loop.create_connection(*args, **kwargs) # type: ignore[return-value] # noqa
File “/usr/local/lib/python3.10/asyncio/base_events.py”, line 1064, in create_connection
raise exceptions[0]
File “/usr/local/lib/python3.10/asyncio/base_events.py”, line 1049, in create_connection
sock = await self._connect_sock(
File “/usr/local/lib/python3.10/asyncio/base_events.py”, line 960, in _connect_sock
await self.sock_connect(sock, address)
File “/usr/local/lib/python3.10/asyncio/selector_events.py”, line 500, in sock_connect
return await fut
File “/usr/local/lib/python3.10/asyncio/selector_events.py”, line 535, in _sock_connect_cb
raise OSError(err, f’Connect call failed {address}’)
ConnectionRefusedError: [Errno 111] Connect call failed (‘192.168.68.141’, 80)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File “/config/custom_components/reolink_dev/config_flow.py”, line 70, in async_step_user
self.info = await self.async_validate_input(self.hass, user_input)
File “/config/custom_components/reolink_dev/config_flow.py”, line 138, in async_validate_input
if not await self.base.connect_api():
File “/config/custom_components/reolink_dev/base.py”, line 220, in connect_api
if not await self._api.get_settings():
File “/usr/local/lib/python3.10/site-packages/reolink/camera_api.py”, line 496, in get_settings
response = await self.send(body)
File “/usr/local/lib/python3.10/site-packages/reolink/camera_api.py”, line 1661, in send
if not await self.login():
File “/usr/local/lib/python3.10/site-packages/reolink/camera_api.py”, line 854, in login
response = await self.send(body, param)
File “/usr/local/lib/python3.10/site-packages/reolink/camera_api.py”, line 1705, in send
async with session.post(
File “/usr/local/lib/python3.10/site-packages/aiohttp/client.py”, line 1138, in aenter
self._resp = await self._coro
File “/usr/local/lib/python3.10/site-packages/aiohttp/client.py”, line 535, in _request
conn = await self._connector.connect(
File “/usr/local/lib/python3.10/site-packages/aiohttp/connector.py”, line 542, in connect
proto = await self._create_connection(req, traces, timeout)
File “/usr/local/lib/python3.10/site-packages/aiohttp/connector.py”, line 907, in _create_connection
_, proto = await self._create_direct_connection(req, traces, timeout)
File “/usr/local/lib/python3.10/site-packages/aiohttp/connector.py”, line 1206, in _create_direct_connection
raise last_exc
File “/usr/local/lib/python3.10/site-packages/aiohttp/connector.py”, line 1175, in _create_direct_connection
transp, proto = await self._wrap_create_connection(
File “/usr/local/lib/python3.10/site-packages/aiohttp/connector.py”, line 992, in _wrap_create_connection
raise client_error(req.connection_key, exc) from exc
aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host 192.168.68.141:80 ssl:default [Connect call failed (‘192.168.68.141’, 80)] ``

looks like it doesn’t like your credentials connecting to the camera. You have both reolink integrations installed from HACS?

I’m having the same issue. What is the format of the value we should enter in the “Host” field of the Connect To Device configuration?

yeah I actually deleted the integrations several times , I did everything possible , I did full reset 4 times , I even got in touch with reolink support and they said everything was normal , the ports on the camera are activated. I also changed the password admin. I’ve tried onvif , webrtc and I can’t get this camera to show up.
funny enough I put the IP address on my browser and the camera shows up normally, so it has to be something within HA, but I don’t know what it could be …

the IP for the camera , you can get it from the reolink app

Thanks. I’ve tried just the IP address and got the Unexpected Error. So I wondered if maybe it requires a more complex entry, perhaps including the user name and password.

in fact you need the user / password , but it has to be the password for the camera not for the reolink account.
I was looking forward to adding this camera to my dashboard , now I have to get a different brand .

I have only 1 Reolink integration installed from HACS , nothing else , I’ve tried all these day to get it connected into HA , but I still get the same error .
I love the camera though , it’s a shame that I can’t have it on my dashboard.

Any clue or idea how to fix this ?

I deleted/ re installed the integration
I changed the admin password

I don’t know what else to do .

Doesn’t work with Webrtc or onvif neither … I get the same error

Should I create a new Reolink account and add the camera into that account and start everything from scratch?

So annoying and frustrating … :sleepy::sleepy:

I re-read the statement of your problem and how you got here. While I don’t know what’s causing it, I can share the steps I took to setup reolink in just the last few weeks (I’ve had no trouble).

From the Reolink App:
Go to the Camera > settings cog > click on the camera > Network Info > IP address.

From your browser
Type the IP address into your computer browser
Username will be admin
Password will be whatever you setup when you installed the camera. This is for the camera not REOLINK.
Once your in, click the settings cog > network settings > advanced > port settings > make sure HHPS, RTSP, and ONVIF are on.
Click save > log out

From HACS:
Download Reolink IP Devices
Download Reolink Discovery
Reboot home assistant
If your camera is already hooked up, HA will indicate the new camera after startup

You MAY get a message from the integrations screen in HA that says “you need to log into the camera 1 time” or something to that effect. There will be a button either for credentials or login, when you submit, the devices and entities will appear in the REOLINK IP cameras page of integrations.

Did you do all this?

2 Likes

Try what @Sergeantpup said and maybe this might help:

Just make sure you also did the port settings step in the Reolink Client.

I didn’t download this , I will try to do that . And also check the ports , the thing with this duo Poe is , when I go to the ports section doesn’t say enable or disable any port , just says the ports number , that’s it . ( I will share screenshots)

Also I have 3 wifi networks in my house , and this camera isn’t in the same wifi network of my HA , o don’t think the camera will show up.

I’ll download everything you just mentioned and re do the whole process , and I’ll let you know if it works …

Thanks heaps , I’ll keep you posted

1 Like

hey mate , here’s a quick update , I did everything you mentioned above and unfortunately I still get the same error , even though the discover integrations found my studio camera which is the E1 pro , when I click configure I get also the same " unexpected error " please find attached photos for the config , port set up and error messages, also the logs .

Screen Shot 2022-10-24 at 1.02.47 pm





logs for the discovered camera ( its in the same HA’s network )

This error originated from a custom integration.

Logger: custom_components.reolink_rest.config_flow
Source: custom_components/reolink_rest/config_flow.py:204
Integration: Reolink IP Device (documentation, issues)
First occurred: 1:02:22 PM (2 occurrences)
Last logged: 1:04:59 PM

Unhanled exception occurred
Traceback (most recent call last):
File “/usr/local/lib/python3.10/site-packages/aiohttp/connector.py”, line 986, in _wrap_create_connection
return await self._loop.create_connection(*args, **kwargs) # type: ignore[return-value] # noqa
File “/usr/local/lib/python3.10/asyncio/base_events.py”, line 1064, in create_connection
raise exceptions[0]
File “/usr/local/lib/python3.10/asyncio/base_events.py”, line 1049, in create_connection
sock = await self._connect_sock(
File “/usr/local/lib/python3.10/asyncio/base_events.py”, line 960, in _connect_sock
await self.sock_connect(sock, address)
File “/usr/local/lib/python3.10/asyncio/selector_events.py”, line 500, in sock_connect
return await fut
File “/usr/local/lib/python3.10/asyncio/selector_events.py”, line 535, in _sock_connect_cb
raise OSError(err, f’Connect call failed {address}’)
ConnectionRefusedError: [Errno 111] Connect call failed (‘192.168.68.141’, 80)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File “/config/custom_components/reolink_rest/config_flow.py”, line 204, in async_step_user
if not await client.login(
File “/usr/local/lib/python3.10/site-packages/async_reolink/api/security/init.py”, line 71, in login
async for response in self._execute(
File “/usr/local/lib/python3.10/site-packages/async_reolink/rest/connection.py”, line 252, in __execute
response = await context
File “/usr/local/lib/python3.10/site-packages/aiohttp/client.py”, line 535, in _request
conn = await self._connector.connect(
File “/usr/local/lib/python3.10/site-packages/aiohttp/connector.py”, line 542, in connect
proto = await self._create_connection(req, traces, timeout)
File “/usr/local/lib/python3.10/site-packages/aiohttp/connector.py”, line 907, in _create_connection
_, proto = await self._create_direct_connection(req, traces, timeout)
File “/usr/local/lib/python3.10/site-packages/aiohttp/connector.py”, line 1206, in _create_direct_connection
raise last_exc
File “/usr/local/lib/python3.10/site-packages/aiohttp/connector.py”, line 1175, in _create_direct_connection
transp, proto = await self._wrap_create_connection(
File “/usr/local/lib/python3.10/site-packages/aiohttp/connector.py”, line 992, in _wrap_create_connection
raise client_error(req.connection_key, exc) from exc
aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host 192.168.68.141:80 ssl:default [Connect call failed (‘192.168.68.141’, 80)]

logs for camera from a different network

This error originated from a custom integration.

Logger: custom_components.reolink_dev.config_flow
Source: custom_components/reolink_dev/base.py:220
Integration: Reolink IP camera (documentation, issues)
First occurred: 12:59:19 PM (3 occurrences)
Last logged: 1:18:28 PM

Unexpected exception
Traceback (most recent call last):
File “/config/custom_components/reolink_dev/config_flow.py”, line 70, in async_step_user
self.info = await self.async_validate_input(self.hass, user_input)
File “/config/custom_components/reolink_dev/config_flow.py”, line 138, in async_validate_input
if not await self.base.connect_api():
File “/config/custom_components/reolink_dev/base.py”, line 220, in connect_api
if not await self._api.get_settings():
File “/usr/local/lib/python3.10/site-packages/reolink/camera_api.py”, line 496, in get_settings
response = await self.send(body)
File “/usr/local/lib/python3.10/site-packages/reolink/camera_api.py”, line 1661, in send
if not await self.login():
File “/usr/local/lib/python3.10/site-packages/reolink/camera_api.py”, line 854, in login
response = await self.send(body, param)
File “/usr/local/lib/python3.10/site-packages/reolink/camera_api.py”, line 1723, in send
raise ApiError(
reolink.exceptions.ApiError: API returned HTTP status ERROR code 404/Not Found

I can confirm from your screenshots that you’re configured correctly…and its obviously still not working.

I’d suggest opening an issue in the repository. The dev is responsive.

thanks for you quick response mate , how do I open an issue there ?
sorry I’m still new in this…

thanks heaps

You know what they say…teach a person to fish…and I’m happy to do so

From HACS, Go to the Reolink IP Devices page >3 dots > Repository

It will bring you to the repository. Click Issues, look for any issues that sound like yours (there’s only a few).

If you don’t see a similar issue, click New Issue and provide your error stuff just like you provided here. Verification shots that you’re set up correctly may help too.

With this knowledge, you can investigate issues and report defects for apps you’ve downloaded from HACS forever :slight_smile: (It’s the same process for all of them).

1 Like

Are the cameras in a different subnet (ip) then home assistant? I never managed to get that to work maybe you are facing the same problem.

There is also a recent integration which supports Reolink devices, i don’t know if you tried that one. I haven’t tried it yet but maybe it fixes your issue or maybe it has a better support to fix your problem.

NOTE: Because you’ve already installed reolink_dev you need to read the README thoroughly to move to this package. :slight_smile:

If you tried the package i would like to here what the result is :smiley: .

Thanks mate. I did that yesterday, I hope I get the cameras to show up in my dashboard someday .
There’s 1 comment below that says “ the issue might be that the camera is in a diferente Ip network of my HA instance” I have 3 wifi mesh in my house , and indeed the camera is wired to a different network.

I thought the camera didn’t need to be in the same network as HA , am I wrong ?

Cheers

Hey mate , thanks for your comment , indeed the camera is in a different network , I currently have 3 wifi networks mesh at home , and the cameras aren’t in the same network as my HA . Could that affect the set up ?

I thought I could just add them with the IP address

About the add on , my camera is not being used with an NVR , it’s a duo POE .

Would that add on work with my camera ?

Thanks heaps bud :pray:t2:

Could that affect the set up ?

Yes, it could but it shouldn’t. And i’ve been reading your previous comments and you already tried opening the ip address in your browser and that seems ok so that wouldn’t be a problem, i think.

About the add on , my camera is not being used with an NVR , it’s a duo POE .

Cool. I’m not using a NVR either. I’m using a Reolink RLC-822A (POE as well). :slight_smile: I had to set a lower resolution to make the stream work well in home assistant because of H.265 but that’s a different issue.

Would that add on work with my camera ?

If i look at the support list on the other add-on then it should. (see the bottom of README.md)

Other options

Well when i had a lot of problems connecting to my camera i also tried the options below.

  • Add a rtsp url to your configuration and check if the stream will work via a configuration setting.
  • Try to simplify the password of your user (this fixed “a” problem for me) don’t use @, # or : characters maybe try to keep it simple and not too long.

I only have one massively overly complicated network with a dozen APs so I can’t tell you one way or another if that’s an issue.