Closed fribse closed 3 years ago
Could you please take a look at this issue @oblogic7? Thanks 👍
The attached logs are showing errors for QNAP integration not QVR Pro integration.
Regarding QVR Pro connectivity, I think it will work by specifying port 443 on the config. This will be possible once #33070 is released.
@oblogic7 Sorry about the log, I've corrected the original post. I tried giving the https port (which is not 443), and that just messed this up even more in the current release.
same thing here... not showing anything, just a "Green check" on the cameras
@principino1984 That image is generated by QVR Pro. I have a single camera that shows that image as well. I'm not sure what causes QVR to show that image, but my theory is that it has to do with the stream format and QVR Pro not being able to relay/transcode it for use via their endpoint. I will dig into it further.
I tried giving the https port (which is not 443), and that just messed this up even more in the current release.
@fribse Can you elaborate on what you mean by messed it up even more? Are the logs from trying configuration on original port or from using secure port?
@oblogic7 Sorry, I think the problem I have posted is very different from @principino1984.
I have both a http on 8080 and https port that is non-standard. I usually have the setting 'secure only' set up, I've disabled that for now. The QNAP has a verifiable certificate on the https.
In the configuration I have given no port. If I gave it a port number at that time (like private.url.dk:1000), the URL was shown like this in the log: http://private.url.dk:1000:8080 I will retest now that it's on .108.2
Ok, it sort of shows the same problem:
2020-04-10 13:34:13 WARNING (MainThread) [homeassistant.setup] Setup of qvr_pro is taking over 10 seconds.
2020-04-10 13:46:06 ERROR (MainThread) [homeassistant.setup] Error during setup of component qvr_pro
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/requests/models.py", line 380, in prepare_url
scheme, auth, host, port, path, query, fragment = parse_url(url)
File "/usr/local/lib/python3.7/site-packages/urllib3/util/url.py", line 392, in parse_url
return six.raise_from(LocationParseError(source_url), None)
File "<string>", line 3, in raise_from
urllib3.exceptions.LocationParseError: Failed to parse: http://private.url:1000:None/cgi-bin/authLogin.cgi
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/setup.py", line 175, in _async_setup_component
component.setup, hass, processed_config # type: ignore
File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/src/homeassistant/homeassistant/components/qvr_pro/__init__.py", line 58, in setup
qvrpro = Client(user, password, host, port=port)
File "/usr/local/lib/python3.7/site-packages/pyqvrpro/client.py", line 20, in __init__
self.connect()
File "/usr/local/lib/python3.7/site-packages/pyqvrpro/client.py", line 33, in connect
response = requests.get(login_url, params=params)
File "/usr/local/lib/python3.7/site-packages/requests/api.py", line 76, in get
return request('get', url, params=params, **kwargs)
File "/usr/local/lib/python3.7/site-packages/requests/api.py", line 61, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 516, in request
prep = self.prepare_request(req)
File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 459, in prepare_request
hooks=merge_hooks(request.hooks, self.hooks),
File "/usr/local/lib/python3.7/site-packages/requests/models.py", line 314, in prepare
self.prepare_url(url, params)
File "/usr/local/lib/python3.7/site-packages/requests/models.py", line 382, in prepare_url
raise InvalidURL(*e.args)
requests.exceptions.InvalidURL: Failed to parse: http://private.url:1000:None/cgi-bin/authLogin.cgi
This is a bug with the library. I will try to work up a fix for it this weekend.
@oblogic7 sounds great.
@fribse #33901 should fix the error.
@fribse Also, please make sure that you are specifying the port according to the docs. It should not be specified as part of the host.
Sounds very interesting, how do I test it?
Depends on your setup. I use straight Docker for my vanilla HA Core deployment, which means I can build with the container tagged as RC to get the change. I'm not sure how to do it for HASS.io.
I can see that it has been merged into the dev, how do I see for which release, is it for 0.109
@oblogic7,Oh, I can connect now, wasn't aware of the PORT setting, but I have to set it to non-encrypted connection, it fails on https (even with the correct hostname/url). Oh, and the one RTSP camera (Sonoff GK-200MP2-B) that is connected to the QNAP just shows the symbol mentioned by principino1984. The others, Hikvision, works fine.
Same here 1 Dahua works the other showing only icon
Still working with QVR support on this issue. Hope to have a resolution soon.
I also have one camera that shows the correct view (channel 1 - Foscam) and one camera with just the icon aforementioned (channel 2 - Ezviz Doorbell Camera). If there's anymore information I can provide to help resolve the issue, please let me know.
Has there been any resolution to this> I've only just tried setting it up and I had to turn off hte "Force secure connection (HTTPS) only" option in QVR. After getting that, I just get the camera and green tick image.
Unfortunately, QVR support was not helpful with this issue and I haven't found any way around the camera icon being shown instead of the stream.
Ok, so the camera icon issue still exists. I was banging my head thinking its something to do with my configuration.
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.
The problem
Can't connect, full rights given to the user. It seems that it can't connect with https, it has both http and https access, but will of course default to https. It is not currently set up to force https. The nas has a proper certificate, and the URL suits the certificate, but it seems to try and connect via IP instead? The port it shows in the log is the https port.
Environment
Problem-relevant
configuration.yaml
From the configuration
Traceback/Error logs
Additional information
QNAP QTS 4.4.1.16