ha-ezviz icon indicating copy to clipboard operation
ha-ezviz copied to clipboard

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

Open marcob79 opened this issue 2 years ago • 5 comments

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 `

marcob79 avatar Aug 18 '22 12:08 marcob79

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

DynaFab avatar Dec 15 '22 16:12 DynaFab

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 avatar Dec 19 '22 05:12 RenierM26

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?

RenierM26 avatar Dec 19 '22 07:12 RenierM26

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.

DynaFab avatar Dec 19 '22 23:12 DynaFab

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".

alexgraupera avatar Mar 01 '23 06:03 alexgraupera