Show Nest Cam on Fire TV from HA automation

I’ve got my Nest cam and FireTV defined to Alexa, so I can press the Voice button on the FireTV remote and say “Show Driveway”, to cause the Driveway Nest cam to stream to the FireTV.

I’ve also got an HA automation that triggers a script when a person is detected on the cam, so for example if the Driveway cam sees a person, the script turns a group of lights on.

I’d like to add an action to the script to stream the cam image to the FireTV when a person is detected, in other words to do what it now does after a “Show Driveway” voice command, but triggered by an HA script instead. I’ve tried to read up on the various ways Alexa and HA might communicate, but I’m a little confused as to how the pieces would fit together to make this happen. Anyone doing this now? Any guidance you can offer would be much appreciated.

Hi,
I am interested in this :slight_smile:
If you don’t mind I ask:

  1. How do you have the alexa component configured to expose the camera and the FireTV to Alexa?
  2. How are you getting Alexa to show the camera stream to FireTV?

I don’t have the Alexa component configured to HA at this point. That’s actually exactly what I’m asking about here.

I have the FireTV and Nest cam defined to the Alexa app as Smart Home devices. Here is some info on how it’s done. When I give the “Show Driveway” command to Alexa, I am not using HA at all, just speaking into the FireTV remote while pressing its “microphone” button.

Separately, I also have the Nest cams defined to HA and use their motion sensors to trigger HA automations to turn lights on.

The last piece I want to achieve is to send the “show camera” command from HA to Alexa as part of my automation script. But how?

Here would be a recommendation:
Try using the Custom Component Alexa Media Player. It can be downloaded and installed using HACS.

This provides a service call to invoke an Alexa Routine. An example is provided on the wiki here that you could use as part of your automation.

1 Like

OK, it’s solved. To recap: when the NestCam on my deck detects a person at night, I wanted to be alerted, especially if I’m home in bed, but also if I’m not. I want the FireTV in my bedroom to turn on and display what the NestCam sees on the deck. OK, here’s my solution, which uses the Alexa Media Player integration, a NestCam, an Echo Dot in the bedroom and a FireTV. Also, as an extra, the Join app installed on various devices.

First, I create an automation that triggers a script of actions when a person is detected by the cam at night:

  - alias: 'Person on deck detected'
    initial_state: true
    trigger:
      platform: state
      entity_id: binary_sensor.deck_camera_person_detected
      to: 'on'
    condition:
      - condition: state
        entity_id: binary_sensor.night
        state: 'on'
    action:
      service: script.test_bedroom_tv_on

The script that’s triggered does the following:

  1. announces the event to the echo dot in the bedroom
  2. turns a group of lights on in the house meant to alert me and also the intruder
  3. sends a notification to the Join app in case I’m elsewhere
  4. turns on the FireTV in the bedroom
  5. waits 3 seconds for the TV to come to life
  6. causes the TV to say “Echo, show deck” out loud
  7. the Echo dot in the bedroom hears this and responds by streaming the NestCam to the FireTV
test_bedroom_tv_on:
  fields:
    seconds:
      description: The amount of time to wait before next command
      example: 3
  sequence:
  - alias: Announce to Echo Dot
    service: notify.alexa_media
    data:
      target:
      - media_player.bedroom_dot
      data:
        type: announce
      message: There may be someone on the deck
  - alias: Security2 lights on
    data:
      entity_id: group.security2
    service: homeassistant.turn_on
  - alias: Notification of Person
    data:
      message: 'Person on deck detected {{ now().strftime(''%H:%M %A %d %B %Y'') }} '
      title: Person on Deck Notification
    service: notify.join
  - alias: Turn on TV
    service: media_player.volume_set
    data:
      entity_id: media_player.bedroom_firetv
      volume_level: 0.15
  - delay:
      seconds: 3
  - service: notify.alexa_media
    data:
      target: 
      - media_player.bedroom_firetv
      data:
        type: tts
      message: "echo, show deck"