fwestenberg / reolink_dev

Home Assistant Reolink addon
MIT License
550 stars 101 forks source link

ERROR (MainThread) [custom_components.reolink_dev] Unexpected error fetching reolink.cam data #442

Open garry0garry opened 2 years ago

garry0garry commented 2 years ago

Reolink RLC-520A. Hardware IPC_523128M5MP, fw v3.1.0.764_21121700, fwestenberg/reolink_dev v0.49, HACS v1.21.0 HA v2021.12.10, HTTP, HTTPS, RTSP and ONVIF protocols are enabled.

2022-02-02 23:14:50 ERROR (MainThread) [custom_components.reolink_dev] Unexpected error fetching reolink.cam2 data: Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 187, in _async_refresh self.data = await self._async_update_data() File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 147, in _async_update_data return await self.update_method() File "/config/custom_components/reolink_dev/init.py", line 98, in async_update_data await base.update_states() File "/config/custom_components/reolink_dev/base.py", line 250, in update_states await self._api.get_states() File "/usr/local/lib/python3.9/site-packages/reolink/camera_api.py", line 453, in get_states response = await self.send(body) File "/usr/local/lib/python3.9/site-packages/reolink/camera_api.py", line 1710, in send raise CredentialsInvalidError() reolink.exceptions.CredentialsInvalidError

garry0garry commented 2 years ago

HA v2022.2.9

2022-02-23 19:41:40 ERROR (MainThread) [custom_components.reolink_dev] Unexpected error fetching reolink.cam7 data: Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 187, in _async_refresh self.data = await self._async_update_data() File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 147, in _async_update_data return await self.update_method() File "/config/custom_components/reolink_dev/init.py", line 98, in async_update_data await base.update_states() File "/config/custom_components/reolink_dev/base.py", line 250, in update_states await self._api.get_states() File "/usr/local/lib/python3.9/site-packages/reolink/camera_api.py", line 453, in get_states response = await self.send(body) File "/usr/local/lib/python3.9/site-packages/reolink/camera_api.py", line 1710, in send raise CredentialsInvalidError() reolink.exceptions.CredentialsInvalidError

xannor commented 2 years ago

It says your credentials are bad, make sure you can log into the web interface with them, then remove/re-add the device from the integration and use the working credentials.

garry0garry commented 2 years ago

This message appears permanently. I guess we need to handle this exception.

garry0garry commented 2 years ago

HA v2022.3.5, HACS v1.23, Reolink IP camera v0.51

2022-03-21 07:59:26 ERROR (MainThread) [custom_components.reolink_dev] Unexpected error fetching reolink.cam10 data: Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 187, in _async_refresh self.data = await self._async_update_data() File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 147, in _async_update_data return await self.update_method() File "/config/custom_components/reolink_dev/init.py", line 98, in async_update_data await base.update_states() File "/config/custom_components/reolink_dev/base.py", line 255, in update_states await self._api.get_states() File "/usr/local/lib/python3.9/site-packages/reolink/camera_api.py", line 460, in get_states response = await self.send(body) File "/usr/local/lib/python3.9/site-packages/reolink/camera_api.py", line 1721, in send raise CredentialsInvalidError() reolink.exceptions.CredentialsInvalidError

garry0garry commented 2 years ago

HA 2022.3.8, HACS 1.24.3, Home Assistant Reolink addon 0.51 Reolink RLC-520A fw 3.1.0.764_21121700

10 records for 11 hours 2022-04-04 11:45:05 ERROR (MainThread) [custom_components.reolink_dev] Unexpected error fetching reolink.cam7 data: Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 187, in _async_refresh self.data = await self._async_update_data() File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 147, in _async_update_data return await self.update_method() File "/config/custom_components/reolink_dev/init.py", line 98, in async_update_data await base.update_states() File "/config/custom_components/reolink_dev/base.py", line 255, in update_states await self._api.get_states() File "/usr/local/lib/python3.9/site-packages/reolink/camera_api.py", line 460, in get_states response = await self.send(body) File "/usr/local/lib/python3.9/site-packages/reolink/camera_api.py", line 1721, in send raise CredentialsInvalidError() reolink.exceptions.CredentialsInvalidError

garry0garry commented 2 years ago

HA 2022.4.5, HACS 1.24.5, Home Assistant Reolink addon 0.52 Reolink RLC-520A fw 3.1.0.764_21121700

2022-04-17 19:23:12 ERROR (MainThread) [custom_components.reolink_dev] Unexpected error fetching reolink.cam8 data: Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 190, in _async_refresh self.data = await self._async_update_data() File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 150, in _async_update_data return await self.update_method() File "/config/custom_components/reolink_dev/init.py", line 98, in async_update_data await base.update_states() File "/config/custom_components/reolink_dev/base.py", line 255, in update_states await self._api.get_states() File "/usr/local/lib/python3.9/site-packages/reolink/camera_api.py", line 460, in get_states response = await self.send(body) File "/usr/local/lib/python3.9/site-packages/reolink/camera_api.py", line 1721, in send raise CredentialsInvalidError() reolink.exceptions.CredentialsInvalidError

ivarw commented 2 years ago

Same here:

This error originated from a custom integration.

Logger: homeassistant.config_entries Source: custom_components/reolink_dev/base.py:219 Integration: Reolink IP camera (documentation, issues) First occurred: 03:29:33 (1 occurrences) Last logged: 03:29:33

Error setting up entry Utekamera Vest for reolink_dev Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 335, in async_setup result = await component.async_setup_entry(hass, self) File "/config/custom_components/reolink_dev/init.py", line 75, in async_setup_entry if not await base.connect_api(): File "/config/custom_components/reolink_dev/base.py", line 219, in connect_api if not await self._api.get_settings(): File "/usr/local/lib/python3.9/site-packages/reolink/camera_api.py", line 496, in get_settings response = await self.send(body) File "/usr/local/lib/python3.9/site-packages/reolink/camera_api.py", line 1721, in send raise CredentialsInvalidError() reolink.exceptions.CredentialsInvalidError

dannytsang commented 2 years ago

I'm also getting the same error messages. When I restart, sometimes it works.

I have just removed and re-added twice to get it to work. The first time I got the same errors as what others have posted.