Always use base dsm host to format camera live view paths #137
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi @mib1185,
This PR introduces a change which should make everyone's life just a little bit easier: when setting up this module, we have to provide a hostname or IP for the Synology DSM connection. However, due to a number of reasons — such as Docker network configuration, multiple NICs being used, reverse proxies and others — the actual camera live view URL will always return the IP or host configuration that Synology believes to be more adequate.
However, think about this: we, as module consumers, configure the hostname or IP based on what we know about our own network setup and routing, to eventually receive back an unexpected — and potentially unreachable — URL of a camera's live view.
In my opinion, we can magically fix this by replacing whatever hostname or IP Synology Surveillance Station returns with the base URL configured in the module. It is guaranteed to succeed since connectivity has been achieved already.
My particular network configuration involves a bit of an elaborate macvlan setup inside Docker on Synology DSM, which makes the originally returned IP become unreachable due to host <> container network limitations in this network topology.
Example:
Before
nas.mywebsite.me
.rtsp://syno:[email protected]:554/Sms=1.unicast
After
nas.mywebsite.me
.rtsp://syno:[email protected]:554/Sms=1.unicast