Wyze cam streaming to media devices

Wanted to share a solution i put together for a lovelace card that dynamically updates the image from the camera (not actual streaming to the dashboard, there are still issues with the wyze firmware causing issues with that) and I wanted to be able to click the camera image and have it display on my various media devices. Answer: picture-entity

Configuration.yaml entry:

stream: 
camera:
- platform: ffmpeg 
 input: (link generated from rtsp setup in the wyze app)
 name: Your Cameras Name

Add a picture-entity card to your UI and use this code:

type: picture-entity
aspect_ratio: 16x9
entity: camera.your_cameras_name
name: Display Name For Card
tap_action:
  action: call-service
  service: camera.play_stream
    service_data:
    entity_id: camera.your_cameras_name
    media_player: media_player.living_room_orwherever

The card picture updates a couple times a minute or every page reload from what I can tell. Clicking on the picture will cast the stream to the media device you specified. Works with my cast devices and Apple Tvs. Only quirk is that sometimes the first click will switch the target device to show the stream loading but the stream wont actually begin until a second click, working on that still.

Happy tinkering!

1 Like

Just to share…I have wyze cams that stream through lovelace…i have a couple ipads on walls that stream a camera all day. Also have them eposed to google and works perfect. I just say show me the front yard for example and depending on what room IM in it automaticall puts it on that tv.

lovelace
              - type: picture-entity
                show_icon: false
                show_name: false
                camera_view: live
                entity: camera.front_yard

camera.yaml
- platform: ffmpeg
  input: rtsp://username:[email protected]/live
  name: Front Yard

used in automations:
  - service: media_player.play_media
      data_template:
        entity_id: media_player.office_tv
        media_content_id: rtsp://username:[email protected]/live
        media_content_type: 'image/jpg'

and just exposed 'camera.front_yard' to google.

I can get Lovelace streaming directly to work too but it crashes my pi after about 15 minutes or so. I am working on offloading my databases to an NAS so that might help. You’re code is basically the same as mine so maybe I have something else causing an issue or are you running HA ona beefier server?

ah ok, that may be it then. Yea I have HA running in a vm. Its a Dell R720 that runs esx. HA is a vm. I also have a seperate vm that runs some of the services, like mqtt, scripts for ring alarm, google webserver…

100% that would make the difference then. I tried your code to see what it would do and the PI cant get the stream to start on Lovelace. Just not enough power to keep it running in a constant manner which explains why some of the other options were causing problems.