Giter Club home page Giter Club logo

ha-ezviz's People

Contributors

alexmigf avatar dependabot[bot] avatar dubhad avatar dx44 avatar renierm26 avatar uvjim avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

ha-ezviz's Issues

Hassio - Ezviz integration 3.8

Hi Guys, I have installed EZVIZ integration via HACS and followed example from Repo:

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.

Above did not result in any cameras being added.
I went further and amended the yaml to include credentials:

ezviz_cloud:
  username: "[email protected]"
  password: "password"
  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.

it still does not generate any cameras...
I am not subscribed to cloudplay service, does that matter?

Error while setting up ezviz_cloud platform for camera

Suddendly I lost the video entity from hassio. I investigated a bit and found this error. If I manually edit the camera.py file and make the variables with the camera username and password static it works. I tried reinstalling the integration and do everything from the start but same thing happens. Any ideas?

Error while setting up ezviz_cloud platform for camera Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 200, in _async_setup_platform await asyncio.shield(task) File "/config/custom_components/ezviz_cloud/camera.py", line 123, in async_setup_entry camera_username = conf_cameras.data[CONF_USERNAME] KeyError: 'username'

Services - Privacy mode

When first starting to use the Ezviz integration there was other services that seems to later have been removed. One of those is the option to set the camera in privacy mode i.e. when at home. Could this be added back in, or am I missing something?

Incorrect Captha Code error - v 0.0.4.4

Hi, i'm using this integration to use my new Ezviz C6N but not working.
I've this setup:
Installed via HACS v0.0.4.4
HA supervisor-2021.03.04
HA core-2021.3.2

setup camera.yaml

camera:
    username: EMAIL
    password: PASSWORD_EZVIZ
    cameras:
      N_CAMERA:
        username: admim
        password: PASSWORD_CAMERA

I've this error:

2021-03-06 12:57:03 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry EMAIL for ezviz_cloud Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 248, in async_setup result = await component.async_setup_entry(hass, self) # type: ignore File "/config/custom_components/ezviz_cloud/__init__.py", line 56, 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 119, in _get_ezviz_client_instance ezviz_client.login() File "/usr/local/lib/python3.8/site-packages/pyezviz/client.py", line 480, in login self._login() File "/usr/local/lib/python3.8/site-packages/pyezviz/client.py", line 90, in _login raise PyEzvizError("Login error: Incorrect Captcha code") pyezviz.client.PyEzvizError: Login error: Incorrect Captcha code 2021-03-06 12:57:03 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry EZVIZ_USERNAME for ezviz_cloud Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 248, in async_setup result = await component.async_setup_entry(hass, self) # type: ignore File "/config/custom_components/ezviz_cloud/__init__.py", line 56, 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 119, in _get_ezviz_client_instance ezviz_client.login() File "/usr/local/lib/python3.8/site-packages/pyezviz/client.py", line 480, in login self._login() File "/usr/local/lib/python3.8/site-packages/pyezviz/client.py", line 90, in _login raise PyEzvizError("Login error: Incorrect Captcha code")

How can i solve?
Thank you
Luigi

Password in plaintext on config/.storage/core.config_entries

I don't recall this behaviour from previous versions (~0.3). I just noticed that with the new auto-discovery, the plaintext password is now stored on config/.storage/core.config_entries. This is not ideal, since one typical process is to store everything under config in a GitHub repo (except some files like secrets.yaml).

Is it possible to revert to the previous behaviour?

Error on Setup of Cam

Just updated to 0.0.2.5 and still getting an error. I'm unsure whether my configuration is correct, but I'm following the instructionss:

ezviz_cloud:
  cameras:
    E81680149:
      username: admin
      password: !secret ezviz_cam1_code

But I receive a series of errors reported in Configuration > Logs

Logger: homeassistant.config_entries
Source: custom_components/ezviz_cloud/init.py:146
First occurred: 10:02:06 AM (1 occurrences)
Last logged: 10:02:06 AM

[...]

During handling of the above exception, another exception occurred:

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 91, 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 146, in _get_ezviz_client_instance
ezviz_client.login()
File "/usr/local/lib/python3.8/site-packages/pyezviz/client.py", line 308, in login
self._login()
File "/usr/local/lib/python3.8/site-packages/pyezviz/client.py", line 88, in _login
raise PyEzvizError("Can not login to API")
pyezviz.client.PyEzvizError: Can not login to API

Is there any method to separately verify my credentials for the API?

Could not set the switch, maybe a permission issue ?: Got %s : %s)', '200', '{"resultCode":"-1"}

Hello RenierM26,
So first of all, I thank you very much for your code which has enable to have more control on my CTQ6C cam into Home Assistant.
All the commands seem to work except the 2 first icon"switch.set" (linked with the alarm I imagine) with the following error :

Could not set the switch, maybe a permission issue ?: Got %s : %s)', '200', '{"resultCode":"-1"}

Do you know how can I solve this problem ?
I thank you in advance for your help !

Invalid authentication

Hi,
everyhting worked fine until yesterday (or at least yesterday I noticed this), then some entities of my cameras where not available anymore (last alarm pic, last triggered and son on)

I decided to clean everything: delete integration, delete repository on hacks, restart hassio and then start again

now when i tried to insert credential i get error: Invalid authentication

iz

Broken Entities DB1C

Several entities don't work: these all show a value of unknown
sensor.db1c_seconds_last_trigger
sensor.db1c_last_alarm_pic
sensor.db1c_detection_sensibility
sensor.db1c_last_alarm_pic
sensor.db1c_last_alarm_time

Switch CAMERA.SLEEP ON is ok but broke connection

Hello the switch camera.sleep work when the camera is on and when I want to turn in sleep mode.

But in this case all the switch and the sensor of all cameras become indisponible.

And I can't turn this switch off, because this switch and over all is indisponible.

For information the service : ezviz_cloud.ezviz_wake_device doesn't work.

Anyone have a same problem?

Sorry for my bad english.

timePlanInfos error while setting the ezviz_cloud platform

I started to receive the below error after upgrade to the latest version (earlier using couple of months old one). Interesting is that it pops up even if i do not configure any camera (only the main user account). I have one camera with notification schedule configured (if this is related), however disabling the schedule does not help here.

Unexpected error fetching ezviz_cloud data: 'NoneType' object is not subscriptable
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 151, in async_refresh
    self.data = await self._async_update_data()
  File "/config/custom_components/ezviz_cloud/coordinator.py", line 36, in _async_update_data
    return await self.hass.async_add_executor_job(self._update_data)
  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/coordinator.py", line 28, in _update_data
    cameras = self.ezviz_client.load_cameras()
  File "/usr/local/lib/python3.8/site-packages/pyezviz/client.py", line 366, in load_cameras
    cameras.append(camera.status())
  File "/usr/local/lib/python3.8/site-packages/pyezviz/camera.py", line 140, in status
    self._device.get("timePlanInfos")[1].get("enable")
TypeError: 'NoneType' object is not subscriptable

Any ideas what may be the issue?

Camera Unavailable

The integration is no longer working. I am seeing the following error and unable to connect to the camera:

Logger: custom_components.ezviz_cloud.coordinator
Source: custom_components/ezviz_cloud/coordinator.py:31
Integration: Ezviz Cloud (documentation)
First occurred: 11:24:08 (3 occurrences)
Last logged: 11:24:26

Unexpected error fetching ezviz_cloud data: 32
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 144, in async_refresh
    self.data = await self._async_update_data()
  File "/config/custom_components/ezviz_cloud/coordinator.py", line 39, in _async_update_data
    return await self.hass.async_add_executor_job(self._update_data)
  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/coordinator.py", line 31, in _update_data
    cameras = self.EzvizClient.load_cameras()
  File "/usr/local/lib/python3.8/site-packages/pyezviz/client.py", line 266, in load_cameras
    camera.load()
  File "/usr/local/lib/python3.8/site-packages/pyezviz/camera.py", line 34, in load
    if self._switch[DeviceSwitchType.AUTO_SLEEP.value] != True:
KeyError: 32

My account doesn't have MFA, in my configuration.YAML I have the following:

ezviz_cloud:
  username: prefix@domain
  password: Password
  cameras:
    243798428:
      username: admin
      password: PWD

Any ideas?
Thanks

Doorbell integration

Hi, Just wondering if this integration also recognizes the doorbell of my DB1. Thanks for doing this. Have been waiting a long time!

Unexpected error fetching ezviz_cloud data: Could not access Ezviz' API: HTTPSConnectionPool(host='ieu.ezvizlife.com', port=443)

Hi !

New user on HomeAssistant, I tried your integration about 10 days ago using 0.0.2.X versions, with no luck.
So I used version 0.0.1.6 (previous code before complete rework I guess), and it was working.
Today, I tried your new version 0.0.2.7, hoping that I would manage to make it work, but still the same issues.

What I did (the "standard" user test ;-) - maybe it could help you) :

  • updated my 0.0.1.6 config to align with 0.0.2.7 requirements
  • installed the ezviz-cloud using hacs / checked that custom_compenents was updated with a new ezviz_cloud folder)
  • added integration and set login / password
  • restarted the server

Here are the errors/warnings in the log.

Warning (MainThread) [homeassistant.config_entries] Config entry for ezviz_cloud not ready yet. Retrying in 5 seconds

Logger: custom_components.ezviz_cloud.coordinator
Source: custom_components/ezviz_cloud/coordinator.py:31
Integration: Ezviz (documentation)
First occurred: 12:48:33 (43 occurrences)
Last logged: 13:52:13

Unexpected error fetching ezviz_cloud data: Could not access Ezviz' API: HTTPSConnectionPool(host='ieu.ezvizlife.com', port=443): Read timed out. (read timeout=15)
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 445, in _make_request
six.raise_from(e, None)
File "", line 3, in raise_from
File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 440, in _make_request
httplib_response = conn.getresponse()
File "/usr/local/lib/python3.8/http/client.py", line 1347, in getresponse
response.begin()
File "/usr/local/lib/python3.8/http/client.py", line 307, in begin
version, status, reason = self._read_status()
File "/usr/local/lib/python3.8/http/client.py", line 268, in _read_status
line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
File "/usr/local/lib/python3.8/socket.py", line 669, in readinto
return self._sock.recv_into(b)
File "/usr/local/lib/python3.8/ssl.py", line 1241, in recv_into
return self.read(nbytes, buffer)
File "/usr/local/lib/python3.8/ssl.py", line 1099, in read
return self._sslobj.read(len, buffer)
socket.timeout: The read operation timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/requests/adapters.py", line 439, in send
resp = conn.urlopen(
File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 755, in urlopen
retries = retries.increment(
File "/usr/local/lib/python3.8/site-packages/urllib3/util/retry.py", line 531, in increment
raise six.reraise(type(error), error, _stacktrace)
File "/usr/local/lib/python3.8/site-packages/urllib3/packages/six.py", line 735, in reraise
raise value
File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 699, in urlopen
httplib_response = self._make_request(
File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 447, in _make_request
self._raise_timeout(err=e, url=url, timeout_value=read_timeout)
File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 336, in _raise_timeout
raise ReadTimeoutError(
urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='ieu.ezvizlife.com', port=443): Read timed out. (read timeout=15)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/pyezviz/client.py", line 442, in get_detection_sensibility
req = self._session.post("https://" + self._API_DOMAIN + API_BASE_TLD + API_ENDPOINT_DETECTION_SENSIBILITY_GET,
File "/usr/local/lib/python3.8/site-packages/requests/sessions.py", line 590, in post
return self.request('POST', url, data=data, json=json, **kwargs)
File "/usr/local/lib/python3.8/site-packages/requests/sessions.py", line 542, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python3.8/site-packages/requests/sessions.py", line 655, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python3.8/site-packages/requests/adapters.py", line 529, in send
raise ReadTimeout(e, request=request)
requests.exceptions.ReadTimeout: HTTPSConnectionPool(host='ieu.ezvizlife.com', port=443): Read timed out. (read timeout=15)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 144, in async_refresh
self.data = await self._async_update_data()
File "/config/custom_components/ezviz_cloud/coordinator.py", line 39, in _async_update_data
return await self.hass.async_add_executor_job(self._update_data)
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/coordinator.py", line 31, in _update_data
cameras = self.EzvizClient.load_cameras()
File "/usr/local/lib/python3.8/site-packages/pyezviz/client.py", line 270, in load_cameras
camera.load()
File "/usr/local/lib/python3.8/site-packages/pyezviz/camera.py", line 36, in load
self._detection_sensibility = self._client.get_detection_sensibility(self._serial, self._device['supportExt']['support_sensibility_adjust'])
File "/usr/local/lib/python3.8/site-packages/pyezviz/client.py", line 448, in get_detection_sensibility
raise PyEzvizError("Could not access Ezviz' API: " + str(e))
pyezviz.client.PyEzvizError: Could not access Ezviz' API: HTTPSConnectionPool(host='ieu.ezvizlife.com', port=443): Read timed out. (read timeout=15)

and the configuration.yaml :
stream:
ffmpeg:
camera:

ezviz_cloud:
cameras:
CAMERAID:
username: admin
password: PASSWORD
CAMERAID:
username: admin
password: PASSWORD

Maybe I missed something, and if so, please excuse me.

PS : i tried to manually connect to ieu.ezvizlife.com with Internet Explorer, and it's ok (while redirected to https://euauth.ezvizlife.com/)

Component seems broken after upgrade to 0.0.3.2

After upgrade to 0.0.3.2 and restart I'm no more able to see the video stream and I got several errors in the log

Logger: homeassistant.config_entries
Source: custom_components/ezviz_cloud/init.py:149
First occurred: 9:15:33 PM (1 occurrences)
Last logged: 9:15:33 PM

Error setting up entry xxxxxx for ezviz_cloud
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/urllib3/connection.py", line 169, in _new_conn
conn = connection.create_connection(
File "/usr/local/lib/python3.8/site-packages/urllib3/util/connection.py", line 73, in create_connection
for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
File "/usr/local/lib/python3.8/socket.py", line 918, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -3] Try again

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 699, in urlopen
httplib_response = self._make_request(
File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 382, in _make_request
self._validate_conn(conn)
File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 1010, in _validate_conn
conn.connect()
File "/usr/local/lib/python3.8/site-packages/urllib3/connection.py", line 353, in connect
conn = self._new_conn()
File "/usr/local/lib/python3.8/site-packages/urllib3/connection.py", line 181, in _new_conn
raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0xa8934760>: Failed to establish a new connection: [Errno -3] Try again

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/requests/adapters.py", line 439, in send
resp = conn.urlopen(
File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 755, in urlopen
retries = retries.increment(
File "/usr/local/lib/python3.8/site-packages/urllib3/util/retry.py", line 573, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='euauth.ezvizlife.com', port=443): Max retries exceeded with url: /doLogin (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0xa8934760>: Failed to establish a new connection: [Errno -3] Try again'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/pyezviz/client.py", line 74, in _login
req = self._session.post(
File "/usr/local/lib/python3.8/site-packages/requests/sessions.py", line 590, in post
return self.request('POST', url, data=data, json=json, **kwargs)
File "/usr/local/lib/python3.8/site-packages/requests/sessions.py", line 542, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python3.8/site-packages/requests/sessions.py", line 655, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python3.8/site-packages/requests/adapters.py", line 516, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='euauth.ezvizlife.com', port=443): Max retries exceeded with url: /doLogin (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0xa8934760>: Failed to establish a new connection: [Errno -3] Try again'))

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

Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 239, in async_setup
result = await component.async_setup_entry(hass, self) # type: ignore
File "/config/custom_components/ezviz_cloud/init.py", line 91, 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 149, in _get_ezviz_client_instance
ezviz_client.login()
File "/usr/local/lib/python3.8/site-packages/pyezviz/client.py", line 480, in login
self._login()
File "/usr/local/lib/python3.8/site-packages/pyezviz/client.py", line 104, in _login
raise PyEzvizError("Can not login to API") from err
pyezviz.client.PyEzvizError: Can not login to API

Config success even login is error

I try to put the wrong username and password but the configuration can be finished. I try to fig the code but I'm not good with has flow and Python

C3A (and possibly other battery cams) require to be waked up

After a lot of struggle, I managed to configure a C3A camera. To be able to open the RTSP (554) port, you first have to wake it up. I Discovered this at first using the ezvizlife.com service and the realized you have a service call to do that.

Is it possible to auto wake-up the cam on Play?

How to use the integration ?

Hi,

Can you show us some samples of using this integration ? I have a C6N but I'm lost to integrate my camera in home assistant and what it's possible to do with.

Regards

Where do I submit my cloud username and password with ver 0.0.3.3

I have installed ezviz_cloud (ver 0.0.3.3) using HACS and restarted the server. I was expecting to have to enter my username and password as part of the setup. I haven't, and the example config.yaml doesn't suggest it's entered there, only the camera username (admin) and password from the label.
How do I enter my cloud credentials?
Thanks

_get_pagelist: EzvizError("Can't gather proper data. Max retries exceeded.")

After upgrading to 0.0.2.9, the integration seems to have stopped working. I get the following error message in my log every 90 seconds:

2021-02-11 12:24:45 ERROR (MainThread) [custom_components.ezviz_cloud.coordinator] Unexpected error fetching ezviz_cloud data: Can't gather proper data. Max retries exceeded.
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 149, in async_refresh
    self.data = await self._async_update_data()
  File "/config/custom_components/ezviz_cloud/coordinator.py", line 39, in _async_update_data
    return await self.hass.async_add_executor_job(self._update_data)
  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/coordinator.py", line 31, in _update_data
    cameras = self.ezviz_client.load_cameras()
  File "/usr/local/lib/python3.8/site-packages/pyezviz/client.py", line 325, in load_cameras
    devices = self.get_all_device_infos()
  File "/usr/local/lib/python3.8/site-packages/pyezviz/client.py", line 364, in get_all_device_infos
    devices = self.get_page_list()
  File "/usr/local/lib/python3.8/site-packages/pyezviz/client.py", line 794, in get_page_list
    return self._get_pagelist(
  File "/usr/local/lib/python3.8/site-packages/pyezviz/client.py", line 136, in _get_pagelist
    return self._get_pagelist(page_filter, json_key, max_retries + 1)
  File "/usr/local/lib/python3.8/site-packages/pyezviz/client.py", line 136, in _get_pagelist
    return self._get_pagelist(page_filter, json_key, max_retries + 1)
  File "/usr/local/lib/python3.8/site-packages/pyezviz/client.py", line 136, in _get_pagelist
    return self._get_pagelist(page_filter, json_key, max_retries + 1)
  [Previous line repeated 1 more time]
  File "/usr/local/lib/python3.8/site-packages/pyezviz/client.py", line 117, in _get_pagelist
    raise PyEzvizError("Can't gather proper data. Max retries exceeded.")
pyezviz.client.PyEzvizError: Can't gather proper data. Max retries exceeded

I have three cameras registered. Two C3WN at home, and one C6N that currently is offline (remote camera in my summer cottage), and I don't know if that is what is causing the problem...?

Running Home-Assistant core-2021.2.2 and supervisor-2021.02.6

Unexpected error fetching ezviz_cloud data: Can't gather proper data. Max retries exceeded.

021-03-04 18:14:56 ERROR (MainThread) [custom_components.ezviz_cloud.coordinator] Unexpected error fetching ezviz_cloud data: Can't gather proper data. Max retries exceeded.
Traceback (most recent call last):
File "/data/data/com.termux/files/usr/lib/python3.8/site-packages/homeassistant/helpers/update_coordinator.py", line 144, in async_refresh
self.data = await self._async_update_data()
File "/data/data/com.termux/files/home/.homeassistant/custom_components/ezviz_cloud/coordinator.py", line 39, in _async_update_data
return await self.hass.async_add_executor_job(self._update_data)
File "/data/data/com.termux/files/usr/lib/python3.8/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/data/data/com.termux/files/home/.homeassistant/custom_components/ezviz_cloud/coordinator.py", line 31, in _update_data
cameras = self.ezviz_client.load_cameras()
File "/data/data/com.termux/files/home/.homeassistant/deps/lib/python3.8/site-packages/pyezviz/client.py", line 320, in load_cameras
devices = self._get_all_device_infos()
File "/data/data/com.termux/files/home/.homeassistant/deps/lib/python3.8/site-packages/pyezviz/client.py", line 359, in _get_all_device_infos
devices = self._get_page_list()
File "/data/data/com.termux/files/home/.homeassistant/deps/lib/python3.8/site-packages/pyezviz/client.py", line 778, in _get_page_list
return self._api_get_pagelist(
File "/data/data/com.termux/files/home/.homeassistant/deps/lib/python3.8/site-packages/pyezviz/client.py", line 136, in _api_get_pagelist
return self._api_get_pagelist(page_filter, json_key, max_retries + 1)
File "/data/data/com.termux/files/home/.homeassistant/deps/lib/python3.8/site-packages/pyezviz/client.py", line 136, in _api_get_pagelist
return self._api_get_pagelist(page_filter, json_key, max_retries + 1)
File "/data/data/com.termux/files/home/.homeassistant/deps/lib/python3.8/site-packages/pyezviz/client.py", line 136, in _api_get_pagelist
return self._api_get_pagelist(page_filter, json_key, max_retries + 1)
[Previous line repeated 1 more time]
File "/data/data/com.termux/files/home/.homeassistant/deps/lib/python3.8/site-packages/pyezviz/client.py", line 117, in _api_get_pagelist
raise PyEzvizError("Can't gather proper data. Max retries exceeded.")
pyezviz.client.PyEzvizError: Can't gather proper data. Max retries exceeded.

some hints as to where I went wrong?

ezviz light and socket integrations

Good morning. Would it be possible to include lights and sockets in the ezviz integrations as well? If so, how? or should I wait for any updates? Help me. Thanks

varius error

Hi
I have tried various ways but I cannot connect the webcam model C6N. These are the errors that are put in HA

Logger: custom_components.ezviz_cloud.coordinator
Source: helpers/update_coordinator.py:173
Integration: Ezviz (documentation)
First occurred: 20 marzo 2021, 20:04:46 (42 occurrences)
Last logged: 20 marzo 2021, 20:58:33

Error fetching ezviz_cloud data: Invalid response from API: Can't gather proper data. Max retries exceeded.

and

Logger: homeassistant.config_entries
Source: custom_components/ezviz_cloud/init.py:135
First occurred: 20 marzo 2021, 20:59:58 (1 occurrences)
Last logged: 20 marzo 2021, 20:59:58

Error setting up entry [email protected] for ezviz_cloud
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/urllib3/connection.py", line 169, in _new_conn
conn = connection.create_connection(
File "/usr/local/lib/python3.8/site-packages/urllib3/util/connection.py", line 73, in create_connection
for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
File "/usr/local/lib/python3.8/socket.py", line 918, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -3] Try again

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 699, in urlopen
httplib_response = self._make_request(
File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 382, in _make_request
self._validate_conn(conn)
File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 1010, in _validate_conn
conn.connect()
File "/usr/local/lib/python3.8/site-packages/urllib3/connection.py", line 353, in connect
conn = self._new_conn()
File "/usr/local/lib/python3.8/site-packages/urllib3/connection.py", line 181, in _new_conn
raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x7f5f382715e0>: Failed to establish a new connection: [Errno -3] Try again

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/requests/adapters.py", line 439, in send
resp = conn.urlopen(
File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 755, in urlopen
retries = retries.increment(
File "/usr/local/lib/python3.8/site-packages/urllib3/util/retry.py", line 573, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='euauth.ezvizlife.com', port=443): Max retries exceeded with url: /doLogin (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f5f382715e0>: Failed to establish a new connection: [Errno -3] Try again'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 248, in async_setup
result = await component.async_setup_entry(hass, self) # type: ignore
File "/config/custom_components/ezviz_cloud/init.py", line 73, 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 135, in _get_ezviz_client_instance
ezviz_client.login()
File "/usr/local/lib/python3.8/site-packages/pyezviz/client.py", line 536, in login
self._login()
File "/usr/local/lib/python3.8/site-packages/pyezviz/client.py", line 74, in _login
req = self._session.post(
File "/usr/local/lib/python3.8/site-packages/requests/sessions.py", line 590, in post
return self.request('POST', url, data=data, json=json, **kwargs)
File "/usr/local/lib/python3.8/site-packages/requests/sessions.py", line 542, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python3.8/site-packages/requests/sessions.py", line 655, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python3.8/site-packages/requests/adapters.py", line 516, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='euauth.ezvizlife.com', port=443): Max retries exceeded with url: /doLogin (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f5f382715e0>: Failed to establish a new connection: [Errno -3] Try again'))

Not working after updating 0.0.3.5

Good afternoon, after updating to version 0.0.3.5, it stopped working. Gives an error message:
Logger: homeassistant.config_entries
Source: custom_components/ezviz_cloud/init.py:149
First occurred: 15:34:56 (1 occurrences)
Last logged: 15:34:56

Error setting up entry indoo*****@gmail.com for ezviz_cloud
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 239, in async_setup
result = await component.async_setup_entry(hass, self) # type: ignore
File "/config/custom_components/ezviz_cloud/init.py", line 91, 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 149, in _get_ezviz_client_instance
ezviz_client.login()
File "/usr/local/lib/python3.8/site-packages/pyezviz/client.py", line 480, in login
self._login()
File "/usr/local/lib/python3.8/site-packages/pyezviz/client.py", line 81, in _login
json_result = req.json()
File "/usr/local/lib/python3.8/site-packages/requests/models.py", line 900, in json
return complexjson.loads(self.text, **kwargs)
File "/usr/local/lib/python3.8/site-packages/simplejson/init.py", line 525, in loads
return _default_decoder.decode(s)
File "/usr/local/lib/python3.8/site-packages/simplejson/decoder.py", line 370, in decode
obj, end = self.raw_decode(s)
File "/usr/local/lib/python3.8/site-packages/simplejson/decoder.py", line 400, in raw_decode
return self.scan_once(s, idx=_w(s, idx).end())
simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

uninstalled, reinstalled, doesn't work. What could be the reason? Before the update everything worked.
thank you for your work

core-2021.2.3
supervisor-2021.02.9
Docker | 20.10.2

Loading ezviz via platform config is deprecated v0.0.4.3

Just received a new DP1C, no issues within itself.
I've installed and followed multiple instructions in different varying ways but nothing seems to work.

Installed via HACS v0.0.4.3
HA supervisor-2021.02.11
HA core-2021.2.3

setup camera.yaml

- platform: ezviz_cloud
  username: !secret ezviz_app_username
  password: !secret ezviz_app_password
  region: us
  cameras:
    F30191048:
      username: admin
      password: !secret ezviz_F30191048_password

EZVIZ integration is already there after reboot so cannot add it as per the instruction, I have removed it, re-added, increased timeout.
This is the only error i get in the logs
[custom_components.ezviz_cloud.camera] Loading ezviz via platform config is deprecated, it will be automatically imported. Please remove it afterwards.
Any help would be awesome :)

Cheers

Brent

Support for camera channels

Hi Renier,
I noted you are using the camera local IP and port got from py-ezviz to build a RTSP MRL.

if camera["serial"] in conf_cameras:
camera_username = conf_cameras[camera["serial"]][CONF_USERNAME]
camera_password = conf_cameras[camera["serial"]][CONF_PASSWORD]
camera_rtsp_stream = f"rtsp://{camera_username}:{camera_password}@{camera['local_ip']}:{local_rtsp_port}"
_LOGGER.debug(
"Camera %s source stream: %s", camera["serial"], camera_rtsp_stream
)

You are using the default camera channel MRL syntax;

rtsp://admin:<PASSWORD>@<IP-ADDR>:<PORT>

However, If you used the form:

rtsp://admin:<PASSWORD>@<IP-ADDR>:<PORT>/Streaming/Channels/10x

You would be able to access additional channels supported by many EzViz cameras. For example, my CS-CV206 Mini-O camera supports 2 channels:

$ ffprobe -hide_banner rtsp://admin:<PASSWORD>@<IP-ADDR>:554/Streaming/Channels/101
Input #0, rtsp, from 'rtsp://admin:<PASSWORD>@192.168.1.243:554/Streaming/Channels/101':
  Metadata:
    title           : Media Presentation
  Duration: N/A, start: 0.000000, bitrate: N/A
    Stream #0:0: Video: h264 (Main), yuvj420p(pc, bt709, progressive), 1920x1080, 14.99 tbr, 90k tbn, 180k tbc
    Stream #0:1: Audio: aac (LC), 16000 Hz, mono, fltp

$ ffprobe -hide_banner rtsp://admin:<PASSWORD>@<IP-ADDR>:554/Streaming/Channels/102
Input #0, rtsp, from 'rtsp://admin:<PASSWORD>@<IP-ADDR>:554/Streaming/Channels/102':
  Metadata:
    title           : Media Presentation
  Duration: N/A, start: 0.000000, bitrate: N/A
    Stream #0:0: Video: h264 (Main), yuvj420p(pc, bt709, progressive), 768x432, 14.99 tbr, 90k tbn, 180k tbc
    Stream #0:1: Audio: aac (LC), 16000 Hz, mono, fltp

As you can see, Channel 1 (101) produces a 1920x1080 video stream and channel 2 (102) a 768x432 one.

Second (LoRes) channel is suitable for displaying into a card in the Lovelace UI while the HiRes channel could be used to feed a Chromecast on a HDTV.

Not all cameras support more than one channel (C3A doesn't) because is supposed you will connect to only one channel at a time (to save battery I guess) and you would need to use an API call to set the default channel resolution before.

Info about channel support can be obtained from the JSON responses py-ezviz API call uses.

It would be a matter of generating one HA camera per channel to be able to get all them on HA. To make it simple, a config variable in ezviz_cloud.yaml could set the upper limit (channels: 2, for example) absence of that key would produce a single channel HA camera.

Hope it helps!!

Integration fails

Hi,
After thoroughly reading the notes of your integration and followed the right order of steps (HACS install, configuration.yaml camera add, restart, add integration, login in and go), i got the following error log details:

`Logger: custom_components.ezviz_cloud.coordinator
Source: custom_components/ezviz_cloud/coordinator.py:31
Integration: Ezviz (documentation)
First occurred: 8:48:11 PM (6 occurrences)
Last logged: 8:51:01 PM

Unexpected error fetching ezviz_cloud data: Can't gather proper data. Max retries exceeded.
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 149, in async_refresh
self.data = await self._async_update_data()
File "/config/custom_components/ezviz_cloud/coordinator.py", line 39, in _async_update_data
return await self.hass.async_add_executor_job(self._update_data)
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/coordinator.py", line 31, in _update_data
cameras = self.ezviz_client.load_cameras()
File "/usr/local/lib/python3.8/site-packages/pyezviz/client.py", line 320, in load_cameras
devices = self._get_all_device_infos()
File "/usr/local/lib/python3.8/site-packages/pyezviz/client.py", line 359, in _get_all_device_infos
devices = self._get_page_list()
File "/usr/local/lib/python3.8/site-packages/pyezviz/client.py", line 778, in _get_page_list
return self._api_get_pagelist(
File "/usr/local/lib/python3.8/site-packages/pyezviz/client.py", line 136, in _api_get_pagelist
return self._api_get_pagelist(page_filter, json_key, max_retries + 1)
File "/usr/local/lib/python3.8/site-packages/pyezviz/client.py", line 136, in _api_get_pagelist
return self._api_get_pagelist(page_filter, json_key, max_retries + 1)
File "/usr/local/lib/python3.8/site-packages/pyezviz/client.py", line 136, in _api_get_pagelist
return self._api_get_pagelist(page_filter, json_key, max_retries + 1)
[Previous line repeated 1 more time]
File "/usr/local/lib/python3.8/site-packages/pyezviz/client.py", line 117, in _api_get_pagelist
raise PyEzvizError("Can't gather proper data. Max retries exceeded.")
pyezviz.client.PyEzvizError: Can't gather proper data. Max retries exceeded.
`

What am I doing wrong, and more important: what can I do about it?

Best Regards,
Wolk9

Error: There are multiple cookies with name, 'AS_SessionID'

Issue that I'm unsure how to troubleshoot in one of the underlying python libraries.

Logger: homeassistant.config_entries
Source: custom_components/ezviz_cloud/init.py:146
First occurred: 10:51:09 AM (1 occurrences)
Last logged: 10:51:09 AM

Error setting up entry <Email removed> 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 91, 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 146, in _get_ezviz_client_instance
ezviz_client.login()
File "/usr/local/lib/python3.8/site-packages/pyezviz/client.py", line 308, in login
self._login()
File "/usr/local/lib/python3.8/site-packages/pyezviz/client.py", line 85, in _login
self._csrfToken = self._session.cookies['AS_SessionID']
File "/usr/local/lib/python3.8/site-packages/requests/cookies.py", line 328, in getitem
return self._find_no_duplicates(name)
File "/usr/local/lib/python3.8/site-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'

Region list?

My region is Canada in the app, but if I set the region to "ca" or "Canada" I get login errors about the API.

If I leave the region as "eu" it appears to login but the error message is "Unexpected error fetching ezviz_cloud data: (Impossible to load the devices..." etc.

Do you have a list for what the region code should be?

PTZ works?

Hi, I try to connect the camera, but when login in integrations only have data of those ones.
I can add stream with code:
camera:

How to can use PTZ service?
How can add PIR SENSOR?
Regards and thanks for your work.

Login error: Captcha required

Hi,

I just tried to configure my Doorbell camera, but see the following error in the log:
pyezviz.client.PyEzvizError: Login error: Captcha required

Any clue how i can solve this error?

integration fails to login due to captcha failing?

Hi,

I've installed the integration via HACS using the correct email address/password.

My configuration.yaml:

stream:
ffmpeg:
camera:
ezviz_cloud:
  cameras:
    E56407678:
      username: admin
      password: xxx

My hassio log:

Logger: homeassistant.config_entries
Source: custom_components/ezviz_cloud/__init__.py:142
First occurred: 12:20:33 AM (1 occurrences)
Last logged: 12:20:33 AM

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 80, in _login
    raise PyEzvizError("Login error: Incorrect Captcha code")
pyezviz.client.PyEzvizError: Login error: Incorrect Captcha code

I've logged into the web based ezviz site with the same username/password, entered the captcha on the site and can access my camera remotely using: https://i.ezvizlife.com/user/userAction!displayUserInfo.action

The camera was setup initially via my ios device and still works flawlessly with the app.

Any idea how I can get around this? I'd appreciate any input as it'd be ace to get this working!

no video stream after upgrade to 0.0.4.3

everything was quite fine with version 0.0.3.8 (or .9 I didn't remember).
I have an ezviz C1C

i just upgrade to 0.0.4.3
modified the configuration.yaml as per new indications, like:

camera:
- platform: ezviz_cloud
  username: xxxxxxx
  password: yyyyyyyyy
  cameras:
    D123456:
      username: user
      password: password

restarted.... removed old from GUI and added it again.
restarted again.
now I have 1 device and all 29 entities.

Entities seems fine, but i cannot get the video stream from the device anymore.
in the log i just see the following:

Logger: custom_components.ezviz_cloud.camera
Source: custom_components/ezviz_cloud/camera.py:67
Integration: Ezviz (documentation)
First occurred: 10:00:19 AM (1 occurrences)
Last logged: 10:00:19 AM

Loading ezviz via platform config is deprecated, it will be automatically imported. Please remove it afterwards.

As additional information, the RTSP Stream attribute of my EZVIZ camera entity is empty

[ha-ezviz] Integration works but i can't add in automation

Hi,

I have an issue with ha-ezviz, i was installed correctly and i can see new ha-ezviz services into the development section in HA. I can call the service with this parameters and it's OK i can control my ezviz device:
cmd: 0 serial: Dxxxxxx

But when i want to integrate this service into an automation, it doesn't work.
I have this message:
**Message malformed: Service ha-ezviz.ezviz_alarm_notify does not match format . for dictionary value @ data['sequence'][0]['service']
**

Can you help me please.

Thanks a lot.

Regards,

ha-ezviz in HA core.

Hi RanierM26 I understood that the RanierM26/ha-ezviz version is for just hass.io NOT for Home Assistant Core. Am I right ? Do you plan to release it for CORE as well. If yes, what is your plan.
Regards, Giuseppe.

Cannot login

Can you help to resolve this login issue?

Error while setting up ha-ezviz platform for camera Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 199, in _async_setup_platform await asyncio.shield(task) 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/ha-ezviz/camera.py", line 50, in setup_platform ezviz_client.login() File "/usr/local/lib/python3.8/site-packages/pyezviz/client.py", line 326, in login self._login() File "/usr/local/lib/python3.8/site-packages/pyezviz/client.py", line 97, in _login self._csrfToken = self._session.cookies['AS_SessionID'] File "/usr/local/lib/python3.8/site-packages/requests/cookies.py", line 328, in __getitem__ return self._find_no_duplicates(name) File "/usr/local/lib/python3.8/site-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'

Camera Sleep and Timeout fetching status / ezviz_cloud data

I've noticed that the component does not update status and in cant fetch data when the camera is in Sleep mode.
2021-01-11 10:25:51 ERROR (MainThread) [custom_components.ezviz_cloud.coordinator] Timeout fetching ezviz_cloud data
Using py-ezviz to fetch status when the camera is in sleep mode takes about 15 seconds.

bash-5.0# date && pyezviz .... status && date
Mon Jan 11 10:32:25 CET 2021
{
  "serial": "..........",
  "name": "C6N(..........)",
  .......
  "sleep": true,
  "detection_sensibility": "Unknown",
  .......
}
Mon Jan 11 10:32:41 CET 2021

When the camera is online, the time to fetch status is about 2 seconds.
bash-5.0# date && pyezviz .... status && date
Mon Jan 11 10:34:04 CET 2021

{
  "serial": "..........",
  "name": "C6N(..........)",
  .......
  "sleep": false,
  "detection_sensibility": "2",
  .......
}
Mon Jan 11 10:34:06 CET 2021

Is it related to how slow the fetching of data is that is causing this behavior? Does HA component timeout?

Note: I prefer sleep mode compared to privacy mode when I want complete privacy.

Other region can add?

How to region\vietnam working with region when add itegra?
I try with eu but device can't see
IMG_20210228_141732

v0.0.4.4 No entities

Hello, I was able to set up Ezviz integration, log in my account (I'm from Italy, so it's based in EU) and add my cameras:

image

Anyways, I get no entities:

image

Since here #36 (comment) it was said they could see services, I specify that I don't:

image

Finally, on reboot I get this log in loop:

Unexpected error fetching ezviz_cloud data: Can't gather proper data. Max retries exceeded. Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 149, in async_refresh self.data = await self._async_update_data() File "/config/custom_components/ezviz_cloud/coordinator.py", line 39, in _async_update_data return await self.hass.async_add_executor_job(self._update_data) 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/coordinator.py", line 31, in _update_data cameras = self.ezviz_client.load_cameras() File "/usr/local/lib/python3.8/site-packages/pyezviz/client.py", line 320, in load_cameras devices = self._get_all_device_infos() File "/usr/local/lib/python3.8/site-packages/pyezviz/client.py", line 359, in _get_all_device_infos devices = self._get_page_list() File "/usr/local/lib/python3.8/site-packages/pyezviz/client.py", line 778, in _get_page_list return self._api_get_pagelist( File "/usr/local/lib/python3.8/site-packages/pyezviz/client.py", line 136, in _api_get_pagelist return self._api_get_pagelist(page_filter, json_key, max_retries + 1) File "/usr/local/lib/python3.8/site-packages/pyezviz/client.py", line 136, in _api_get_pagelist return self._api_get_pagelist(page_filter, json_key, max_retries + 1) File "/usr/local/lib/python3.8/site-packages/pyezviz/client.py", line 136, in _api_get_pagelist return self._api_get_pagelist(page_filter, json_key, max_retries + 1) [Previous line repeated 1 more time] File "/usr/local/lib/python3.8/site-packages/pyezviz/client.py", line 117, in _api_get_pagelist raise PyEzvizError("Can't gather proper data. Max retries exceeded.") pyezviz.client.PyEzvizError: Can't gather proper data. Max retries exceeded.

Config entry 'alessandrotischer' for ezviz_cloud integration not ready yet. Retrying in 5 seconds Config entry 'alessandrotischer' for ezviz_cloud integration not ready yet. Retrying in 10 seconds Config entry 'alessandrotischer' for ezviz_cloud integration not ready yet. Retrying in 20 seconds Config entry 'alessandrotischer' for ezviz_cloud integration not ready yet. Retrying in 40 seconds Config entry 'alessandrotischer' for ezviz_cloud integration not ready yet. Retrying in 80 seconds

I've also seen here #36 (comment) that removing and adding back the camera using the default app-given name for the camera serial could help, but it's not my case:

image

10 second lag between EZViz PIR Event and HA seeing the event

Hi,

I have set up HA automation to turn on a light when motion has been detected.

EZViz App indicates a PIR event has been triggered but there is a delay of around 9 - 10 seconds before the automation kicks in.

Is there anyway of decreasing the lag of how often the integration 'polls' the EzViz API ?

Thanks.

Pete

ezviz CTQ6C

hi, with the CTQ6C cam I am having problems with the services, they are created but they do not control the cam in its movements and all the rest and in the HA logs I do not see any error inherent to the integration

Service for change privacy mode

Hi,
thanks a lot for your work!
Is it possible activate/disactivate privacy mode of the camera? Something like camera.ezviz_switch_privacy_on on old integration.
Thanks!

Unexpected error fetching ezviz_cloud data: local variable 'json_result' referenced before assignment

Hi, I've installed ezviz_cloud via HACS and then added the integration via Configuration > Integrations. I've then added my config to configuration.yaml, eg:

ezviz_cloud:
cameras:
D91157661:
username: admin
password: XXXXXX

after restarting HA i get the following "ERROR" in the logs:

Logger: custom_components.ezviz_cloud.coordinator
Source: custom_components/ezviz_cloud/coordinator.py:31
Integration: Ezviz Cloud (documentation)
First occurred: 20:49:25 (9 occurrences)
Last logged: 20:56:39

Unexpected error fetching ezviz_cloud data: local variable 'json_result' referenced before assignment
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 144, in async_refresh
self.data = await self._async_update_data()
File "/config/custom_components/ezviz_cloud/coordinator.py", line 39, in _async_update_data
return await self.hass.async_add_executor_job(self._update_data)
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/coordinator.py", line 31, in _update_data
cameras = self.EzvizClient.load_cameras()
File "/usr/local/lib/python3.8/site-packages/pyezviz/client.py", line 262, in load_cameras
camera.load()
File "/usr/local/lib/python3.8/site-packages/pyezviz/camera.py", line 16, in load
self._device = self._client._get_deviceinfo(self._serial)
File "/usr/local/lib/python3.8/site-packages/pyezviz/client.py", line 173, in _get_deviceinfo
if not json_result:
UnboundLocalError: local variable 'json_result' referenced before assignment

I left the region to "eu", I am located in South Africa - should I have chosen "za"?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.