that’s odd it shouldn’t be using zeep, i suspect there are some left overs from the zeep version of the onvif module.
Maybe try pip uninstall onvif?
i’m not sure how to do this on hassio, as I usually just backup to tar then reflash, then copy the tar into /backup then restore.
I’m actually on a docker container for my implementation so not sure if that matters. I did try to run an uninstall for onvif and got this:
/usr/src/app# pip uninstall onvif
Cannot uninstall requirement onvif, not installed
I’m using hassbian and hassio running in docker on debian desktop.
pip uninstall onvif
pip uninstall onvif-py3
pip uninstall zeep
I was able to uninstall onvif-py3 (though that looks like it was reinstalled per the logs) and zeep and got the error below when I restarted. It looks like I’m back to the Error 400 again, but I’m definitely on the right ip, port, username and password. Any way to troubleshoot why this error when other onvif tools work correctly with the same ports and creds?
2017-11-26 16:43:03 INFO (SyncWorker_16) [homeassistant.util.package] Attempting install of onvif-py3==0.1.3
2017-11-26 16:43:03 WARNING (MainThread) [homeassistant.setup] Setup of camera is taking over 10 seconds.
2017-11-26 16:43:17 INFO (SyncWorker_18) [homeassistant.util.package] Attempting install of http://github.com/tgaugry/suds-passworddigest-py3/archive/86fc50e39b4d2b8997481967d6a7fe1c57118999.zip#suds-passworddigest-py3==0.1.2a
2017-11-26 16:43:28 INFO (MainThread) [homeassistant.components.camera] Setting up camera.onvif
2017-11-26 16:43:28 DEBUG (MainThread) [custom_components.camera.onvif] ONVIF Version: 201711262117 - Attempting to communicate with ONVIF Camera: 192.168.1.76 on port 8000
2017-11-26 16:43:38 ERROR (MainThread) [custom_components.camera.onvif] Unable to communicate with ONVIF Camera: Unknown error: (400, ‘Bad Request’)
2017-11-26 16:43:38 ERROR (MainThread) [homeassistant.components.camera] Error while setting up platform onvif
Traceback (most recent call last):
File “/usr/local/lib/python3.6/site-packages/suds/transport/http.py”, line 78, in send
fp = self.u2open(u2request)
File “/usr/local/lib/python3.6/site-packages/suds/transport/http.py”, line 119, in u2open
return url.open(u2request, timeout=tm)
File “/usr/local/lib/python3.6/urllib/request.py”, line 532, in open
response = meth(req, response)
File “/usr/local/lib/python3.6/urllib/request.py”, line 642, in http_response
‘http’, request, response, code, msg, hdrs)
File “/usr/local/lib/python3.6/urllib/request.py”, line 570, in error
return self._call_chain(*args)
File “/usr/local/lib/python3.6/urllib/request.py”, line 504, in _call_chain
result = func(*args)
File “/usr/local/lib/python3.6/urllib/request.py”, line 650, in http_error_default
raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 400: Bad Request
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “/usr/local/lib/python3.6/site-packages/suds/client.py”, line 652, in send
reply = transport.send(request)
File “/usr/local/lib/python3.6/site-packages/suds/transport/http.py”, line 178, in send
return HttpTransport.send(self, request)
File “/usr/local/lib/python3.6/site-packages/suds/transport/http.py”, line 86, in send
raise TransportError(e.msg, e.code, e.fp)
suds.transport.TransportError: Bad Request
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “/config/deps/lib/python3.6/site-packages/onvif/client.py”, line 34, in wrapped
return func(*args, **kwargs)
File “/config/deps/lib/python3.6/site-packages/onvif/client.py”, line 201, in wrapped
return call(params, callback)
File “/config/deps/lib/python3.6/site-packages/onvif/client.py”, line 191, in call
ret = func(**params)
File “/usr/local/lib/python3.6/site-packages/suds/client.py”, line 559, in call
return client.invoke(args, kwargs)
File “/usr/local/lib/python3.6/site-packages/suds/client.py”, line 618, in invoke
result = self.send(soapenv)
File “/usr/local/lib/python3.6/site-packages/suds/client.py”, line 664, in send
result = self.failed(binding, e)
File “/usr/local/lib/python3.6/site-packages/suds/client.py”, line 726, in failed
raise Exception((status, reason))
Exception: (400, ‘Bad Request’)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “/usr/src/app/homeassistant/helpers/entity_component.py”, line 171, in _async_setup_platform
SLOW_SETUP_MAX_WAIT, loop=self.hass.loop)
File “/usr/local/lib/python3.6/asyncio/tasks.py”, line 358, in wait_for
return fut.result()
File “/usr/local/lib/python3.6/asyncio/futures.py”, line 245, in result
raise self._exception
File “/usr/local/lib/python3.6/asyncio/tasks.py”, line 180, in _step
result = coro.send(None)
File “/usr/local/lib/python3.6/asyncio/coroutines.py”, line 210, in coro
res = func(*args, **kw)
File “/config/custom_components/camera/onvif.py”, line 50, in async_setup_platform
async_add_devices([ONVIFCameraHASS(hass, config)])
File “/config/custom_components/camera/onvif.py”, line 72, in init
profiles = media_service.GetProfiles()
File “/config/deps/lib/python3.6/site-packages/onvif/client.py”, line 36, in wrapped
raise ONVIFError(err)
onvif.exceptions.ONVIFError: Unknown error: (400, ‘Bad Request’)
What camera is it?
The port needs to be the ONVIF service port, this is different to the web interface. Have you tried it without specifying the port?
It’s a Reolink C1 Pro. The port I have specified in the YAML is 8000 and that port gives the ONVIF XML which I believe is a strong indicator its the right port. The camera settings also specifically call this port out as the ONVIF port.
This XML file does not appear to have any style information associated with it. The document tree is shown below.
<SOAP-ENV:Envelope xmlns:SOAP-ENV=“http://www.w3.org/2003/05/soap-envelope” xmlns:SOAP-ENC=“http://www.w3.org/2003/05/soap-encoding” xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance” xmlns:xsd=“http://www.w3.org/2001/XMLSchema” xmlns:wsa=“http://schemas.xmlsoap.org/ws/2004/08/addressing” xmlns:wsdd=“http://schemas.xmlsoap.org/ws/2005/04/discovery” xmlns:wsa5=“http://www.w3.org/2005/08/addressing” xmlns:xmime=“http://tempuri.org/xmime.xsd” xmlns:xmime5=“http://www.w3.org/2005/05/xmlmime” xmlns:xop=“http://www.w3.org/2004/08/xop/include” xmlns:wsrfbf=“http://docs.oasis-open.org/wsrf/bf-2” xmlns:tt=“http://www.onvif.org/ver10/schema” xmlns:wstop=“http://docs.oasis-open.org/wsn/t-1” xmlns:wsrfr=“http://docs.oasis-open.org/wsrf/r-2” xmlns:ns1=“http://www.onvif.org/ver10/actionengine/wsdl” xmlns:tev=“http://www.onvif.org/ver10/events/wsdl” xmlns:ns10=“http://www.onvif.org/ver10/events/wsdl/PullPointBinding” xmlns:ns11=“http://www.onvif.org/ver10/events/wsdl/CreatePullPointBinding” xmlns:ns12=“http://www.onvif.org/ver10/events/wsdl/PausableSubscriptionManagerBinding” xmlns:ns13=“http://www.onvif.org/ver10/network/wsdl/RemoteDiscoveryBinding” xmlns:ns14=“http://www.onvif.org/ver10/network/wsdl/DiscoveryLookupBinding” xmlns:tdn=“http://www.onvif.org/ver10/network/wsdl” xmlns:ns3=“http://www.onvif.org/ver20/analytics/wsdl/RuleEngineBinding” xmlns:ns4=“http://www.onvif.org/ver20/analytics/wsdl/AnalyticsEngineBinding” xmlns:tan=“http://www.onvif.org/ver20/analytics/wsdl” xmlns:ns5=“http://www.onvif.org/ver10/events/wsdl/PullPointSubscriptionBinding” xmlns:ns6=“http://www.onvif.org/ver10/events/wsdl/EventBinding” xmlns:ns7=“http://www.onvif.org/ver10/events/wsdl/SubscriptionManagerBinding” xmlns:ns8=“http://www.onvif.org/ver10/events/wsdl/NotificationProducerBinding” xmlns:wsnt=“http://docs.oasis-open.org/wsn/b-2” xmlns:ns9=“http://www.onvif.org/ver10/events/wsdl/NotificationConsumerBinding” xmlns:tad=“http://www.onvif.org/ver10/analyticsdevice/wsdl” xmlns:tds=“http://www.onvif.org/ver10/device/wsdl” xmlns:timg=“http://www.onvif.org/ver20/imaging/wsdl” xmlns:tls=“http://www.onvif.org/ver10/display/wsdl” xmlns:tmd=“http://www.onvif.org/ver10/deviceIO/wsdl” xmlns:tptz=“http://www.onvif.org/ver20/ptz/wsdl” xmlns:trc=“http://www.onvif.org/ver10/recording/wsdl” xmlns:trp=“http://www.onvif.org/ver10/replay/wsdl” xmlns:trt=“http://www.onvif.org/ver10/media/wsdl” xmlns:trv=“http://www.onvif.org/ver10/receiver/wsdl” xmlns:tse=“http://www.onvif.org/ver10/search/wsdl” xmlns:ter=“http://www.onvif.org/ver10/error” xmlns:tns1=“http://www.onvif.org/ver10/topics” xmlns:wsse=“http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd” xmlns:wsu=“http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd”>
SOAP-ENV:Body
SOAP-ENV:Fault
SOAP-ENV:Client
HTTP GET method not implemented
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Anyone figure this out. I have the Reolink C2 and getting same errors and same testing as bueller. I’m on HA .65
I get this in the logs
Traceback (most recent call last):
File “/usr/lib/python3.6/site-packages/homeassistant/helpers/entity_platform.py”, line 82, in async_setup
SLOW_SETUP_MAX_WAIT, loop=hass.loop)
File “/usr/lib/python3.6/asyncio/tasks.py”, line 358, in wait_for
return fut.result()
File “/usr/lib/python3.6/asyncio/futures.py”, line 245, in result
raise self._exception
File “/usr/lib/python3.6/concurrent/futures/thread.py”, line 56, in run
result = self.fn(*self.args, **self.kwargs)
File “/usr/lib/python3.6/site-packages/homeassistant/components/camera/onvif.py”, line 98, in setup_platform
add_devices([ONVIFHassCamera(hass, config)])
File “/usr/lib/python3.6/site-packages/homeassistant/components/camera/onvif.py”, line 121, in init
self._profiles = media_service.GetProfiles()
File “/usr/lib/python3.6/site-packages/onvif/client.py”, line 36, in wrapped
raise ONVIFError(err)
onvif.exceptions.ONVIFError: Unknown error: (400, ‘Bad Request’)
have a look at this link reolink onvif
here is an extract from the link above
Before using it, please check the camera’s local IP address and set its profile to “Baseline”.
The errors that you are appear to be due to the camera reporting that the camera doesn’t understand the command. this could be due to the camera not fully supporting onvif or and authentication issue.
Hello @Devanl
Did you ever find a solution and got a connection?
I am getting the following problems:
Error while setting up platform onvif
Traceback (most recent call last):
File "/usr/lib/python3.5/urllib/request.py", line 1254, in do_open
h.request(req.get_method(), req.selector, req.data, headers)
File "/usr/lib/python3.5/http/client.py", line 1106, in request
self._send_request(method, url, body, headers)
File "/usr/lib/python3.5/http/client.py", line 1151, in _send_request
self.endheaders(body)
File "/usr/lib/python3.5/http/client.py", line 1102, in endheaders
self._send_output(message_body)
File "/usr/lib/python3.5/http/client.py", line 934, in _send_output
self.send(msg)
File "/usr/lib/python3.5/http/client.py", line 877, in send
self.connect()
File "/usr/lib/python3.5/http/client.py", line 849, in connect
(self.host,self.port), self.timeout, self.source_address)
File "/usr/lib/python3.5/socket.py", line 711, in create_connection
raise err
File "/usr/lib/python3.5/socket.py", line 702, in create_connection
sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/ubuntu/homeassistant/lib/python3.5/site-packages/onvif/client.py", line 34, in wrapped
return func(*args, **kwargs)
File "/home/ubuntu/homeassistant/lib/python3.5/site-packages/onvif/client.py", line 201, in wrapped
return call(params, callback)
File "/home/ubuntu/homeassistant/lib/python3.5/site-packages/onvif/client.py", line 191, in call
ret = func(**params)
File "/home/ubuntu/homeassistant/lib/python3.5/site-packages/suds/client.py", line 559, in __call__
return client.invoke(args, kwargs)
File "/home/ubuntu/homeassistant/lib/python3.5/site-packages/suds/client.py", line 618, in invoke
result = self.send(soapenv)
File "/home/ubuntu/homeassistant/lib/python3.5/site-packages/suds/client.py", line 652, in send
reply = transport.send(request)
File "/home/ubuntu/homeassistant/lib/python3.5/site-packages/suds/transport/http.py", line 178, in send
return HttpTransport.send(self, request)
File "/home/ubuntu/homeassistant/lib/python3.5/site-packages/suds/transport/http.py", line 78, in send
fp = self.u2open(u2request)
File "/home/ubuntu/homeassistant/lib/python3.5/site-packages/suds/transport/http.py", line 119, in u2open
return url.open(u2request, timeout=tm)
File "/usr/lib/python3.5/urllib/request.py", line 466, in open
response = self._open(req, data)
File "/usr/lib/python3.5/urllib/request.py", line 484, in _open
'_open', req)
File "/usr/lib/python3.5/urllib/request.py", line 444, in _call_chain
result = func(*args)
File "/usr/lib/python3.5/urllib/request.py", line 1282, in http_open
return self.do_open(http.client.HTTPConnection, req)
File "/usr/lib/python3.5/urllib/request.py", line 1256, in do_open
raise URLError(err)
urllib.error.URLError: <urlopen error [Errno 111] Connection refused>
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/ubuntu/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity_platform.py", line 84, in async_setup
SLOW_SETUP_MAX_WAIT, loop=hass.loop)
File "/usr/lib/python3.5/asyncio/tasks.py", line 392, in wait_for
return fut.result()
File "/usr/lib/python3.5/asyncio/futures.py", line 274, in result
raise self._exception
File "/usr/lib/python3.5/asyncio/tasks.py", line 239, in _step
result = coro.send(None)
File "/usr/lib/python3.5/asyncio/coroutines.py", line 206, in coro
res = func(*args, **kw)
File "/home/ubuntu/homeassistant/lib/python3.5/site-packages/homeassistant/components/camera/onvif.py", line 51, in async_setup_platform
async_add_devices([ONVIFCamera(hass, config)])
File "/home/ubuntu/homeassistant/lib/python3.5/site-packages/homeassistant/components/camera/onvif.py", line 72, in __init__
self._input = media.GetStreamUri().Uri
File "/home/ubuntu/homeassistant/lib/python3.5/site-packages/onvif/client.py", line 36, in wrapped
raise ONVIFError(err)
onvif.exceptions.ONVIFError: Unknown error: <urlopen error [Errno 111] Connection refused>
Haven’t looked at this for a while. Looking back through the thread now, are we testing it as a custom_component again?
I do not think so, but honestly I do not understand what the custom_component thing was all about…
I think it is a component introduced with 0.47 (https://www.home-assistant.io/components/camera.onvif/)
I have similar problems using current component. We need to add timestamp ajustment: Onvif error
For that I modify default component using latest library’s because onvif-py3 doesn’t have this patch. If you want to try.
onvif custom_component
after putting this on the back-burner for a while I have just had another crack at getting it to work…no luck
cameras.yaml
- platform: onvif
host: 192.168.0.101
name: Driveway
port: 554
I have used the above settings to match what is currently configured in the camera (I turned off auth in an attempt to remove any obsticles)
However HassIO takes forever to restart which becomes evident in the error log:
2018-05-17 08:48:50 WARNING (MainThread) [homeassistant.setup] Setup of config is taking over 10 seconds.
2018-05-17 08:51:45 ERROR (MainThread) [custom_components.camera.onvif] Unable to communicate with ONVIF Camera: Unknown error: timed out
2018-05-17 08:51:45 WARNING (MainThread) [homeassistant.components.camera] Setup of platform onvif is taking over 10 seconds.
2018-05-17 08:51:45 ERROR (MainThread) [homeassistant.components.camera] Error while setting up platform onvif
Traceback (most recent call last):
File “/usr/lib/python3.6/site-packages/suds/transport/http.py”, line 78, in send
fp = self.u2open(u2request)
File “/usr/lib/python3.6/site-packages/suds/transport/http.py”, line 119, in u2open
return url.open(u2request, timeout=tm)
File “/usr/lib/python3.6/urllib/request.py”, line 532, in open
response = meth(req, response)
File “/usr/lib/python3.6/urllib/request.py”, line 642, in http_response
‘http’, request, response, code, msg, hdrs)
File “/usr/lib/python3.6/urllib/request.py”, line 570, in error
return self._call_chain(*args)
File “/usr/lib/python3.6/urllib/request.py”, line 504, in _call_chain
result = func(*args)
File “/usr/lib/python3.6/urllib/request.py”, line 650, in http_error_default
raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 405: Method Not AllowedDuring handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “/usr/lib/python3.6/site-packages/suds/client.py”, line 652, in send
reply = transport.send(request)
File “/usr/lib/python3.6/site-packages/suds/transport/http.py”, line 178, in send
return HttpTransport.send(self, request)
File “/usr/lib/python3.6/site-packages/suds/transport/http.py”, line 86, in send
raise TransportError(e.msg, e.code, e.fp)
suds.transport.TransportError: Method Not AllowedDuring handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “/usr/lib/python3.6/site-packages/onvif/client.py”, line 34, in wrapped
return func(*args, **kwargs)
File “/usr/lib/python3.6/site-packages/onvif/client.py”, line 201, in wrapped
return call(params, callback)
File “/usr/lib/python3.6/site-packages/onvif/client.py”, line 191, in call
ret = func(**params)
File “/usr/lib/python3.6/site-packages/suds/client.py”, line 559, in call
return client.invoke(args, kwargs)
File “/usr/lib/python3.6/site-packages/suds/client.py”, line 618, in invoke
result = self.send(soapenv)
File “/usr/lib/python3.6/site-packages/suds/client.py”, line 664, in send
result = self.failed(binding, e)
File “/usr/lib/python3.6/site-packages/suds/client.py”, line 716, in failed
reply = error.fp.read()
File “/usr/lib/python3.6/http/client.py”, line 459, in read
s = self.fp.read()
File “/usr/lib/python3.6/socket.py”, line 586, in readinto
return self._sock.recv_into(b)
socket.timeout: timed outDuring handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “/usr/lib/python3.6/site-packages/homeassistant/helpers/entity_platform.py”, line 82, in async_setup
SLOW_SETUP_MAX_WAIT, loop=hass.loop)
File “/usr/lib/python3.6/asyncio/tasks.py”, line 358, in wait_for
return fut.result()
File “/usr/lib/python3.6/asyncio/coroutines.py”, line 210, in coro
res = func(*args, **kw)
File “/config/custom_components/camera/onvif.py”, line 48, in async_setup_platform
async_add_devices([ONVIFCameraHASS(hass, config)])
File “/config/custom_components/camera/onvif.py”, line 67, in init
config.get(CONF_USERNAME), config.get(CONF_PASSWORD)
File “/usr/lib/python3.6/site-packages/onvif/client.py”, line 267, in init
self.update_xaddrs()
File “/usr/lib/python3.6/site-packages/onvif/client.py”, line 283, in update_xaddrs
capabilities = self.devicemgmt.GetCapabilities({‘Category’: ‘All’})
File “/usr/lib/python3.6/site-packages/onvif/client.py”, line 36, in wrapped
raise ONVIFError(err)
onvif.exceptions.ONVIFError: Unknown error: timed out
2018-05-17 08:51:47 ERROR (MainThread) [homeassistant.core] Error doing job: Task was destroyed but it is pending!
2018-05-17 08:51:54 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File “/usr/lib/python3.6/site-packages/homeassistant/components/websocket_api.py”, line 476, in get_services_helper
descriptions = await async_get_all_descriptions(self.hass)
File “/usr/lib/python3.6/site-packages/homeassistant/helpers/service.py”, line 156, in async_get_all_descriptions
loaded = await hass.async_add_job(load_services_files, missing)
File “/usr/lib/python3.6/concurrent/futures/thread.py”, line 56, in run
result = self.fn(*self.args, **self.kwargs)
File “/usr/lib/python3.6/site-packages/homeassistant/helpers/service.py”, line 139, in load_services_files
loaded[yaml_file] = load_yaml(yaml_file)
File “/usr/lib/python3.6/site-packages/homeassistant/util/yaml.py”, line 67, in load_yaml
with open(fname, encoding=‘utf-8’) as conf_file:
OSError: [Errno 9] Bad file descriptor
although I dont know what to do to get it working. this is using onvif v3 as posted above. Any ideas guys?
For the life of me i could never get my dahua cameras talking to HA via Onvif
Then last week after again looking at the issue i just tried port 80 and the cameras started working.
my config for in case it helps anyone
- platform: onvif
host: 10.0.0.4
port: 80
profile: 1
name: front_door
user: ********
password: *********
can this component be used to grab a still image from inside an automation ?
I’m trying to set this up as well but getting the error:
Unable to communicate with ONVIF Camera: Unknown error: Missing element ProfileToken (GetStreamUri.ProfileToken)
I am using the custom_components route. I have HASSIO installed on ubuntu server 16.04 in a VM. I enabled the logger function and it gives me a bunch of zeep errors. I saw previously that it shouldn’t be using zeep. how to I correct this.
My camera is a Reolink RLC-410 with the following setup in my config.yaml:
camera:
- platform: onvif
host: 192.168.1.62
port: 8000
name: Driveway
username: !secret camera_username
password: !secret camera_password
Per my cameras settings, 8000 is the ONVIF port. I have tried port 80 and the default 5000 (by not specifying a port) and it gives me a connection error so I know it is hitting the cameras correct port. Hopefully someone can help. I can only think that maybe because the camera has 3 quality settings to choose from on login (Clear, Balanced, Fluent) which affect the streaming quality, I need to somehow specify which one I want to use.
I think I solved that error, i googled the error and included onvif.py in the search string and came across a site discussing the error:
https:/github.com/quantanium/python-onvif/issues/17
I modified line 69 in the onvif.py that is in my custom_components directory to be
{'StreamSetup': {'Stream': 'RTP-Unicast', 'Transport': 'UDP'}, 'ProfileToken': 'profiles[0]._token'}
Specifcally i added the bit at the end regarding 'ProfileToken': 'profiles[0]._token'
. It solved my previous error and now I get a gray bar in my UI with the camera name, but no picture, there appears to be an error regarding FFMPEG, I’m not completely sure how to set that up. I just have
ffmpeg:
defined in my config.yaml
any help would be great.
Hello everyone,
I’m also struggling to have my Revotech PIR ip camera recognized and properly configured in Hassio. I’ve tried lots of combinations with unsuccessful results. I’ve also used ONVIF Device Manager for spotting the right URL and not even then have I managed to integrate the stream into Hassio. If I run VLC on a Windows machine I do access the stream. If I access the camera ip address, I can access the stream as well in the embedded website.
Any tip would be most appreciated.
Thanks
I’m also confused. Have you managed to understand what is that all about?
No not a clue, but I do not want to work too much with custom components in the fear of them being overwritten when updating or migrating.
It sounds like you are almost there, with accessing the stream and all.
Are you on Hassio.io?
Have you added the pre-requirement ffmpeg:
?
Have you tried the Shinobi Pro addon on Hassio?