reolink_dev icon indicating copy to clipboard operation
reolink_dev copied to clipboard

Notification email switch entity missing

Open chris626w opened this issue 2 years ago • 13 comments

I had a single RLC-520A with quite an old firmware version probablyV3.0.0.177, running successfully with the Reolink IP Camera integration, release v0.46.

Yesterday (2022-03-07) I upgraded the existing camera firmware to the latest v3.1.0.764 and at the same time added 2 new 520A cameras to the Reolink integration. Since doing this, the email notification switch entity is no longer connected for any of the 3 cameras. However email notification is still available in the Reolink app.

The email switch entity is an important part of controlling the cameras from Home Assistant. Below are 2 excerpts from the log referencing the Reolink integration. The original camera where the email switch had worked is outside_rear.

Is this a problem with the camera firmware update or with the Reolink integration? Either way is it something that could be investigated and be corrected?

2022-03-07 19:52:57 ERROR (MainThread) [custom_components.reolink_dev.base] Host 192.168.0.71 subscription failed to its webhook, base object state will be set to NotAvailable 2022-03-07 19:52:57 ERROR (MainThread) [custom_components.reolink_dev.base] Host 192.168.0.71 error renewing the Reolink subscription 2022-03-07 19:52:58 ERROR (MainThread) [custom_components.reolink_dev.base] Host 192.168.0.72 subscription failed to its webhook, base object state will be set to NotAvailable 2022-03-07 19:52:58 ERROR (MainThread) [custom_components.reolink_dev.base] Host 192.168.0.73 subscription failed to its webhook, base object state will be set to NotAvailable 2022-03-07 19:52:58 ERROR (MainThread) [custom_components.reolink_dev.base] Host 192.168.0.72 error renewing the Reolink subscription 2022-03-07 19:52:58 ERROR (MainThread) [custom_components.reolink_dev.base] Host 192.168.0.73 error renewing the Reolink subscription

2022-03-07 19:53:00 ERROR (stream_worker) [homeassistant.components.stream.stream.camera.outside_rear] Error from stream worker: Error opening stream (ERRORTYPE_111, Connection refused) rtsp://:@192.168.0.71:554/h264Preview_01_sub 2022-03-07 19:53:10 ERROR (stream_worker) [homeassistant.components.stream.stream.camera.outside_rear] Error from stream worker: Error opening stream (ERRORTYPE_111, Connection refused) rtsp://:@192.168.0.71:554/h264Preview_01_sub 2022-03-07 19:53:30 ERROR (stream_worker) [homeassistant.components.stream.stream.camera.outside_rear] Error from stream worker: Error opening stream (ERRORTYPE_111, Connection refused) rtsp://:@192.168.0.71:554/h264Preview_01_sub 2022-03-07 19:53:58 ERROR (MainThread) [custom_components.reolink_dev.base] Host 192.168.0.73 error renewing the Reolink subscription 2022-03-07 19:53:58 ERROR (MainThread) [custom_components.reolink_dev.base] Host 192.168.0.72 error renewing the Reolink subscription 2022-03-07 19:53:58 ERROR (MainThread) [custom_components.reolink_dev.base] Host 192.168.0.71 error renewing the Reolink subscription 2022-03-07 19:54:00 ERROR (stream_worker) [homeassistant.components.stream.stream.camera.outside_rear] Error from stream worker: Error opening stream (ERRORTYPE_111, Connection refused) rtsp://:@192.168.0.71:554/h264Preview_01_sub 2022-03-07 19:54:40 ERROR (stream_worker) [homeassistant.components.stream.stream.camera.outside_rear] Error from stream worker: Error opening stream (ERRORTYPE_111, Connection refused) rtsp://:@192.168.0.71:554/h264Preview_01_sub 2022-03-07 19:54:58 ERROR (MainThread) [custom_components.reolink_dev.base] Host 192.168.0.71 error renewing the Reolink subscription 2022-03-07 19:54:58 ERROR (MainThread) [custom_components.reolink_dev.base] Host 192.168.0.72 error renewing the Reolink subscription 2022-03-07 19:54:58 ERROR (MainThread) [custom_components.reolink_dev.base] Host 192.168.0.73 error renewing the Reolink subscription 2022-03-07 19:55:30 ERROR (stream_worker) [homeassistant.components.stream.stream.camera.outside_rear] Error from stream worker: Error opening stream (ERRORTYPE_111, Connection refused)

chris626w avatar Mar 08 '22 09:03 chris626w

HA 2022.3 not supported yet. Sorry

cpainchaud avatar Mar 08 '22 22:03 cpainchaud

Thanks for getting back! Is there anywhere I can see supported HA versions?

chris626w avatar Mar 10 '22 14:03 chris626w

I have just deleted all the cameras and then reinstalled one to check logs. These errors came back which may be helpful for bug fixing

Host 192.168.0.71 error renewing the Reolink subscription 15:05:42 – (ERROR) Reolink IP camera (custom integration) - message first occurred at 15:04:42 and shows up 2 times Detected code that uses str (config) for entity category. This is deprecated and will stop working in Home Assistant 2022.4, it should be updated to use EntityCategory instead. Please report this issue. 15:04:42 – (WARNING) helpers/frame.py - message first occurred at 15:04:42 and shows up 6 times Host 192.168.0.71 subscription failed to its webhook, base object state will be set to NotAvailable 15:04:42 – (ERROR) Reolink IP camera (custom integration)

