Platform error: camera - Requirements for ezviz not found: ['pyezviz==0.1.5']

Hi,

Did you change “E12345678” to match you camera serial number? Also make sure that you don’t have Two-Step verification turned on in you ezviz account.

Cheers

You need the following in your config:

stream:
ffmpeg:
camera:
  - platform: ha-ezviz
    username: [email protected]
    password: xxx
    cameras:
      Exxxxxxxx:
        username: admin
        password: xxxx

Two-Step verification was the issue for not creating the entity.
But now I have another issue.

When I saw the entity in HA, the camera seemed to be offline in ezviz app.
After restarting everything, now I see the camera in ezviz app but nothing in HA.

I cant have both HA and ezviz app at the same time?
thanks…

Hi Tuan_Tran,

2 Likes

Mx - I am getting the same error as you are disabled 2FA. Any ideas? It’s a C6CN
Logger: homeassistant.components.camera
Source: deps/lib/python3.8/site-packages/pyezviz/client.py:87
First occurred: 2:54:47 PM (1 occurrences)
Last logged: 2:54:47 PM

Error while setting up ha-ezviz platform for camera

Traceback (most recent call last): File “/usr/local/lib/python3.8/dist-packages/homeassistant/helpers/entity_platform.py”, line 199, in _async_setup_platform await asyncio.shield(task) File “/usr/lib/python3.8/concurrent/futures/thread.py”, line 57, in run result = self.fn(*self.args, **self.kwargs) File “/home/hass/.homeassistant/custom_components/ha-ezviz/camera.py”, line 104, in setup_platform ezviz_client.login() File “/home/hass/.homeassistant/deps/lib/python3.8/site-packages/pyezviz/client.py”, line 301, in login self._login() File “/home/hass/.homeassistant/deps/lib/python3.8/site-packages/pyezviz/client.py”, line 87, in _login self._csrfToken = self._session.cookies[‘AS_SessionID’] File “/usr/local/lib/python3.8/dist-packages/requests/cookies.py”, line 328, in getitem return self._find_no_duplicates(name) File “/usr/local/lib/python3.8/dist-packages/requests/cookies.py”, line 394, in _find_no_duplicates raise CookieConflictError(‘There are multiple cookies with name, %r’ % (name)) requests.cookies.CookieConflictError: There are multiple cookies with name, ‘AS_SessionID’

it doesn’t auto play like ffmpeg platform right?

If you’re in the US, you need to include region: ‘us’ since the default region is ‘eu’.

Thanks, I am in the UK. I got the main integration working by turning off 2FA but I still have the problem of it failing to start if I enable stream: in my config

Ok, had the “Tinkerer” solve this in the discord chat. Here’s the new/proper config yaml:

stream:
ffmpeg:
camera:

ezviz_cloud:
  cameras:
    D6666660:
      username: admin
      password: Password_from_camera_sticker.
    D666678:
      username: admin
      password: Password_from_camera_sticker.
    D66666648:
      username: admin
      password: Password_from_camera_sticker.

1 Like

I’ve not used this integration before but since I’ve got an ezviz camera thought I’d give it a go.

I installed via HACS the integration, succesffully logged in via it and put this in my configuration.yaml:

stream:
ffmpeg:
camera:
ezviz_cloud:
  cameras:
    E56407679:
      username: admin
      password: verification code on bottom of camera

I recieve a login error, even though my credentials are fine. I don’t have 2FA installed.

Logger: homeassistant.config_entries
Source: custom_components/ezviz_cloud/__init__.py:142
First occurred: 9:06:48 PM (1 occurrences)
Last logged: 9:06:48 PM

