Trying to get IP-camera to work - Yoosee

Hi guys,

I’ve been trying for like 2 days to get this to work. I’ve so much but the conclusion must be that I’m just not smart enough.
How ever - this is my last resort to see if I can get this to work.

I have following issue:

  • I’ve got a HASS - AIO installation
  • I’ve got a yoosee-ip camera connected to my wifi and I’ve got the ip-adress
  • I’ve read all the documents and threads I’ve found (I know - makes me even more stupid)
  • I’ve done som port forwarding
  • I got the stream running on my VLC at following adress: rtsp://192.168.1.90:554/onvif1
  • With VLC no username or password is needed

What should I do before throwing the camera into the woods? Would love some input.

can’t you use this?

yes but can’t get it to work - do i have to install like ffmpeg on the pi?

Yes

You must add ffmpeg binary into config file

then additionally add your camera

@insideout : Did you connect Yoosee camera to hassio ?
I have same question like insideout, anyone can help me ? Thanks all

Any Progress there?
Just like that doesnt work for hass.io

ffmpeg:

camera:

  • platform: onvif
    host: 192.1.11.32

Hi, have the same problem, can’t get my camera to work with HomeAssitant

This is my config:

camera:
   - platform: onvif
     host: 192.168.0.110

I am able to open the steam in VLC and see the video real time with this:

rtsp://192.168.0.110:554/onvif1

Also, I can save a video file to disk using ffmpeg with this:

ffmpeg -i rtsp://192.168.0.110:554/onvif1 -an -c copy -map 0 foo.mp4

When I start HomeAssistant, the startup process is freezes on this line:

2018-02-25 18:20:59 INFO (MainThread) [homeassistant.components.camera] Setting up camera.onvif

It hangs for 90 seconds and then I get:

2018-02-25 18:22:30 ERROR (MainThread) [homeassistant.components.camera] Error while setting up platform onvif
Traceback (most recent call last):
  File "/Users/raphaelrissato/.homeassistant/deps/lib/python/site-packages/onvif/client.py", line 34, in wrapped
    return func(*args, **kwargs)
  File "/Users/raphaelrissato/.homeassistant/deps/lib/python/site-packages/onvif/client.py", line 201, in wrapped
    return call(params, callback)
  File "/Users/raphaelrissato/.homeassistant/deps/lib/python/site-packages/onvif/client.py", line 191, in call
    ret = func(**params)
  File "/Users/raphaelrissato/.homeassistant/deps/lib/python/site-packages/suds/client.py", line 559, in __call__
    return client.invoke(args, kwargs)
  File "/Users/raphaelrissato/.homeassistant/deps/lib/python/site-packages/suds/client.py", line 618, in invoke
    result = self.send(soapenv)
  File "/Users/raphaelrissato/.homeassistant/deps/lib/python/site-packages/suds/client.py", line 652, in send
    reply = transport.send(request)
  File "/Users/raphaelrissato/.homeassistant/deps/lib/python/site-packages/suds/transport/http.py", line 178, in send
    return HttpTransport.send(self, request)
  File "/Users/raphaelrissato/.homeassistant/deps/lib/python/site-packages/suds/transport/http.py", line 78, in send
    fp = self.u2open(u2request)
  File "/Users/raphaelrissato/.homeassistant/deps/lib/python/site-packages/suds/transport/http.py", line 119, in u2open
    return url.open(u2request, timeout=tm)
  File "/usr/local/Cellar/python3/3.6.4_2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 526, in open
    response = self._open(req, data)
  File "/usr/local/Cellar/python3/3.6.4_2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 544, in _open
    '_open', req)
  File "/usr/local/Cellar/python3/3.6.4_2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 504, in _call_chain
    result = func(*args)
  File "/usr/local/Cellar/python3/3.6.4_2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 1346, in http_open
    return self.do_open(http.client.HTTPConnection, req)
  File "/usr/local/Cellar/python3/3.6.4_2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 1321, in do_open
    r = h.getresponse()
  File "/usr/local/Cellar/python3/3.6.4_2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 1331, in getresponse
    response.begin()
  File "/usr/local/Cellar/python3/3.6.4_2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 297, in begin
    version, status, reason = self._read_status()
  File "/usr/local/Cellar/python3/3.6.4_2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 258, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
  File "/usr/local/Cellar/python3/3.6.4_2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/socket.py", line 586, in readinto
    return self._sock.recv_into(b)
socket.timeout: timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity_component.py", line 189, in _async_setup_platform
    SLOW_SETUP_MAX_WAIT, loop=self.hass.loop)
  File "/usr/local/Cellar/python3/3.6.4_2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/asyncio/tasks.py", line 358, in wait_for
    return fut.result()
  File "/usr/local/Cellar/python3/3.6.4_2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/asyncio/futures.py", line 243, in result
    raise self._exception
  File "/usr/local/Cellar/python3/3.6.4_2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/asyncio/tasks.py", line 180, in _step
    result = coro.send(None)
  File "/usr/local/Cellar/python3/3.6.4_2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/asyncio/coroutines.py", line 212, in coro
    res = func(*args, **kw)
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/camera/onvif.py", line 51, in async_setup_platform
    async_add_devices([ONVIFCamera(hass, config)])
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/camera/onvif.py", line 72, in __init__
    self._input = media.GetStreamUri().Uri
  File "/Users/raphaelrissato/.homeassistant/deps/lib/python/site-packages/onvif/client.py", line 36, in wrapped
    raise ONVIFError(err)
onvif.exceptions.ONVIFError: Unknown error: timed out

I am still trying to figure it out. Thanks in advance.

Same problem here.

i have Besder Camera which uses Yosee app. I can open its stream in VLC without username or password but homeassistant’s onvif is definitely not working for me. FFMPEG seems to DO something but this is what i get.
Capture

  • platform: ffmpeg
    input: rtsp://192.168.1.32:554/onvif1
    name: BesderCam
    extra_arguments: -pred 1 -q:v 2

will be great if someone manages to figure it out

Hi, I was actually able to make mine work with ffmpeg platform and it does display the video feed just fine in the UI, but onvif is really not working.

Although video works with ffmpeg, I would still like to have it working with onvif to be able to control PTZ .

Any help is appreciated. I will update if I find anything else.

My camera is not ptz. In any case i have never managed to get even my ptz cameras working via onvif component. A highend expensive camera might work is my understanding

Said this. I have managed to some level of ptz control on my hacked xiaomi dafang camera by using the mqtt switches.

Not specific for onvif cameras, I have used ffmpeg platform with different IP cams (Amcrest/Wyzes-hacked/IPWebcam) and got this kind of distorted/incomplete feed initially. It helped for me to use the lower bandwidth channel (Amcrest has HD/SD channels), or lower the cam resolution, and improve the wifi signal (use a better router/extender).
One of the IPWebcam still does this up to a minute after I restart the cam/wifi connection, but the feed would then stabilize and get clear picture.
Hope that helps.

1 Like

what hardware r u hosting it on sorry? i am wondering if my RPI3 is overburdened and cannot convince FFMPEG to do the required processing?
i am using Hassio on a full RASPBIAN STRETCH (should have gone for lite)

can you use generic platform? I think it is easier. using the http of the ipcamera.

1 Like

I have the 6 IPcams ffmpeg into my Hassbian on RPi3, they are all rtsp feeds.
The camera display on frontend cards (which refresh every 10s) seldom has incomplete pictures.
That said, I also live feed 4 of the IPcams into another RPi2B with Raspbian stretch lite to create animated gifs and video backup, that’s where I would see initial momentary incomplete snapshots if wifi or feed connections are interrupted.
I suspect it’s more about the quality of the wifi connection and how fast the feed from IPcam stabilizes.

What resolution are you using on your video feed? In my case, whenever I see incomplete snapshot and I check the feed with VLC, VLC is perfectly fine and smooth, that may indicate RPi/Raspbian have some trouble handling the same feed. That’s why I improved wifi connection and lowered resolution trying to help the RPi.

1 Like

Yes, thats one option.

thanks for pointing out. i am going for full resolution actually but i will try using the low def channel and i think FFMPEG also can take an argument to adjust quality. will try those when i can.

did you manage to get it work a bit smoother?

if you’re asking me. then NO :(. i just gave up. i did then switch to VSTARCAM and had some success with it but again wasnt satisfied enough so gave up on streaming my cameras in. what is your setup?
if indoor, i got Xiaomi;s Dafang camera working and integrating really well when flashed with DAFANG HAcks.

Vấn đề có ai giải quyết được chưa ?