chris626w avatar Mar 10 '22 15:03 chris626w

please try 0.51 , now please note that if you keep mixing internal non-HTTP with external HTTPS address, it's not supported by HomeAssistant themselves

cpainchaud avatar Mar 14 '22 09:03 cpainchaud

Hi Christophe Not sure to continue this conversation here or on Github, let me know! I have just now been able to install 0.51 but I'm still getting errors. See below

I am running Core 2022.3.3 Superviser 2022.03.4 HAOS 7.4

Regarding http and https, I am using Duckdns which I understand requires me to use https both internally and externally. I have NAT loopback enabled in my router. I can only install the Reolink integration with https ticked. I understand that this means everything is on https, not mixed. Is this correct? However, does this mean the binary_sensor.motion will not work as stated in the documentation? I think the cameras only use http, so I am quite confused here.

2022-03-16 18:11:59 ERROR (MainThread) [custom_components.reolink_dev.config_flow] Unexpected exception Traceback (most recent call last): File "/config/custom_components/reolink_dev/config_flow.py", line 70, in async_step_user self.info = await self.async_validate_input(self.hass, user_input) File "/config/custom_components/reolink_dev/config_flow.py", line 138, in async_validate_input if not await self.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 1652, in send if not await self.login(): File "/usr/local/lib/python3.9/site-packages/reolink/camera_api.py", line 845, in login response = await self.send(body, param) File "/usr/local/lib/python3.9/site-packages/reolink/camera_api.py", line 1714, in send raise ApiError( reolink.exceptions.ApiError: API returned HTTP status ERROR code 400/Bad Request 2022-03-16 18:12:23 ERROR (MainThread) [custom_components.reolink_dev.base] Host 192.168.0.71 subscription failed to its webhook, base object state will be set to NotAvailable 2022-03-16 18:12:23 ERROR (MainThread) [custom_components.reolink_dev.base] Host 192.168.0.71 error renewing the Reolink subscription 2022-03-16 18:13:23 ERROR (MainThread) [custom_components.reolink_dev.base] Host 192.168.0.71 error renewing the Reolink subscription 2022-03-16 18:14:23 ERROR (MainThread) [custom_components.reolink_dev.base] Host 192.168.0.71 error renewing the Reolink subscription

On Mon, 14 Mar 2022 at 09:05, Christophe Painchaud @.***> wrote:

please try 0.51 , now please note that if you keep mixing internal non-HTTP with external HTTPS address, it's not supported by HomeAssistant themselves

— Reply to this email directly, view it on GitHub https://github.com/fwestenberg/reolink_dev/issues/464#issuecomment-1066537210, or unsubscribe https://github.com/notifications/unsubscribe-auth/AXQGZZXNHEF4KXRWAVLHR3DU736NZANCNFSM5QF2K7LQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you authored the thread.Message ID: @.***>

chris626w avatar Mar 17 '22 10:03 chris626w

Hi, I'm new to HA, installed today ;). I have two E1 Zoom and two 520A cameras. HA is 2022.4.6, reolink_dev cloned from github. I agree, in 520A e-mail switch is not available. On E1 Zoom it is.

pedro042 avatar Apr 23 '22 18:04 pedro042

New information - just installed ONVIF integration and email setting is missing too. There is very recent firmware released 18-Apr-2022. 10. Solved some bugs of Email alert I'm afraid of to try this firmware because it's for IPC_523128M5MP HW version, but my cameras are IPC_523128M5MP_V2 and _V2 is not mentioned. I'm afraid of bricking the device. Someone else can try to update the firmware. Maybe the issue is in camera itself.

pedro042 avatar Apr 23 '22 21:04 pedro042

I got in touch with Reolink` they promised to forward the bug report to theirs developers. I just bought 3rd RLC-520A, this time the hardware version is without _V2 and multiple firmware version are available for this model version. Firmware IPC_523128M5MP.494_21073000 works well - the e-mail switch does the job. Since IPC_523128M5MP.764_21121700 (include the latest firmware IPC_523128M5MP.951_22041566) it's broken. I reported it to Reolink. I think the issue is in the firmware, not in this software.

pedro042 avatar May 02 '22 23:05 pedro042

Just update my 510WA to latest v3.1.0.764_21121712 firmware and email switch got missing. It was there before but wasn't working as expected https://github.com/fwestenberg/reolink_dev/issues/558

majkers avatar Aug 31 '22 12:08 majkers

Anyone that do not have email switch: can you please check this enpoint:

http://[CAMERA_IP]/api.cgi?cmd=getEmail&user=[USER]&password=[PASSWORD]

and if it is not working then this one:

http://[CAMERA_IP]/api.cgi?cmd=getEmailV20&user=[USER]&password=[PASSWORD]

I think that there might be a problem that this integration is using the first one and setEmail no setEmailV20

majkers avatar Sep 01 '22 13:09 majkers

You're right - on my E1 Zoom works the first URL (and the switch) on my RLC-520A works the second (V20) and the switch doesn't work.

pedro042 avatar Sep 01 '22 14:09 pedro042

The API call is a part of reolink repo, https://github.com/fwestenberg/reolink , not part of this repo.

pedro042 avatar Sep 01 '22 14:09 pedro042

I've just submitted an issue there https://github.com/fwestenberg/reolink/issues/93

majkers avatar Sep 01 '22 14:09 majkers