How to open camera feed on notification

I have set up a notification with a front door camera snapshot when somebody rings the doorbell. How can I go directly to the live camera feed when I click on the notification? I’ve looked around but I’ve found no examples… Thanks.

Depends on with what, iOS app? Browser? Ariela?

I only have experience with iOS, but on iOS you can use actionable notifications. On a standard pc browser you could use html5 notifications. On Ariela I wouldn’t know.

My goal would be to go directly to the live camera feed on the iOS app…

The only way I know of would be using actionable notifications. This is how I do it:

- alias: Motion detected no one home gallerij
  trigger:
  - entity_id: binary_sensor.dafang_motion_sensor
    platform: state
    to: 'on'
  condition:
  - entity_id: group.device_status_2
    state: 'not_home'
    condition: state
  action:
  - service: notify.ios_iphone_jimmy
    data:
      message: 'Er is beweging gedetecteerd op de gallerij! '
      title: 'Motion'
      data:
        attachment:
          content-type: jpeg
        push:
          badge: 0
          category: camera 
        entity_id: camera.gallerij_camera
2 Likes

Thanks! I tried your suggestion and, interestingly enough, it gives me live video inside the notification window when I click on it (although the video size ratio comes up distorted, not in 16x9).

That’s a good option to have, but what I was looking for is getting a snapshot (which I already have set up) and going straight to the live video feed inside the HA app when I click on the snapshot notification. Currently it just takes me to the front page of the app, not to the camera component… If it’s a false alarm, the snapshot is enough; if I want to take a live look, then I can go there from the notification…

What do you think?

1 Like

I have seen this question before, and I believe that this is currently not possible. I too was wondering if this would be possible. Yes the image looks stretched in the notification windows I haven’t found a solution for that yet.

But opening the app on a set page is not possible to my knowledge.

Thanks a lot for clarifying this. I wasn’t able to find a clear answer either.

I’m following since I couldn’t find a way to do the same

1 Like

I would really like to do the same. I want a snapshot in big format and then when clicking on it or an action button go to live stream. Right now I can just get a snapshot or video. Not both.
Most of the time you would want to see what it was that triggered the alert and then go to live to see what is going on.

I made a temporary solution. Now I send a screenshot, but include a button “Go to live view” which when pressed sends a new notification with live video.

Could you share the code?

I am on a trip right now, but when I get home tomorrow evening I will share it. Too hard to do it on the phone :slight_smile:

Here you go:

#automations.yaml#
- alias: 'Take picture when Door Bell Pressed'
  id: Take_picture_when_Door_Bell_Pressed
  initial_state: 'on'
  trigger:
    platform: state
    entity_id: binary_sensor.doorbell
    to: 'on'
  action:
    - service: media_player.alexa_tts
      entity_id: media_player.living_room_dot
      data:
        message: "Ding Dong. Ding Dong. Somebody is at the front door"
    - service: camera.snapshot
      data_template:
        entity_id: camera.ip_cam_2
        filename: "www/snapshots/front_door_camera_{{ trigger.to_state.last_changed }}.jpg"
    - delay: '00:00:01'
    - service: notify.mobile_app_youriphone
      data_template:
        message: 'Someone has pressed the door bell at {{now().strftime("%H:%M %d-%m-%y")}} '
        data:
          attachment:
            content-type: jpeg
            url: "https://<NABU_CASA_or_LOCAL_IP/local/snapshots/front_door_camera_{{ 
trigger.to_state.last_changed|urlencode }}.jpg"
          push:
            sound:
              critical: 2
              name: Doorbell1.wav
              volume: 1.0 # 0.0 to 1.0
            category: doorbell

- alias: go_to_live_feed
  id: go_to_live_feed
  initial_state: 'on'
  trigger:
    platform: event
    event_type: ios.notification_action_fired
    event_data:
      actionName: LIVE_FEED
  action:     
    - service: notify.mobile_app_youriphone
      data_template:
        message: 'Someone has pressed the door bell at {{now().strftime("%H:%M %d-%m-%y")}} '
        data:
          attachment:
            content-type: jpeg
          push:
            badge: 0
            sound: default
            category: camera 
          entity_id: camera.ip_cam_2  


#Configuration.yaml#

# IOS Stuff
ios:
  push:
    categories:
      - name: doorbell
        identifier: 'doorbell'
        actions:
          - identifier: 'LIVE_FEED'
            title: 'Go to Live Feed'
7 Likes