I'm unable to connect to my Ezviz cameras with the new integration.
configuration.yaml
camera:
- platform: ezviz
username: MY_USER_NAME
password: MY_PASSWORD
cameras:
C123456789:
username: CAMERA_USER_NAME
password: CAMERA_VC
Logger: homeassistant.components.camera
Source: components/ezviz/camera.py:50
Integration: Cámara (documentation, issues)
First occurred: 19:52:34 (1 occurrences)
Last logged: 19:52:34
Error while setting up ezviz platform for camera
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 179, in _async_setup_platform
await asyncio.wait_for(asyncio.shield(task), SLOW_SETUP_MAX_WAIT)
File "/usr/local/lib/python3.7/asyncio/tasks.py", line 442, in wait_for
return fut.result()
File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/src/homeassistant/homeassistant/components/ezviz/camera.py", line 50, in setup_platform
cameras = ezviz_client.load_cameras()
File "/usr/local/lib/python3.7/site-packages/pyezviz/client.py", line 197, in load_cameras
cameras.append(camera.status())
File "/usr/local/lib/python3.7/site-packages/pyezviz/camera.py", line 97, in status
'follow_move': self._switch[TYPE_FOLLOW_MOVE]['enable'],
KeyError: 25
I've already checked my user and password in the ezviz application and in the url linked in the documentation
Hey there @baqs, mind taking a look at this issue as its been labeled with a integration (ezviz
) you are listed as a codeowner for? Thanks!
Same issue as above with me
It does work here(it logs in and it sees it), but it does not show the preview, nor does the PTZ work.
Same issue
same here.
just to be sure: camera name is free text or should be the same of the one in the app?
Also getting an error when attempting to connect.
2020-03-18 21:04:15 ERROR (MainThread) [homeassistant.components.camera] Error while setting up ezviz platform for camera
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 179, in _async_setup_platform
await asyncio.wait_for(asyncio.shield(task), SLOW_SETUP_MAX_WAIT)
File "/usr/local/lib/python3.7/asyncio/tasks.py", line 442, in wait_for
return fut.result()
File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/src/homeassistant/homeassistant/components/ezviz/camera.py", line 49, in setup_platform
ezviz_client.login()
File "/usr/local/lib/python3.7/site-packages/pyezviz/client.py", line 240, in login
return self._login()
File "/usr/local/lib/python3.7/site-packages/pyezviz/client.py", line 87, in _login
sessionId = str(response_json["loginSession"]["sessionId"])
KeyError: 'loginSession'
Also not clear on the camera name in config. Is is supposed to be the hostname of the device OR the friendly name OR the serial number of the camera. Needs clarification on the docs...
stesso problema
just to be sure: camera name is free text or should be the same of the one in the app?
You need to call it the same. It's the part with 1 letter and rest are numbers.
Hi,
I'm not able to integrate the ezviz cameras.
in my ezviz app the names are not beginning with a letter.
The names are composed by 9 digits.
What i can try?
Hello, warm regards!
Ezviz integrations - it doesn't work for me.
My Setting in configuration.yaml:
camera:
-
platform: ezviz
username: my username of ezviz password: my password of ezviz cameras: DXXXXXXXX: #DEVICE SERIAL username: my username of ezviz / my username of device #the same error occurs with both
> password: my username of ezviz / my username of device #the same error occurs with both
Registration details (ERROR)
Logger: homeassistant.components.camera
Source: components/ezviz/camera.py:49
Integration: Cámara (documentation, issues)
First occurred: 2:55:10 (1 occurrences)
Last logged: 2:55:10
Error while setting up ezviz platform for camera
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 179, in _async_setup_platform
await asyncio.wait_for(asyncio.shield(task), SLOW_SETUP_MAX_WAIT)
File "/usr/local/lib/python3.7/asyncio/tasks.py", line 442, in wait_for
return fut.result()
File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(self.args, *self.kwargs)
File "/usr/src/homeassistant/homeassistant/components/ezviz/camera.py", line 49, in setup_platform
ezviz_client.login()
File "/usr/local/lib/python3.7/site-packages/pyezviz/client.py", line 240, in login
return self._login()
File "/usr/local/lib/python3.7/site-packages/pyezviz/client.py", line 87, in _login
sessionId = str(response_json["loginSession"]["sessionId"])
KeyError: 'loginSession'
What is the problem?
Thank you for the support you can provide
@sharkgreen You should put this:
username: my username of ezviz APP login
password: my password of ezviz * APP Password*
cameras:
DXXXXXXXX: #DEVICE SERIAL
username: my username of ezviz / my username of device #the same error occurs with both admin
password: my username of ezviz / my username of device #the same error occurs with both password that is on the sticker on the device itself
Yes, I am using the same data from the app. I don't understand why the error occurs.
my device is hikvision DS-7204HUHI-K1 and I can visualize it perfectly in the android ezviz app
@D3nnisd my configuration is exactly as yours but not working:
Traceback (most recent call last):
File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/entity_platform.py", line 179, in _async_setup_platform
await asyncio.wait_for(asyncio.shield(task), SLOW_SETUP_MAX_WAIT)
File "/usr/local/lib/python3.7/asyncio/tasks.py", line 416, in wait_for
return fut.result()
File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(self.args, *self.kwargs)
File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/ezviz/camera.py", line 50, in setup_platform
cameras = ezviz_client.load_cameras()
File "/srv/homeassistant/lib/python3.7/site-packages/pyezviz/client.py", line 197, in load_cameras
cameras.append(camera.status())
File "/srv/homeassistant/lib/python3.7/site-packages/pyezviz/camera.py", line 97, in status
'follow_move': self._switch[TYPE_FOLLOW_MOVE]['enable'],
KeyError: 25
@sharkgreen What code are you using ? the serial?
@ohipe Thats what i get.You don't have the services either. That issue is : https://github.com/home-assistant/core/issues/32981
Same problem with Home Assistant 0.107.1 and Hass.io, HassOS 3.12.
I tried also without any camera defined (from the documentation it seems "cameras" is optional), but same problem:
Error while setting up ezviz platform for camera
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 179, in _async_setup_platform
await asyncio.wait_for(asyncio.shield(task), SLOW_SETUP_MAX_WAIT)
File "/usr/local/lib/python3.7/asyncio/tasks.py", line 442, in wait_for
return fut.result()
File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/src/homeassistant/homeassistant/components/ezviz/camera.py", line 50, in setup_platform
cameras = ezviz_client.load_cameras()
File "/usr/local/lib/python3.7/site-packages/pyezviz/client.py", line 197, in load_cameras
cameras.append(camera.status())
File "/usr/local/lib/python3.7/site-packages/pyezviz/camera.py", line 97, in status
'follow_move': self._switch[TYPE_FOLLOW_MOVE]['enable'],
KeyError: 25
in my cam the serial is made only of numbers do I have to add "D" ??
@sharkgreen What code are you using ? the serial?
the device serial, the same one I used to add the device to the app D3######6
camera:
platform: ezviz
username: [email protected] (my user app ezviz)
password: mypassword_ezviz_
D3######6: (device serial)
username: admin (user device)
password: ab123456 (password device)
Using my email as username gives me:
Error while setting up ezviz platform for camera
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 179, in _async_setup_platform
await asyncio.wait_for(asyncio.shield(task), SLOW_SETUP_MAX_WAIT)
File "/usr/local/lib/python3.7/asyncio/tasks.py", line 442, in wait_for
return fut.result()
File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/src/homeassistant/homeassistant/components/ezviz/camera.py", line 49, in setup_platform
ezviz_client.login()
File "/usr/local/lib/python3.7/site-packages/pyezviz/client.py", line 240, in login
return self._login()
File "/usr/local/lib/python3.7/site-packages/pyezviz/client.py", line 87, in _login
sessionId = str(response_json["loginSession"]["sessionId"])
KeyError: 'loginSession'
Using user name defined in the app gives me:
Error while setting up ezviz platform for camera
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 179, in _async_setup_platform
await asyncio.wait_for(asyncio.shield(task), SLOW_SETUP_MAX_WAIT)
File "/usr/local/lib/python3.7/asyncio/tasks.py", line 442, in wait_for
return fut.result()
File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/src/homeassistant/homeassistant/components/ezviz/camera.py", line 50, in setup_platform
cameras = ezviz_client.load_cameras()
File "/usr/local/lib/python3.7/site-packages/pyezviz/client.py", line 197, in load_cameras
cameras.append(camera.status())
File "/usr/local/lib/python3.7/site-packages/pyezviz/camera.py", line 97, in status
'follow_move': self._switch[TYPE_FOLLOW_MOVE]['enable'],
KeyError: 25
Using my email as username give me:
Error while setting up ezviz platform for camera Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 179, in _async_setup_platform await asyncio.wait_for(asyncio.shield(task), SLOW_SETUP_MAX_WAIT) File "/usr/local/lib/python3.7/asyncio/tasks.py", line 442, in wait_for return fut.result() File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run result = self.fn(*self.args, **self.kwargs) File "/usr/src/homeassistant/homeassistant/components/ezviz/camera.py", line 49, in setup_platform ezviz_client.login() File "/usr/local/lib/python3.7/site-packages/pyezviz/client.py", line 240, in login return self._login() File "/usr/local/lib/python3.7/site-packages/pyezviz/client.py", line 87, in _login sessionId = str(response_json["loginSession"]["sessionId"]) KeyError: 'loginSession'
it happens the same to me
this integration uses the SNMP protocol??
@damiano75 The second error has correct login info. That error is becasue of some other bug. check https://github.com/home-assistant/core/issues/32981
@damiano75 The second error has correct login info. That error is becasue of some other bug. check #32981
Yes, I know, it was just to add some information regarding wich cerdentials I used
changing any data after cameras: I always get the same error:
Logger: homeassistant.components.camera
Source: components/ezviz/camera.py:50
Integration: Telecamera (documentation, issues)
First occurred: 14:46:12 (1 occurrences)
Last logged: 14:46:12
Error while setting up ezviz platform for camera
Traceback (most recent call last):
File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/entity_platform.py", line 179, in _async_setup_platform
await asyncio.wait_for(asyncio.shield(task), SLOW_SETUP_MAX_WAIT)
File "/usr/lib/python3.7/asyncio/tasks.py", line 416, in wait_for
return fut.result()
File "/usr/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(self.args, *self.kwargs)
File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/ezviz/camera.py", line 50, in setup_platform
cameras = ezviz_client.load_cameras()
File "/srv/homeassistant/lib/python3.7/site-packages/pyezviz/client.py", line 197, in load_cameras
cameras.append(camera.status())
File "/srv/homeassistant/lib/python3.7/site-packages/pyezviz/camera.py", line 97, in status
'follow_move': self._switch[TYPE_FOLLOW_MOVE]['enable'],
KeyError: 25
I use these settings:
platform: ezviz
username: MY_USER_APP / MY_EMAIL
password: MY_PWD_APP
cameras:
123456789: #DEVICE SERIAL
username: admin
password: *
however it seems that the error is not in the configuration.
I have same problem:
Error while setting up ezviz platform for camera
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 179, in _async_setup_platform
await asyncio.wait_for(asyncio.shield(task), SLOW_SETUP_MAX_WAIT)
File "/usr/local/lib/python3.7/asyncio/tasks.py", line 442, in wait_for
return fut.result()
File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(self.args, *self.kwargs)
File "/usr/src/homeassistant/homeassistant/components/ezviz/camera.py", line 50, in setup_platform
cameras = ezviz_client.load_cameras()
File "/usr/local/lib/python3.7/site-packages/pyezviz/client.py", line 197, in load_cameras
cameras.append(camera.status())
File "/usr/local/lib/python3.7/site-packages/pyezviz/camera.py", line 97, in status
'follow_move': self._switch[TYPE_FOLLOW_MOVE]['enable'],
KeyError: 25
Hello there,
I had same problem. I solved it by changing user name from e-mail to username which is set default in ezviz app. You can find it in your account setting (above phone number).
Hello there,
I had same problem. I solved it by changing user name from e-mail to username which is set default in ezviz app. You can find it in your account setting (above phone number).
Hello Pakul83.
I have changed configuration but the problem is still present:
My configuration.yaml
camera:
@andrearomanoif
Does your config look exactly like in your last post? If yes you need to format it correctly. I don't use quotation marks.
Remember to change card config with your camera type. In my case: camera.c6cn_D64150831
For me it doesn’t make a difference if I use username or email, neither work...
@andrearomanoif
Does your config look exactly like in your last post? If yes you need to format it correctly. I don't use quotation marks.Remember to change card config with your camera type. In my case: camera.c6cn_D64150831
I don't use quotation marks. I added them as example. If change username error is always up
I have the same problem.
The ezviz app i use i installed from google play store (version 4)
In the integration the link of the app is :
https://apiieu.ezvizlife.com/mobile/index.html
(version 2)
Is necessary the app of the link? because doesn't work for me.
Or the app in the google play store works?
Thanks
I use the app from google play store.
no ezviz service is created for me
@andrearomanoif
Does your config look exactly like in your last post? If yes you need to format it correctly. I don't use quotation marks.Remember to change card config with your camera type. In my case: camera.c6cn_D64150831
How can it works like this? The name of the entity created by HA is different
My HA has crearted that entity name:
My HA has crearted that entity name:
Ah OK. Thanks, mine is different :) camera.salotto
it may be that it does not work with the model CS-CV206?
I did all the tests but always the same mistake..
Even for me always the same mistake. Unfortunately, replacing the email user with the username of the Ezviz App as indicated by Pakul83, the problem is not resolved. There must be another solution. Did anyone understand?
This is the mistake:
packages / pyezviz / camera.py ", line 97, in the state
'follow_move': self._switch [TYPE_FOLLOW_MOVE] ['enable'],
KeyError: 25
same problem, has anyone solved it?
it may be that it does not work with the model CS-CV206?
I did all the tests but always the same mistake..
indeed I do only have c6n cameras, so I couldn't test with other models.
Also, could you please try the code from this branch ? (it contains few fixes and improvements):
https://github.com/home-assistant/core/pull/32451
potrebbe non funzionare con il modello CS-CV206?
Ho fatto tutti i test ma sempre lo stesso errore ..infatti ho solo fotocamere c6n, quindi non ho potuto testare con altri modelli.
Inoltre, potresti provare il codice di questo ramo? (contiene alcune correzioni e miglioramenti):
# 32451
I can't edit the camera.py file and create the services.yaml file because I don't have permission to write to the /srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/ezviz folder
it may be that it does not work with the model CS-CV206?
I did all the tests but always the same mistake..indeed I do only have c6n cameras, so I couldn't test with other models.
Also, could you please try the code from this branch ? (it contains few fixes and improvements):
32451
Hi, I tried to integrate the branch by using the custom_components folder.
This is the log with the original version:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 179, in _async_setup_platform
await asyncio.wait_for(asyncio.shield(task), SLOW_SETUP_MAX_WAIT)
File "/usr/local/lib/python3.7/asyncio/tasks.py", line 442, in wait_for
return fut.result()
File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/src/homeassistant/homeassistant/components/ezviz/camera.py", line 50, in setup_platform
cameras = ezviz_client.load_cameras()
File "/usr/local/lib/python3.7/site-packages/pyezviz/client.py", line 197, in load_cameras
cameras.append(camera.status())
File "/usr/local/lib/python3.7/site-packages/pyezviz/camera.py", line 97, in status
'follow_move': self._switch[TYPE_FOLLOW_MOVE]['enable'],
KeyError: 25
This is the log with the branch:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 179, in _async_setup_platform
await asyncio.wait_for(asyncio.shield(task), SLOW_SETUP_MAX_WAIT)
File "/usr/local/lib/python3.7/asyncio/tasks.py", line 442, in wait_for
return fut.result()
File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/ezviz/camera.py", line 151, in setup_platform
cameras = ezviz_client.load_cameras()
File "/usr/local/lib/python3.7/site-packages/pyezviz/client.py", line 197, in load_cameras
cameras.append(camera.status())
File "/usr/local/lib/python3.7/site-packages/pyezviz/camera.py", line 97, in status
'follow_move': self._switch[TYPE_FOLLOW_MOVE]['enable'],
KeyError: 25
sorry but it seams you didn't load the proper code.
Are you sure it's similar to
https://github.com/BaQs/home-assistant/blob/ezviz_ptz/homeassistant/components/ezviz/camera.py ?
(especially line 219)
sorry but it seams you didn't load the proper code.
Are you sure it's similar to
https://github.com/BaQs/home-assistant/blob/ezviz_ptz/homeassistant/components/ezviz/camera.py ?
(especially line 219)
To be sure I downloaded the code you linked, but the log is always the same.
Logger: homeassistant.components.camera
Source: custom_components/ezviz/camera.py:151
Integration: Telecamera (documentation, issues)
First occurred: 0:51:08 (1 occurrences)
Last logged: 0:51:08
Error while setting up ezviz platform for camera
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 179, in _async_setup_platform
await asyncio.wait_for(asyncio.shield(task), SLOW_SETUP_MAX_WAIT)
File "/usr/local/lib/python3.7/asyncio/tasks.py", line 442, in wait_for
return fut.result()
File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/ezviz/camera.py", line 151, in setup_platform
cameras = ezviz_client.load_cameras()
File "/usr/local/lib/python3.7/site-packages/pyezviz/client.py", line 197, in load_cameras
cameras.append(camera.status())
File "/usr/local/lib/python3.7/site-packages/pyezviz/camera.py", line 97, in status
'follow_move': self._switch[TYPE_FOLLOW_MOVE]['enable'],
KeyError: 25
Hi everyone, I work for me (with an CTQ6C).
ffmpeg:
to configurationcamera:
- platform: ezviz
username: <GENERATED_EZVIZ_USERNAME>
password: <PASSWORD>
cameras:
D49719753: <-- deviceSerial
username: admin <-- constant, why not optional with admin as default ?
password: <verification code next to the QR code>
I share my research, hoping that it could help someone:
Firstly, I tested my camera with a rtsp url in vlc: rtsp://admin:VERIFICATION_CODE@CAMERA_LOCAL_IP:554
curl -X POST \
https://apiieu.ezvizlife.com/v3/users/login \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'cache-control: no-cache' \
-H 'clientType: 1' \
-H 'customNo: 1000001' \
-d 'account=<YOUR_USERNAME>&password=<YOUR_PASSWORD IN MD5>'
curl -X GET \
'https://apiieu.ezvizlife.com/v3/userdevices/v1/devices/pagelist?filter=CLOUD,TIME_PLAN,CONNECTION,SWITCH,STATUS,WIFI,STATUS_EXT,NODISTURB,P2P,TTS,KMS,HIDDNS&sessionId=<SESSIONID>' \
-H 'cache-control: no-cache'
you can get SESSIONID from loginSession.session_id
in the first curl
Sorry for my prehistoric english ;)
@Menelao147 : the issue seems to come from the pypi package itself.
could you install the package:
pypi install pyezviz
and then launch:
pyezviz -u '[email protected].' -p 'my_password' devices status
@BaQs : Unfortunately I'm not very familiar with python, but if you can guide me, I will be happy to do this test.
I'm running home assistant on a Raspberry Pi 4
@BaQs : Unfortunately I'm not very familiar with python, but if you can guide me, I will be happy to do this test.
I'm running home assistant on a Raspberry Pi 4
Are you familiar with shell commands ?
Are you familiar with shell commands ?
A little, I've Terminal add-on installed
I am having the same issues with a CS-CV206-C0-3B2WFR.
Hi @BaQs -
When I run
pyezviz -u '[email protected].' -p 'my_password' devices status
it only returns
'loginSession'
Tried with both email and username, same result.
I have verified all works fine in my browser at apiieu.ezvizlife.com
I did notice that I get directed to https://ius.ezvizlife.com/user/userAction!goToMyShipin7.action after login.
Could it be a geolocation issue? I'm in Canada and therefore it sends me to the ius.ezvizlife.com domain.
When I go to ius.ezvizlife.com it sends me to https://usauth.ezvizlife.com/signIn?
Just a thought.... not sure if pyezviz is coded to expect an eu result...
Many thanks!
EDIT: Indeed, when I change the library to use the base url of ius.ezvizlife.com
I do get a sessionId=
in the debug return code, which I don't get otherwise..... looks like the library may need to be changed to account for this? After this change pyezviz -u '[email protected].' -p 'my_password' devices status
returns 22
and pyezviz -u '[email protected].' -p 'my_password' devices connection
properly lists all of my cameras! Progress :-) Still no camera entities created, however and my homeassistant log now errors with 22
instead:
Error while setting up ezviz platform for camera
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 179, in _async_setup_platform
await asyncio.wait_for(asyncio.shield(task), SLOW_SETUP_MAX_WAIT)
File "/usr/local/lib/python3.7/asyncio/tasks.py", line 442, in wait_for
return fut.result()
File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/ezviz/camera.py", line 151, in setup_platform
cameras = ezviz_client.load_cameras()
File "/usr/local/lib/python3.7/site-packages/pyezviz/client.py", line 197, in load_cameras
cameras.append(camera.status())
File "/usr/local/lib/python3.7/site-packages/pyezviz/camera.py", line 94, in status
'audio': self._switch[TYPE_AUDIO]['enable'],
KeyError: 22
I'm in Italy and it doesn't work for me
my solution:
- Add
ffmpeg:
to configuration- Ezviz config:
camera: - platform: ezviz username: <GENERATED_EZVIZ_USERNAME> password: <PASSWORD> cameras: D49719753: <-- deviceSerial username: admin <-- constant, why not optional with admin as default ? password: <verification code next to the QR code>
THANK YOU, @ecadagiani, your comment has helped me massively and I finally got the video stream to work! And your English is far from prehistoric, I doubt they had Ezviz cameras back then 😆
@BaQs, might I suggest that the documentation for the Ezviz integration is updated to mention that ffmpeg:
is required in configuration.yaml
? I think it would also be handy to clarify what is meant by each mentioned username and password, as it wasn't until I came across this thread that I found out what the values should be (and I'd +1 @ecadagiani's suggestion that it would be handy if the integration could set the default username to admin).
Hi @ecadagiani still not working here.
ffmpeg: is already in my configuration since it is the mode I currently use to see Ezviz camera stream in HA.
Maybe is this a model related issue?
hi @BaQs
when I run pyezviz -u '[email protected].' -p 'my_password' devices status I receive this error:
from _bz2 import BZ2Compressor, BZ2Decompressor
ModuleNotFoundError: No module named '_bz2'
Could it be the cause of service not working in HA?
What do you suggest? Somwhere I read that python has to be rebuilt to fix this error.
thanks
Hi @ecadagiani still not working here.
ffmpeg: is already in my configuration since it is the mode I currently use to see Ezviz camera stream in HA.
Maybe is this a model related issue?
Hi, @ohipe
I couldn't help you much, but I can give you some lines of research:
# to transform your password in md5: https://timestampgenerator.com/tools/md5-generator
curl -X POST \
https://apiieu.ezvizlife.com/v3/users/login \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'cache-control: no-cache' \
-H 'clientType: 1' \
-H 'customNo: 1000001' \
-d 'account=<YOUR_USERNAME>&password=<YOUR_PASSWORD IN MD5>'
# get the sessionId, and add it in your second request
curl -X GET \
'https://apiieu.ezvizlife.com/v3/userdevices/v1/devices/pagelist?sessionId=<SESSIONID>&filter=CLOUD,TIME_PLAN,CONNECTION,SWITCH,STATUS,WIFI,STATUS_EXT,NODISTURB,P2P,TTS,KMS,HIDDNS' \
-H 'cache-control: no-cache'
If the API works well too:
Test the ezviz python package, in another virtual-env (or in your computer) that home assistant:
(try to debug in this other environment, if you break everything, you keep your hass safe)
pip install pyezviz
pyezviz github
NB: For me, I also added stream:
integration, to try to get ezviz services... but the services are not yet functional for me (https://github.com/home-assistant/core/issues/32981)
I have an EZVIZ DB1 doorbell and when I do the login I get:
'NoneType' object is not subscriptable
With debug on:
--debug devices status
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): apiieu.ezvizlife.com:443
send: b'POST /v3/users/login HTTP/1.1\r\nHost: apiieu.ezvizlife.com\r\nUser-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2227.0 Safari/537.36\r\nAccept-Encoding: gzip, deflate\r\nAccept: */*\r\nConnection: keep-alive\r\nContent-Type: application/x-www-form-urlencoded\r\nclientType: 1\r\ncustomNo: 1000001\r\nContent-Length: 127\r\n\r\n'
send: b'account=emailaddress%40gmail.com&password=password&featureCode=92c579faa0902cbfcfcc4fc004ef67e7'
reply: 'HTTP/1.1 200 OK\r\n'
header: Content-Encoding: gzip
header: Content-Type: application/json;charset=UTF-8
header: Date: Sun, 05 Apr 2020 13:45:39 GMT
header: Server: Tengine
header: Vary: Accept-Encoding
header: Content-Length: 516
header: Connection: keep-alive
DEBUG:urllib3.connectionpool:https://apiieu.ezvizlife.com:443 "POST /v3/users/login HTTP/1.1" 200 516
send: b'GET /v3/userdevices/v1/devices/pagelist?filter=CLOUD HTTP/1.1\r\nHost: apiieu.ezvizlife.com\r\nUser-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2227.0 Safari/537.36\r\nAccept-Encoding: gzip, deflate\r\nAccept: */*\r\nConnection: keep-alive\r\nsessionId: 771cc98034e5484087c4950a0f360cfa\r\n\r\n'
reply: 'HTTP/1.1 200 OK\r\n'
header: Content-Encoding: gzip
header: Content-Type: application/json;charset=UTF-8
header: Date: Sun, 05 Apr 2020 13:45:39 GMT
header: ETag: "046845c9fbf2bbe6b78c6aecec702bc7d"
header: Server: Tengine
header: Vary: Accept-Encoding
header: Content-Length: 991
header: Connection: keep-alive
DEBUG:urllib3.connectionpool:https://apiieu.ezvizlife.com:443 "GET /v3/userdevices/v1/devices/pagelist?filter=CLOUD HTTP/1.1" 200 991
send: b'GET /v3/userdevices/v1/devices/pagelist?filter=CLOUD%2CTIME_PLAN%2CCONNECTION%2CSWITCH%2CSTATUS%2CWIFI%2CSTATUS_EXT%2CNODISTURB%2CP2P%2CTTS%2CKMS%2CHIDDNS HTTP/1.1\r\nHost: apiieu.ezvizlife.com\r\nUser-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2227.0 Safari/537.36\r\nAccept-Encoding: gzip, deflate\r\nAccept: */*\r\nConnection: keep-alive\r\nsessionId: 771cc98034e5484087c4950a0f360cfa\r\n\r\n'
reply: 'HTTP/1.1 200 OK\r\n'
header: Content-Encoding: gzip
header: Content-Type: application/json;charset=UTF-8
header: Date: Sun, 05 Apr 2020 13:45:39 GMT
header: ETag: "0579839bead27f1378c7b0a79e1a6227f"
header: Server: Tengine
header: Vary: Accept-Encoding
header: Content-Length: 2013
header: Connection: keep-alive
DEBUG:urllib3.connectionpool:https://apiieu.ezvizlife.com:443 "GET /v3/userdevices/v1/devices/pagelist?filter=CLOUD%2CTIME_PLAN%2CCONNECTION%2CSWITCH%2CSTATUS%2CWIFI%2CSTATUS_EXT%2CNODISTURB%2CP2P%2CTTS%2CKMS%2CHIDDNS HTTP/1.1" 200 2013
send: b'POST /api/device/queryAlgorithmConfig HTTP/1.1\r\nHost: apiieu.ezvizlife.com\r\nUser-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2227.0 Safari/537.36\r\nAccept-Encoding: gzip, deflate\r\nAccept: */*\r\nConnection: keep-alive\r\nContent-Length: 75\r\nContent-Type: application/x-www-form-urlencoded\r\n\r\n'
send: b'subSerial=C72927227&sessionId=771cc98034e5484087c4950a0f360cfa&clientType=1'
reply: 'HTTP/1.1 200 OK\r\n'
header: Access-Control-Allow-Headers: Content-Type, api_key, Authorization
header: Access-Control-Allow-Methods: GET, POST, DELETE, PUT, PATCH, OPTIONS
header: Access-Control-Allow-Origin: *
header: Content-Encoding: gzip
header: Content-Type: application/json;charset=UTF-8
header: Date: Sun, 05 Apr 2020 13:45:40 GMT
header: Server: Tengine
header: Vary: Accept-Encoding
header: Content-Length: 124
header: Connection: keep-alive
DEBUG:urllib3.connectionpool:https://apiieu.ezvizlife.com:443 "POST /api/device/queryAlgorithmConfig HTTP/1.1" 200 124
'NoneType' object is not subscriptable
Same here
```2020-04-12 04:43:33 ERROR (MainThread) [homeassistant.components.camera] Error while setting up ezviz platform for camera
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 178, in _async_setup_platform
await asyncio.wait_for(asyncio.shield(task), SLOW_SETUP_MAX_WAIT)
File "/usr/local/lib/python3.7/asyncio/tasks.py", line 442, in wait_for
return fut.result()
File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(self.args, *self.kwargs)
File "/usr/src/homeassistant/homeassistant/components/ezviz/camera.py", line 49, in setup_platform
ezviz_client.login()
File "/usr/local/lib/python3.7/site-packages/pyezviz/client.py", line 240, in login
return self._login()
File "/usr/local/lib/python3.7/site-packages/pyezviz/client.py", line 87, in _login
sessionId = str(response_json["loginSession"]["sessionId"])
KeyError: 'loginSession'
As @ecadagiani proposed, I'm using curl to debug (apiisa for Uruguay)
```curl -X POST \
https://apiisa.ezvizlife.com/v3/users/login \
-H 'Cache-Control: no-cache' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Postman-Token: f1784dd4-de08-f42b-4862-9cbe20cb1044' \
-H 'clientType: 1' \
-H 'customNo: 1000001' \
-d 'account=<USER>&password=<MD5_PASSWORD>'
Response: 504 Gateway Timeout
{
"meta": {
"code": 504,
"message": "java.lang.IllegalArgumentException: The validated string is empty",
"moreInfo": null
}
}
Seems to be a bug from ezviz services 😢
same issue...i see there is a discussion also on hassio forum: https://community.home-assistant.io/t/new-ezviz-integration-has-error/179570/13
Hy guys I have a CTQ2C so a still camera 1080p the camera works perfectly with the rstp ffmpeg configuration but when I try to Setup the ezviz service I got back:
Error while setting up ezviz platform for camera
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 178, in _async_setup_platform
await asyncio.wait_for(asyncio.shield(task), SLOW_SETUP_MAX_WAIT)
File "/usr/local/lib/python3.7/asyncio/tasks.py", line 442, in wait_for
return fut.result()
File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(self.args, *self.kwargs)
File "/usr/src/homeassistant/homeassistant/components/ezviz/camera.py", line 50, in setup_platform
cameras = ezviz_client.load_cameras()
File "/usr/local/lib/python3.7/site-packages/pyezviz/client.py", line 197, in load_cameras
cameras.append(camera.status())
File "/usr/local/lib/python3.7/site-packages/pyezviz/camera.py", line 97, in status
'follow_move': self._switch[TYPE_FOLLOW_MOVE]['enable'],
KeyError: 25
So it seems that when it try to Setup the followmove part that is not there for my camera it crash.
By the way I am an Italian user
I've followed the latest suggestions as putting the ffmpeg: in configuration, the autogenerated username, etc. but I was still getting a "KeyError: 25".
Than I've updated the camera firmware to the latest version and played a bit with the app profile settings, like "my shares" ( or similar I've the app in my native language ), cloudplay or "logout 3rd party account", just opening the menus, I've changed nothing.
I don't know what exactly did the trick but now it works.
Maybe it can helps someone.
Can you post some image about the app config?
Which camera di you nave?
Can you post some image about the app config?
Which camera di you nave?
I have a cs-cv310.
I was talking about the android app, If it wasn't clear, with default settings.
I've followed the latest suggestions as putting the ffmpeg: in configuration, the autogenerated username, etc. but I was still getting a "KeyError: 25".
Than I've updated the camera firmware to the latest version and played a bit with the app profile settings, like "my shares" ( or similar I've the app in my native language ), cloudplay or "logout 3rd party account", just opening the menus, I've changed nothing.
I don't know what exactly did the trick but now it works.
Maybe it can helps someone.
Updating to the newest camera firmware did the trick for me. Thanks for the suggestion!
All my cameras are updated but I still have the issue.
Which app do you use?
I've got an iPhone with Ezviz official app
Ciao
Damiano
Il giorno dom 10 mag 2020 alle ore 11:30 Eduard Uffelmann <
[email protected]> ha scritto:
I've followed the latest suggestions as putting the ffmpeg: in
configuration, the autogenerated username, etc. but I was still getting a
"KeyError: 25".Than I've updated the camera firmware to the latest version and played a
bit with the app profile settings, like "my shares" ( or similar I've the
app in my native language ), cloudplay or "logout 3rd party account", just
opening the menus, I've changed nothing.I don't know what exactly did the trick but now it works.
Maybe it can helps someone.
Updating to the newest camera firmware did the trick for me. Thanks for
the suggestion!—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/home-assistant/core/issues/32944#issuecomment-626299380,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ALNNRVMYDXFE64JGYZRFQ7TRQZX3HANCNFSM4LOYU6XA
.
I've android phone with ezviz official app a CTQ2C CS-CV206 camera with the last Sw available v5.2.7 build 200310 and I've the 25 Error that keeps coming, the configuration of the app is the out of the box one.
camera:
*you need to delete the brackets first.
Hi,
i try to write a recap about my studies on the component, hope to help @BaQs and the community to solve some issues.
I'm moving my first steps in python so i'm not already able to do commits. But i want to help.
I was one of the people that has this problem:
File "/srv/homeassistant/lib/python3.7/site-packages/pyezviz/camera.py", line 97, in status
'follow_move': self._switch[TYPE_FOLLOW_MOVE]['enable'],
KeyError: 25
i try to update my manifest version of pyezviz (in home assistant) but the problem was still here. So i comment manually all about motion detect on code (about 3 line of code, notthing hard) and the component seems to work correctly.
So i think that, with the version of pyezviz that is in the develop branch, maybe this problem will be solved. I don't know when will be release.
At this point there was another 2 problem:
So for solve the stream problem i try to empty the method stream_source(self) of ezviz component leaving only the return with my rtsp link (brutal simply string) and now the stream work. So i think there is a problem in that method, but i can't find it.
I'm starting to work on the services problem, hope to find something about.
Ciao,
provo a scrivere un riassunto dei miei studi sul componente, spero di aiutare @BaQs e la community a risolvere alcuni problemi.
Sto muovendo i miei primi passi in Python, quindi non sono già in grado di fare commit. Ma voglio aiutare.
Ero una delle persone che ha questo problema:File "/srv/homeassistant/lib/python3.7/site-packages/pyezviz/camera.py", line 97, in status 'follow_move': self._switch[TYPE_FOLLOW_MOVE]['enable'], KeyError: 25
provo ad aggiornare la mia versione manifest di pyezviz (in home assistant) ma il problema era ancora qui. Quindi commento manualmente tutto sul rilevamento del movimento sul codice (circa 3 righe di codice, niente di difficile) e il componente sembra funzionare correttamente.
Quindi penso che, con la versione di pyezviz che si trova nel ramo di sviluppo, forse questo problema sarà risolto. Non so quando sarà rilasciato.
A questo punto c'era un altro 2 problema:
- il flusso video non funzionava (il messaggio "... non supporta il servizio di riproduzione flusso" dei componenti predefiniti della videocamera.
- nessuno dei servizi menzionati nella pagina del componente ezviz era presente
Quindi per risolvere il problema del flusso provo a svuotare il metodo stream_source (self) del componente ezviz lasciando solo il ritorno con il mio link rtsp (brutale semplicemente stringa) e ora il flusso funziona. Quindi penso che ci sia un problema in quel metodo, ma non riesco a trovarlo.
Sto iniziando a lavorare sul problema dei servizi, spero di trovare qualcosa.
hi
can show the 3 line of code you comment ? i will try to follow youre way...
thank you
hi everybody,
I solved the issue of FOLLOW_MOVE just commenting all lines where this parameter was used in the camera-py. My cameras have not this option so it could be ok to me. Now The component starts correctly, I can see camera properties but.... two random cameras have been defined in HA (not the one I put in my config) and no serves have been created at all...
Any answers yet, been fiddling with CS-CV310 for some time trying to get it connected. Have read through all the posts here and tried everything to no avail so far. But now I will try a little harder as I see the matter hasn't been solved yet - I'm no programmer, I just dabble and delve when needs amust.
Ciao,
provo a scrivere un riassunto dei miei studi sul componente, spero di aiutare @BaQs e la community a risolvere alcuni problemi.
Sto muovendo i miei primi passi in Python, quindi non sono già in grado di fare commit. Ma voglio aiutare.
Ero una delle persone che ha questo problema:File "/srv/homeassistant/lib/python3.7/site-packages/pyezviz/camera.py", line 97, in status 'follow_move': self._switch[TYPE_FOLLOW_MOVE]['enable'], KeyError: 25
provo ad aggiornare la mia versione manifest di pyezviz (in home assistant) ma il problema era ancora qui. Quindi commento manualmente tutto sul rilevamento del movimento sul codice (circa 3 righe di codice, niente di difficile) e il componente sembra funzionare correttamente.
Quindi penso che, con la versione di pyezviz che si trova nel ramo di sviluppo, forse questo problema sarà risolto. Non so quando sarà rilasciato.
A questo punto c'era un altro 2 problema:
- il flusso video non funzionava (il messaggio "... non supporta il servizio di riproduzione flusso" dei componenti predefiniti della videocamera.
- nessuno dei servizi menzionati nella pagina del componente ezviz era presente
Quindi per risolvere il problema del flusso provo a svuotare il metodo stream_source (self) del componente ezviz lasciando solo il ritorno con il mio link rtsp (brutale semplicemente stringa) e ora il flusso funziona. Quindi penso che ci sia un problema in quel metodo, ma non riesco a trovarlo.
Sto iniziando a lavorare sul problema dei servizi, spero di trovare qualcosa.hi
can show the 3 line of code you comment ? i will try to follow youre way...
thank you
Hi i've made a pull request in the pyezviz project. I think you can see there what i've done.
If the fix will be part of a new release of pyezviz i will try to fix the HA component.
hi everybody,
I solved the issue of FOLLOW_MOVE just commenting all lines where this parameter was used in the camera-py. My cameras have not this option so it could be ok to me. Now The component starts correctly, I can see camera properties but.... two random cameras have been defined in HA (not the one I put in my config) and no serves have been created at all...
I've seen that the component add also my second camera (that i've not configured in configuration.yaml) so, maybe are some old referencies to old camera or passed wrong configuration in your account?
Hello, warm regards!
Ezviz integrations - it doesn't work for me.My Setting in configuration.yaml:
camera:
-
platform: ezvizusername: my username of ezviz password: my password of ezviz cameras: DXXXXXXXX: #DEVICE SERIAL username: my username of ezviz / my username of device #the same error occurs with both password: my username of ezviz / my username of device #the same error occurs with both
Registration details (ERROR)
Logger: homeassistant.components.camera
Source: components/ezviz/camera.py:49
Integration: Cámara (documentation, issues)
First occurred: 2:55:10 (1 occurrences)
Last logged: 2:55:10Error while setting up ezviz platform for camera
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 179, in _async_setup_platform
await asyncio.wait_for(asyncio.shield(task), SLOW_SETUP_MAX_WAIT)
File "/usr/local/lib/python3.7/asyncio/tasks.py", line 442, in wait_for
return fut.result()
File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(self.args, *self.kwargs)
File "/usr/src/homeassistant/homeassistant/components/ezviz/camera.py", line 49, in setup_platform
ezviz_client.login()
File "/usr/local/lib/python3.7/site-packages/pyezviz/client.py", line 240, in login
return self._login()
File "/usr/local/lib/python3.7/site-packages/pyezviz/client.py", line 87, in _login
sessionId = str(response_json["loginSession"]["sessionId"])
KeyError: 'loginSession'What is the problem?
Thank you for the support you can provide
When I changed location in Ezviz app to UK,I connect success
When I changed location in Ezviz app to UK,I connect success
I think the root cause is that when the plugin requests to https://apiieu.ezvizlife.com/v3/users/login
, you will receive a response to redirect a local api server. For example:
{"meta":{"code":1100,"message":"","moreInfo":null},"loginArea":{"apiDomain":"apiisgp.ezvizlife.com","webDomain":"isgp.ezvizlife.com","areaName":"","areaId":}}
Switching the app location to EU works for me as well.
how to switch the app location to EU ? as It's immutable
how to switch the app location to EU ? as It's immutable
Sorry. It is not a switching. I logged out and re-selected an EU country and signed up for a new account.
Same problem here my serial start with E is a ezviz C6N
Sorry wrong pwd used. Works good also with C6N
Hi, i am getting the following error.
Log Details (ERROR)
Logger: homeassistant.components.camera
Source: components/ezviz/camera.py:50
Integration: Camera (documentation, issues)
First occurred: 11:31:57 AM (1 occurrences)
Last logged: 11:31:57 AM
Error while setting up ezviz platform for camera
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 184, 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 "/usr/src/homeassistant/homeassistant/components/ezviz/camera.py", line 50, in setup_platform
cameras = ezviz_client.load_cameras()
File "/usr/local/lib/python3.8/site-packages/pyezviz/client.py", line 197, in load_cameras
cameras.append(camera.status())
File "/usr/local/lib/python3.8/site-packages/pyezviz/camera.py", line 96, in status
'state_led': self._switch[TYPE_STATE_LED]['enable'],
KeyError: 3
Most helpful comment
Sorry. It is not a switching. I logged out and re-selected an EU country and signed up for a new account.