ONVIF 'Image not available'

Hello everyone,

I’m running into problems while configuring an Onvif camera. First of all: the camera is visible in my home network. I’ve downloaded the app ‘dCam Light’ on my iPhone, and it automatically detects the IP camera and shows the live stream via onvif. While viewing the settings in the dCam app, it shows:

Onvif URL: 192.168.1.51
Onvif port: 8899
Username: admin
Password: this field is blank
Hardware ID: 00001 (not sure if this is required in HA)
Video encoding: H264

I entered the following lines to the configuration.yaml file:

camera:
- platform: onvif
  host: 192.168.1.51
  name: IP camera
  username: admin
  port: 8899

After that, in HA the camera shows up as: IP camera(Image not available)

Does anyone know what’s going wrong? The strange thing is that an iPhone app detects the onvif camera automatically, and HA can’t connect.

Thank you.

Adam.

Do you have FFMPEG installed ?

FFMPEG

Sorry, I should’ve mentioned that. Yes, ffmpeg is installed. When I’m adding the same IP camera as an ffmpeg camera, it’s showing up in HA perfectly. But in that situation I only get a still image every 10 seconds. I want a more fluid stream.

Do you get anything relating to onvif in your HA logs ?

Yes. Please see below my full logfile. Line 3 is showing an onvif warning.

2018-04-22 17:50:22 WARNING (Recorder) [homeassistant.components.recorder] Ended unfinished session (id=123 from 2018-04-22 15:03:47.718349)
2018-04-22 17:50:37 WARNING (MainThread) [homeassistant.setup] Setup of config is taking over 10 seconds.
2018-04-22 17:51:36 WARNING (MainThread) [homeassistant.components.camera] Setup of platform onvif is taking over 10 seconds.
2018-04-22 17:51:38 ERROR (Recorder) [homeassistant.components.recorder.util] Error executing query: (sqlite3.DatabaseError) database disk image is malformed [SQL: 'INSERT INTO events (event_type, event_data, origin, time_fired, created) VALUES (?, ?, ?, ?, ?)'] [parameters: ('service_registered', '{"domain": "recorder", "service": "purge"}', 'LOCAL', '2018-04-22 15:50:20.588553', '2018-04-22 15:51:38.461922')] (Background on this error at: http://sqlalche.me/e/4xp6)
2018-04-22 17:51:43 ERROR (SyncWorker_17) [homeassistant.core] Error doing job: Task was destroyed but it is pending!
2018-04-22 18:01:02 ERROR (MainThread) [homeassistant.core] Error doing job: Task was destroyed but it is pending!

@BertrumUK Have you seen the log? It would be great if you can help me. Thank you.

Sorry I am in work so didn’t see your reply.

I see you have an iPhone, Do you get “Image not available” when using the iPhone HomeAssistant app ? My camera does not work properly when using Safari but it does when I use the app.

Do you get the same issue when using a browser from your PC/MAC ?

Have you tried using the other variations of generic/ffmpeg/mjpeg Camera ?

You could also check the Troubleshooting guide