Onvif Camera issue

Hi there,

Having an issue with my onvif setup. Recently moved my setup over to a Raspberry Pi 3. The same config works fine on my old Pi1.

Config:
camera:

  • platform: onvif
    host: x.x.x.x
    port: 8899
    username: username
    password: password
    name: Front

Log file: https://pastebin.com/mYx94T64

Ffmpeg is installed on my pi and configured as follows:
ffmpeg:
ffmpeg_bin: /use/bin/ffmpeg

Edit:
When I try load the video stream directly in my browser it throws an internal server error 500

Hassip:8123/api/camera_proxy/camera.front?token=Validtoken

Any pointers would be great!

Tim

Have you confirmed that stream is correct with something like VLC?

On HikVision cameras you can Open VLC, click “Media” top left and “Open Media Stream” then you can paste in the following:

rtsp://admin:password@ipaddress:554/Streaming/Channels/101/

It should then display you video feed. Do you know if port 8899 is correct for your camera?

Just in case you had a typo in your yaml, the ffmpeg location is almost certainly /usr/bin, not /use/bin…

Hi wills,

The same setup is working on my raspberry pi 1. The version of ffmpeg is the same on both installs.

I can access the stream on the Pi 1 so the camera definitely works on 8899.

I have been trying to dig through the code of all the files referenced in the error log, but my python knowledge is pretty limited.

I turned on debug logging on the camera component and can see the following logs too:
2019-03-03 16:32:07 INFO (MainThread) [homeassistant.components.camera] Setting up camera.onvif 2019-03-03 16:32:17 WARNING (MainThread) [homeassistant.components.camera] Setup of platform onvif is taking over 10 seconds. 2019-03-03 16:38:45 DEBUG (SyncWorker_16) [homeassistant.components.camera.onvif] Connecting with ONVIF Camera: x.x.x.x on port 8899 2019-03-03 16:38:46 DEBUG (SyncWorker_16) [homeassistant.components.camera.onvif] ONVIF Camera Using the following URL for Front: rtsp://<user>:<password>@x.x.x.x//live/ch00_1

Going to try that url above in VLC now.

@quentin thanks for pointing that out, it was a typo on my part. The yaml file says usr

So I tested the rtsp url that is logged in the debug log in VLC and it works fine. My next guess would be that the ffmpeg component is not working properly, although I don’t see any error logs :confused:

Any pointers as a next step?

So I’ve given up on the onvif platform and settled for a straight ffmpeg platform.

I would love to get to the bottom of that error I am getting with onvif but my patience ran out :joy:

New config:

Camera:

  • platform: ffmpeg
    Input: rtsp://user:password@ipaddress//live/ch00_1

Working as expected.