Display Camera feeds on Television Monitors from HA

Hello, please forgive if this has been already addressed. A link to previously discuss will be greatly appreciated. I have an older swann dvr and had to use zoneminder to capture the feeds and then add to Home Assistant. That seems to work great. I have 2 unused television monitors and which I would like to use to view the live feeds from the cameras 24/7. What is the easiest way to get the feed from HA to the monitors wirelessly? I thought using a firestick attached to the monitors but can’t figure how to work it out. Any suggestions or best practice would great be appreciated.

Raspberry pi showing HA page

You can create a user with specific Lovelace view for these devices

I have 2 Wyze V2 cameras, one with the Wyze RTSP firmware, and the other with the Dafang firmware. Both are added into HA as Generic camera entities:

- platform: generic
  # Wyze V2 with Dafang firmware
  still_image_url: ""
  stream_source: "rtsp://username:[email protected]:8554/unicast"
  name: "Carport Cam"
  verify_ssl: false
  authentication: digest
  content_type: "image/svg+xml"

- platform: generic
  # Wyze V2 with Wyze RTSP firmware
  still_image_url: ""
  stream_source: "rtsp://username:[email protected]/live"
  name: "Front Door Cam"
  verify_ssl: false
  authentication: digest
  content_type: "image/svg+xml"

You can use VLC to confirm that the cameras are sending the RTSP stream and that you have the correct URL, username and password.

The Chromecast is added using the Google Cast integration. To test it use Developer Tools, enter the service camera.play_stream, and select your camera and chromecast:

Service: Camera: Play stream
Target: camera.carport.cam
Media Player: media_player.chromecast_lr
Format: his

I’m using Node Red for my automations, and when there is a motion trigger it performs the following:

  1. Checks to see if the TV is on
  2. Captures the current TV source
  3. Calls the camera.play_stream service
  4. Sets the TV source to the Chromecast HDMI
  5. Pauses to allow a 20 second view of the camera on the TV
  6. Returns the TV to the original source
  7. Sends a media_player.media_stop to the Chromecast to disconnect the RTSP stream

The only part that I can’t get to work on either cam is the still_image_url part.

I already can see the cams in HA. Will this allow me to display all cams 24/7 on Chrome cast?

I believe that once the stream starts, HA is no longer involved - it’s between your camera and the media source (TV). So I don’t think the stream will stop, but I think the Chromecast screen saver will kick in, and I don’t think it can be disabled. You might be able to periodically send a refresh of the command from HA to keep the screen saver from launching, but you’d also risk burn-in on the screen itself since the image likely isn’t changing very often. I originally tried using a Fire Stick for this, running the VLC player app on it, but couldn’t find an easy way to automate it and still use it for other apps like Netflix/Hulu/etc. I believe the Fire Stick screen saver can be disabled.

I used a RPI with Raspbian Lite and cvlc to directly play streams from Zoneminder.

I guess this won’t work for me since my cameras don’t have rtsp stream. I had to use a workaround in zoneminder to convert my swann dvr stream to be viewable in zoneminder. Only then could I view my cams in HA.

I just got my first rpi… Do you mind sharing how you set this up?

Nick thank you for suggesting this option… I found this page [Raspberry Pi Video Surveillance Monitor - Self Hosted Home] and was able to get it to work using the camera feeds from zoneminder.

Hi @sparklee: good for you that you have solved it!

I have seen multiple similar projects and in the past I also have played with omxplayer (the program that “displaycamera’s” from your GH link is using).
The nice thing about displaycamera’s is that you can make a grid with multiple camera’s on 1 screen and rotate them if more then the grid allows.

The reason why I switched to using cvlc is that I just wanted to have 1 stream per display & if the feed dies the image freezes and as soon the stream comes back online, the program picks this up and continues the feed.
I wanted something that needs very little interaction which I found this way.

Hi, I just want to show the camera RTSP stream on my Chromecast. But your solution is much better to show it for 20 seconds and return to the previous source. Could you please share your Node Red flow? Would be great!

Thanks in advance,

Flow below.

[{"id":"178d14042e5c22f6","type":"tab","label":"Flow 1","disabled":false,"info":""},{"id":"0f0387f299192b76","type":"api-call-service","z":"178d14042e5c22f6","name":"Stop Chromecast","server":"8be923df.d66f9","version":3,"debugenabled":false,"service_domain":"media_player","service":"media_stop","entityId":"media_player.chromecast_lr","data":"","dataType":"jsonata","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":180,"y":390,"wires":[[]]},{"id":"bc115f128e834aaf","type":"api-call-service","z":"178d14042e5c22f6","name":"Return to Original Source","server":"8be923df.d66f9","version":3,"debugenabled":false,"service_domain":"media_player","service":"select_source","entityId":"media_player.living_room_tv","data":"{\"source\":\"{{payload}}\"}","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":200,"y":340,"wires":[["0f0387f299192b76"]]},{"id":"b44a0e7cc77df25b","type":"delay","z":"178d14042e5c22f6","name":"","pauseType":"delay","timeout":"20","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"x":150,"y":290,"wires":[["bc115f128e834aaf"]]},{"id":"da2988dc254f1a51","type":"api-call-service","z":"178d14042e5c22f6","name":"Set LG TV Source to Chromecast","server":"8be923df.d66f9","version":3,"debugenabled":false,"service_domain":"media_player","service":"select_source","entityId":"media_player.living_room_tv","data":"{\t  \"source\": \"Chromecast\"\t}","dataType":"jsonata","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":230,"y":240,"wires":[["b44a0e7cc77df25b"]]},{"id":"5f273d1ae9a98edd","type":"api-call-service","z":"178d14042e5c22f6","name":"","server":"8be923df.d66f9","version":3,"debugenabled":false,"service_domain":"camera","service":"play_stream","entityId":"","data":"{\t  \"media_player\": \"media_player.chromecast_lr\",\t  \"entity_id\": \"camera.front_door_cam\"\t}","dataType":"jsonata","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":200,"y":190,"wires":[["da2988dc254f1a51"]]},{"id":"390694bd81c21cce","type":"function","z":"178d14042e5c22f6","name":"Capture Original TV Source Input","func":"var var_source = \"\";\n\nvar_source = msg.data.attributes.source;\nmsg.payload = var_source;\nreturn msg\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":230,"y":140,"wires":[["5f273d1ae9a98edd"]]},{"id":"5d4832aa94e87e07","type":"api-current-state","z":"178d14042e5c22f6","name":"Only if LG TV is ON","server":"8be923df.d66f9","version":2,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"media_player.living_room_tv","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":320,"y":80,"wires":[["390694bd81c21cce"],[]]},{"id":"5f9c890c74103bd7","type":"server-state-changed","z":"178d14042e5c22f6","name":"Motion at Front Door","server":"8be923df.d66f9","version":3,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"binary_sensor.front_porch_motion_sensor","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"for":0,"forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":110,"y":80,"wires":[["5d4832aa94e87e07"],[]]},{"id":"8be923df.d66f9","type":"server","name":"Davids Home Assistant","version":1,"legacy":true,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":false,"cacheJson":false}]

Many thanks!