Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Unexpected error fetching ezviz_cloud data: None is not a valid SoundMode #117

Open
marcob79 opened this issue Aug 18, 2022 · 5 comments
Open
Labels
bug Something isn't working

Comments

@marcob79
Copy link

Looking at home assistant logs i noticed rhw following error related to my ezviz c1c.
I have all the latest released version of both home assistant 2022.8.5 and plugin

`This error originated from a custom integration.

Logger: custom_components.ezviz_cloud.coordinator
Source: custom_components/ezviz_cloud/coordinator.py:41
Integration: Ezviz(Beta)
First occurred: August 17, 2022 at 04:10:40 (3 occurrences)
Last logged: 04:29:49

Unexpected error fetching ezviz_cloud data: None is not a valid SoundMode
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 205, in _async_refresh
self.data = await self._async_update_data()
File "/config/custom_components/ezviz_cloud/coordinator.py", line 41, in _async_update_data
return await self.hass.async_add_executor_job(
File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/local/lib/python3.10/site-packages/pyezviz/client.py", line 523, in load_cameras
self._cameras[device] = EzvizCamera(self, device, data).status()
File "/usr/local/lib/python3.10/site-packages/pyezviz/camera.py", line 141, in status
"alarm_sound_mod": SoundMode(
File "/usr/local/lib/python3.10/enum.py", line 385, in call
return cls.new(cls, value)
File "/usr/local/lib/python3.10/enum.py", line 710, in new
raise ve_exc
ValueError: None is not a valid SoundMode
`

@DynaFab
Copy link

DynaFab commented Dec 15, 2022

Hi,

Same problem here :
Not exactly the same log but a problem with sound mode too.

**
Logger: homeassistant.components.ezviz.coordinator
Source: components/ezviz/coordinator.py:32
Integration: EZVIZ (documentation, issues)
First occurred: 12:27:21 (196 occurrences)
Last logged: 17:32:12

Unexpected error fetching ezviz data: -1 is not a valid SoundMode
Unexpected error fetching ezviz data: None is not a valid SoundMode
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 225, in _async_refresh
self.data = await self._async_update_data()
File "/usr/src/homeassistant/homeassistant/components/ezviz/coordinator.py", line 38, in _async_update_data
return await self.hass.async_add_executor_job(self._update_data)
File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/src/homeassistant/homeassistant/components/ezviz/coordinator.py", line 32, in _update_data
return self.ezviz_client.load_cameras()
File "/usr/local/lib/python3.10/site-packages/pyezviz/client.py", line 523, in load_cameras
self._cameras[device] = EzvizCamera(self, device, data).status()
File "/usr/local/lib/python3.10/site-packages/pyezviz/camera.py", line 141, in status
"alarm_sound_mod": SoundMode(
File "/usr/local/lib/python3.10/enum.py", line 385, in call
return cls.new(cls, value)
File "/usr/local/lib/python3.10/enum.py", line 710, in new
raise ve_exc
ValueError: -1 is not a valid SoundMode

@RenierM26 RenierM26 added the bug Something isn't working label Dec 19, 2022
@RenierM26
Copy link
Owner

Hi All,

This happens when the integration can't get all data from EZVIZ (Usually by some or other transient network condition)

It should auto correct though?

I will add error logic to prevent this Exception from raising but it's a bit down on the priority list.

@RenierM26
Copy link
Owner

Hi @DynaFab,

Did you set the Alarm sound to something other than "Intense", "soft", "mute"? I think -1 indicates some other condition. Do you know what model the camera is generating the error?

@DynaFab
Copy link

DynaFab commented Dec 19, 2022

Hi @RenierM26
Thank you for the support.
Sorry, I uninstalled the integration and switched my personnal Hikvision NVR to Hik-connect.
But ... I have another NVR at work and I just tried again
I don't have the possibility to make settings. I just filled my ID & password + url : apiieu.ezvizlife.com and the integration reloads in a loop.
Thumbnail red message : "Retry configuration: None".
Default configuration (Delay time 25 and no args to ffmpeg). Nothing about eziz in configuration.yaml
Tell me if you wants me to make some tests.

@alexgraupera
Copy link

alexgraupera commented Mar 1, 2023

Hi @RenierM26!

I have the same "None is not a valid SoundMode" problem from a few months ago.
I have two CTQ3W cameras.
In the application there are three "Device Alarm Mode" : "Intense, Soft and Silent Mode"

If you want some additional information, you just have to ask ;-)

Thanks you in advance!

Edit: Sorry, my cameras are configured on "Silent Mode".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants