QuantumEntangledAndy / neolink

An RTSP bridge to Reolink IP cameras
GNU Affero General Public License v3.0
247 stars 39 forks source link

Failed connection to Argus Eco Ultra #239

Closed CodeFatherG closed 2 months ago

CodeFatherG commented 2 months ago

Describe the bug

Missing field in the connection to reolink Argus Eco Ultra Custom("missing field time_r").

To Reproduce

Steps to reproduce the behavior. Example:

  1. Create this configuration file:
    
    bind = "0.0.0.0"

[[users]]

name = "admin"

pass = ...

[[cameras]] name = "front" username = "admin" password = ... address = ... uid = ...

idle_disconnect = true

[cameras.pause]

on_motion = true # Should pause when no motion

on_client = true # Should pause when no rtsp client

timeout = 2.1 # How long to wait after motion stops before pausing

[mqtt]

broker_addr = "127.0.0.1"

port = 1883

credentials = ...

2. Launch Neolink using `docker compose up`

version: '3.8' services: neolink: image: quantumentangledandy/neolink container_name: neolink ports:

Logs

neolink  | [2024-04-23T12:25:36Z INFO  neolink::common::camthread] front: Attempt reconnect in 200ms
neolink  | [2024-04-23T12:25:36Z INFO  neolink::utils] front: Connecting to camera at Address: ..., UID: ...
neolink  | [2024-04-23T12:25:36Z INFO  neolink_core::bc_protocol] front: Trying TCP discovery
neolink  | [2024-04-23T12:25:36Z INFO  neolink_core::bc_protocol] front: Trying local discovery
neolink  | [2024-04-23T12:25:52Z INFO  neolink_core::bc_protocol] front: Registration with reolink servers failed. Retrying: 1/10
neolink  | [2024-04-23T12:25:54Z INFO  neolink_core::bc_protocol] front: Trying remote discovery
neolink  | [2024-04-23T12:25:54Z ERROR neolink_core::bcudp::de] decrypted_payload: Ok("<P2P>\n<D2C_CFM>\n<sid>99309508</sid>\n<conn>local</conn>\n<rsp>0</rsp>\n<cid>414534447</cid>\n<did>145</did>\n</D2C_CFM>\n</P2P>\n")
neolink  | [2024-04-23T12:25:54Z ERROR neolink_core::bcudp::de] e: Custom("missing field `time_r`")
neolink  | [2024-04-23T12:25:54Z INFO  neolink_core::bc_protocol] front: Trying map discovery
neolink  | [2024-04-23T12:25:54Z INFO  neolink_core::bc_protocol] front: Trying relay discovery
neolink  | [2024-04-23T12:26:09Z WARN  neolink::common::camthread] front: Connection Lost: Failed to connect to camera front at Address: ..., UID: ... on channel 0
neolink  |
neolink  |     Caused by:
neolink  |         Timed out while waiting for camera reply

Versions

Neolink software: Neolink d354b90976f3c542cc2bf061e44cc5d06da0b3bc release Reolink camera model and firmware: Argus Eco Ultra v3.0.0.2773_23100910

CodeFatherG commented 2 months ago

Stripping down my config to the following and referencing https://github.com/QuantumEntangledAndy/neolink/issues/234 config got me past this error but now shows the same error as the referenced issue.

bind = "0.0.0.0"

[[cameras]]
name = "front"
discovery = "local"
username = "admin"
password = ...
address = ...
uid = ...
idle_disconnect = true
stream = "Main"
neolink  | [2024-04-23T13:06:41Z INFO  neolink::utils] front: Connecting to camera at Address: ..., UID: ...
neolink  | [2024-04-23T13:06:41Z INFO  neolink_core::bc_protocol] front: Trying TCP discovery
neolink  | [2024-04-23T13:06:41Z INFO  neolink_core::bc_protocol] front: Trying local discovery
neolink  | [2024-04-23T13:06:41Z INFO  neolink_core::bc_protocol] front: Local discovery success ... at ...:36254
neolink  | [2024-04-23T13:06:41Z INFO  neolink::utils] front: Logging in
neolink  | [2024-04-23T13:06:42Z INFO  neolink::utils] front: Connected and logged in
neolink  | [2024-04-23T13:06:45Z INFO  neolink::common::camthread] front: Camera time is already set: 2024-04-23 23:06:40.0 -10:00:00
neolink  | [2024-04-23T13:06:47Z WARN  neolink::common::camthread] front: Connection Lost: Nom Parsing error: Nom Error: VerboseError { errors: [([], Nom(MapRes)), ([], Context("Unable to parse Extension XML"))] }

My installation is using the docker image, which I am pulling and building afresh as I type this. I would have guessed this would pull the latest release being 0.6.2 as referenced by the linked issue as resolving the issue.

QuantumEntangledAndy commented 2 months ago

So if your using the top of development (latest tag) instead of using the last release you can expect issues like this. Especially when there is a major change going on. Specifically I'll link to the relevant post in another issue

https://github.com/QuantumEntangledAndy/neolink/issues/236#issuecomment-2056998064

This has actually already been fixed on a dev branch but I'm waitig for tester to report back