Problem: Play camera stream with media player to an DLNA device

I have integrated several cameras into HA:

  • Amcrest AD110
  • Various Dahua cameras
  • Dahua NVR

I (can) use:

  • Generic camera
  • Onvif
  • Dahua Integration
  • Amcrest2MQTT
  • RTSPtoWebRTC

Everything is fine. RTSP live streaming rtsp://user:[email protected]:554 to Picture Entity card with no problems.

What I want now is to use the “Play Media action” to play Live Camera streams to a Sony TV with DLNA.
Sony TVs are:

  • An old Sony KDL-55W815B
  • Sony KD-55XH9299

All cameras are integrated via the Generic camera integration
HA_Generic_Camera

Action → Play Media → Media Player = Sony TV
Aktion
Media_Sources_1

If I then select camera, 8 cameras are found but they are incompatible

FYI: Playing a Media File with Local Media Streaming via DLNA to a Sony TV is working.

  1. Where and/or what is the problem?
  2. Why are all the cameras “incompatible”?
  3. The Sony KD-55XH9299 has build-in chromecast. If I use this I need https://and external_url (Cloud or DynDNS), right?
  4. Is there any way to use the cameras with Play Media Action as Media Source in the local LAN?

Edit: :slightly_smiling_face:
5. If I buy a Google Nest Hub with chromecast and use it as a Media Player for the camera streams, I also need https://and external_url (Cloud or DynDNS) right?
Edit: No I do not need it. :grinning:

I don’t know why :slightly_smiling_face: but at least it works with Chromecast now. Now four cameras will be found and are ready to play on the Sony TV with build-in Chromecast.

If I try Sony DLNA the cameras are found but a message appears on the Sony TV: Video cannot be played. Maybe a codec or resolution problem. But that doesn’t matter for now.

Now I have to take care of the error messages in log. :rofl: For example:

Logger: homeassistant.components.onvif
Source: components/onvif/camera.py:145
Integration: ONVIF (documentation, issues)
First occurred: 12:17:39 (13 occurrences)
Last logged: 12:41:16

Fetch snapshot image failed from DahuaHof, falling back to FFmpeg; Unknown error:
Fetch snapshot image failed from Amcrest_AD110_ONVIF, falling back to FFmpeg; Unknown error:

.

How did you get the cameras to show up in your Media>Camera interface? Mine still says “17 incompatible items hidden”. Did you have to add your amcrest and dahua cameras differently? I have all my cameras added as ONVIF.

No all with ONVIF.

I’ve got dahua cameras aswell, integrated through onvif And Ffmpeg. They stream correctly with RtspToWebRTC through my dashboard. But i haven’t been able to find them on media (they show as hidden). Did you guys were able to fix this issue? How? Thanks in advance!

The media playback has probably had one or the other problem for a while (months). I have integrated 4 Onvif cameras (Dahua) into HA and I also have RTSPtoWeb - WebRTC installed. All cameras work without any problems and I can see the live streams on RTSPtoWeb - WebRTC WebGUI and on/with the Stream Sensor. Sometimes the cameras show up on Media → Media Source - Camera and other times they don’t and only incompatible devices are displayed. That means sometimes they just disappear until Home Assistant is rebooted again. But if I create an automation or script for example, the cameras are always available there and can be selected.

I’ve given up trying to find the cause or how to fix the problem. :zipper_mouth_face:

By the way after a month or so this issue fixed itself I can now view the camera in the media section that I integrated though onvif. I have no clue about why or how. Just wanted to update you. :sweat_smile::thinking: