starkillerOG / reolink_aio

Reolink NVR/camera API PyPI package
MIT License
68 stars 13 forks source link

Reolink Duo 2 is only a single "lens" stream #17

Closed SgtBatten closed 1 year ago

SgtBatten commented 1 year ago

Describe the bug I believe the duo 2 is being incorrectly polled for two lenses per stream. Unlike the duo (1) the duo 2 is a stitched image and cannot be viewed as a left and right stream. There is simply a main and sub stream, no lens 1 or 2 streams.

I think this is the cause of the below errors.

The RTSP error is also related as its looking at a url that doesnt exist. Preview_02. The GetEnc error is occuring despite me disabling all streams in the integration. (I do not want to view the streams as i have frigate for this, I only want the other entities for use in automations (lights, motion sensors etc) Hope this is an acceptable use case.

Source: components/reolink/host.py:193
First occurred: 19:55:25 (10 occurrences)
Last logged: 20:04:25

Host 192.168.1.82:443: command GetEnc response channel 0 does not equal requested channel 1
2023-04-10 19:53:25.591 ERROR (MainThread) [reolink_aio.api] Host 192.168.1.82:443: command GetEnc response channel 0 does not equal requested channel 1
2023-04-10 19:54:25.565 ERROR (MainThread) [reolink_aio.api] Host 192.168.1.82:443: command GetEnc response channel 0 does not equal requested channel 1
2023-04-10 19:55:25.567 ERROR (MainThread) [reolink_aio.api] Host 192.168.1.82:443: command GetEnc response channel 0 does not equal requested channel 1
2023-04-10 19:56:25.611 ERROR (MainThread) [reolink_aio.api] Host 192.168.1.82:443: command GetEnc response channel 0 does not equal requested channel 1
2023-04-10 19:57:25.572 ERROR (MainThread) [reolink_aio.api] Host 192.168.1.82:443: command GetEnc response channel 0 does not equal requested channel 1
2023-04-10 19:58:25.634 ERROR (MainThread) [reolink_aio.api] Host 192.168.1.82:443: command GetEnc response channel 0 does not equal requested channel 1
2023-04-10 19:59:25.605 ERROR (MainThread) [reolink_aio.api] Host 192.168.1.82:443: command GetEnc response channel 0 does not equal requested channel 1
2023-04-10 19:59:52.432 ERROR (stream_worker) [homeassistant.components.stream.stream.camera.front_sub_lens_1] Error from stream worker: Error opening stream (HTTP_NOT_FOUND, Server returned 404 Not Found) rtsp://****:****@192.168.1.82:554/h264Preview_02_sub
2023-04-10 20:00:25.617 ERROR (MainThread) [reolink_aio.api] Host 192.168.1.82:443: command GetEnc response channel 0 does not equal requested channel 1
2023-04-10 20:01:25.564 ERROR (MainThread) [reolink_aio.api] Host 192.168.1.82:443: command GetEnc response channel 0 does not equal requested channel 1
2023-04-10 20:02:25.625 ERROR (MainThread) [reolink_aio.api] Host 192.168.1.82:443: command GetEnc response channel 0 does not equal requested channel 1
2023-04-10 20:03:25.607 ERROR (MainThread) [reolink_aio.api] Host 192.168.1.82:443: command GetEnc response channel 0 does not equal requested channel 1
2023-04-10 20:04:25.628 ERROR (MainThread) [reolink_aio.api] Host 192.168.1.82:443: command GetEnc response channel 0 does not equal requested channel 1

To Reproduce Add reolink duo 2 poe to the HA integration.

Expected behavior No errors

Screenshots image

Environment:

No NVR other than frigate. Reolink Duo 2 Poe

Model
Reolink Duo 2 PoE
UID
95270004FG80D5TV
Build No.
build 23031700
Hardware No.
IPC_529B17B8MP
Config Version
v3.0.0.0
Firmware Version
v3.0.0.1889_23031700
Details
IPC_529B17B8MPS10E1W01100000001

Additional context Add any other context about the problem here.

starkillerOG commented 1 year ago

This commit should resolve the issue: https://github.com/starkillerOG/reolink_aio/commit/130fb099b74076c260c09f746bffebeb1f98cbfa. I will publish a new reolink-aio version within a few days and bump the HomeAssistant dependancy. After that is schould be fixed in a patch release of HomeAssistant.

I will let you know when the fix is available in HomeAssistant.

starkillerOG commented 1 year ago

If you appreciate the reolink integration and want to support its development, please consider sponsering the upstream library.