Error setting up entry [email protected] for ezviz_cloud
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 236, in async_setup
    result = await component.async_setup_entry(hass, self)  # type: ignore
  File "/config/custom_components/ezviz_cloud/__init__.py", line 79, in async_setup_entry
    ezviz_client = await hass.async_add_executor_job(
  File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/ezviz_cloud/__init__.py", line 142, in _get_ezviz_client_instance
    ezviz_client.login()
  File "/usr/local/lib/python3.8/site-packages/pyezviz/client.py", line 301, in login
    self._login()
  File "/usr/local/lib/python3.8/site-packages/pyezviz/client.py", line 72, in _login
    raise PyEzvizError("Incorrect login details")
pyezviz.client.PyEzvizError: Incorrect login details

I was wondering whether anyone had any clues?

Edit, please disregard, I had used an incorrect email address on my HACS integration.

Did you install it through the front end integration? Looks like maybe your log in details might not be correct?

Ah I was bloody stupid, too many email addresses and one too many rum and cokes, I inputted incorrectly one of my email addresses so indeed my credentials were incorrect. What a fool.

But now I’ve corrected these, in my logs I’m getting a login failed due to captcha required:

Logger: homeassistant.config_entries
Source: custom_components/ezviz_cloud/__init__.py:142
First occurred: 10:04:42 PM (1 occurrences)
Last logged: 10:04:42 PM

Error setting up entry [email protected] for ezviz_cloud
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 236, in async_setup
    result = await component.async_setup_entry(hass, self)  # type: ignore
  File "/config/custom_components/ezviz_cloud/__init__.py", line 79, in async_setup_entry
    ezviz_client = await hass.async_add_executor_job(
  File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/ezviz_cloud/__init__.py", line 142, in _get_ezviz_client_instance
    ezviz_client.login()
  File "/usr/local/lib/python3.8/site-packages/pyezviz/client.py", line 301, in login
    self._login()
  File "/usr/local/lib/python3.8/site-packages/pyezviz/client.py", line 76, in _login
    raise PyEzvizError("Login error: Captcha required")
pyezviz.client.PyEzvizError: Login error: Captcha required

I installed my camera using the ezviz app from google play store on my android cell phone. Then I was able to use the log in credentials from there and avoided any web pages.

Hmm, the camera is already installed and running via my ios app. I added it to hassio by using your suggested config.yaml and the integration via HACS. I’ll have a dig about and see if i can login via their cloud page and authenticate the captcha that way.

So this seems to have solved itself, I reinstalled the integration and it still had the same error. I left it and came back to it this morning and still had the same issue, but just checked again and it’s working fine.

For posterity and anyone seeking help, my camera is a CTQ6C Ezviz camera. I’ve installed the ezviz cloud integration via HACS and used the email/password for the app.

Here’s my configuration.yaml entry for anyone who might google and come here:

stream:
ffmpeg:
camera:
ezviz_cloud:
  cameras:
    E56407678:
      username: admin
      password: verification code from under camera

The picture can be viewed in lovelace by adding a picture entity card and selecting your camera feed. This can then also be used in the homekit integration.

I still have an error in my logs, but everything is working correctly. Here’s my error:

Logger: homeassistant.config_entries
Source: helpers/entity_component.py:155
First occurred: 11:20:29 AM (11 occurrences)
Last logged: 3:36:30 PM

Error setting up entry [email protected] for camera
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 236, in async_setup
    result = await component.async_setup_entry(hass, self)  # type: ignore
  File "/usr/src/homeassistant/homeassistant/components/camera/__init__.py", line 319, in async_setup_entry
    return await hass.data[DOMAIN].async_setup_entry(entry)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 155, in async_setup_entry
    raise ValueError("Config entry has already been setup!")
ValueError: Config entry has already been setup!

Thanks this helped me set it up.

Thanks a lot for the HAC integraion!

I get the same ValueError but it seems to work.
However, could someone please tell me how I can store the local IP of the cam in the config file so that the URL is complete?
Currently I get the following error message in the log file because of the missing IP address:

2021-01-06 12:18:06 ERROR (stream_worker) [libav.tcp] Connection to tcp://:554?timeout=5000000 failed: Connection refused
2021-01-06 12:18:06 ERROR (stream_worker) [homeassistant.components.stream.worker] Error opening stream rtsp://admin:******@:554

My config file looks like this:

stream:
ffmpeg:
camera:
ezviz_cloud:
  cameras:
    D********:
      username: admin
      password: ******

I followed the instruction on the Renier repo… everything works correctly but this is the error I got in the logs:

File "/usr/src/homeassistant/homeassistant/config_entries.py", line 236, in async_setup
    result = await component.async_setup_entry(hass, self)  # type: ignore
  File "/config/custom_components/ezviz_cloud/__init__.py", line 79, in async_setup_entry
    ezviz_client = await hass.async_add_executor_job(
  File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/ezviz_cloud/__init__.py", line 142, in _get_ezviz_client_instance
    ezviz_client.login()
  File "/usr/local/lib/python3.8/site-packages/pyezviz/client.py", line 301, in login
    self._login()
  File "/usr/local/lib/python3.8/site-packages/pyezviz/client.py", line 76, in _login
    raise PyEzvizError("Login error: Captcha required")
pyezviz.client.PyEzvizError: Login error: Captcha required

Any solutions?
Thanks

Dear RenierM i confirm you that the integration is working OK for me here, i’m using a CTQ6C camera. I had to understand the correct way to install it, which is:
Step 1: install the integration from HACS, adding your Github repository
Step 2: from the config/integration menu, add the integration called Ezviz Cloud and put username, password and geografic area for Ezviz cloud connection
Step 3: Add the lines in the configuration.yaml

I tested the services and i can confirm you that PTZ, PRIVACY, LED, INFRARED work correctly, also the standard service camera.disable_motion_detection is working OK.
The video from the camera has a big delay, i think this is due to the cloud connection.

The main issue now is, there is no motion sensor from the camera tracked in home assistant.
I realized one by tracking the changement of the attribute “Last alarm triggered”, but this is not optimal.

Do you plan to add the motion sensor in your integration, this will be perfect!

Enrico

1 Like

Actually I found the solution by myself… just logout and re-login in the mobile app and now everything is working correctly!
Thanks a lot to RenierM !

1 Like