Deep-link straight to a Tapo camera from a HA notification (no Tapo Care needed)

Been messing with this for a while so thought I’d share in case it helps someone.

You know how when Tapo sends you a motion alert and you tap it, the app opens right to that camera’s live view? You can do the exact same thing from a Home Assistant notification. They just don’t tell you how anywhere.

And honestly, the streaming is the one bit Tapo actually nails. Pulling the feeds into HA over RTSP (or go2rtc, whatever you’re using) is always a bit of a compromise, laggy, stutters, buffers, drops out at the worst time. The native app is smooth as, near enough instant, handles the pan/tilt and two-way audio properly, and if you’ve got a Tapo hub then all your SD/hub recordings and playback are sitting right there in the same screen. So rather than fight to recreate all that in HA and end up with something half as good, this just bounces you straight into the app where it already works properly.

So now my HA alerts hit my phone with a snapshot of whoever’s at the driveway, a “Person detected” or “Vehicle detected” label pulled straight off the camera’s own built-in AI detection (surfaced into HA with Juraj Nyiri’s Tapo Control integration, HomeAssistant-Tapo-Control on HACS, well worth having), and a button that drops me straight into that camera’s live feed in the Tapo app. Pretty much the whole Tapo Care notification experience without paying a cent a month, plus the recordings are all there via the hub.

The catch is you need each camera’s device ID to build the button, and Tapo don’t hand those out. Getting them normally is a pain (I went down a rabbit hole pulling the app apart to work it out). So I made a little tool that just grabs them for you.

What it does:

  • Logs into your Tapo account (same cloud the app uses) and lists every camera with its device ID, model and MAC. Dumps it to a csv next to the file.
  • No phone, no ADB, no root, none of that. Just run it on a Windows PC.

How to use it:

  1. Grab it here: [github]
  2. Download the .bat file and run it
  3. Type in your Tapo email and password when it asks (password’s hidden), leave the filter blank to list the lot
  4. Copy the device ID for whichever camera you want

The link itself is dead simple. This is what opens the app to a specific camera, just swap in your device ID from the tool:

intent:#Intent;action=android.intent.action.VIEW;component=com.tplink.iot/com.tplink.iot.view.notification.NotificationClickActivity;S.deviceId=YOUR_DEVICE_ID_HERE;S.msgType=Motion;S.hasCloudVideo=false;end

You drop that into your notification as the clickAction (tapping the notification opens the camera) and/or as a URI action button. Full example automation below.

Example automation (snapshot + live-view button)
alias: Camera - Driveway - Person Alert
triggers:
  - trigger: state
    entity_id: binary_sensor.your_camera_person_detection   # from the Tapo Control integration
    from: "off"
    to: "on"
conditions: []
actions:
  - action: camera.snapshot
    target:
      entity_id: camera.your_camera_stream
    data:
      filename: /config/www/driveway_latest.jpg
  - action: notify.your_mobile_app_device
    data:
      title: Driveway
      message: Person detected — Driveway
      data:
        ttl: 0
        priority: high
        image: "/local/driveway_latest.jpg?v={{ now().timestamp() | int }}"
        tag: "driveway_{{ now().timestamp() | int }}"
        clickAction: >-
          intent:#Intent;action=android.intent.action.VIEW;component=com.tplink.iot/com.tplink.iot.view.notification.NotificationClickActivity;S.deviceId=YOUR_DEVICE_ID_HERE;S.msgType=Motion;S.hasCloudVideo=false;end
        actions:
          - action: URI
            title: View Driveway
            uri: >-
              intent:#Intent;action=android.intent.action.VIEW;component=com.tplink.iot/com.tplink.iot.view.notification.NotificationClickActivity;S.deviceId=YOUR_DEVICE_ID_HERE;S.msgType=Motion;S.hasCloudVideo=false;end
mode: single

Couple of notes: /config/www/ maps to /local/, and this is Android Companion app only (it’s an Android intent, iOS has no equivalent for third-party apps).

On the “why should I trust a random .bat” front (fair enough too): open it in Notepad first if you like, it’s plain text. All it does is hit TP-Link’s own login server, exactly like the app does. Your login never goes anywhere except TP-Link, nothing comes to me, and the results stay on your machine. Won’t work if you’ve got 2FA on your Tapo account though.

Gotchas:

  • Windows might pop a “protected your PC” warning since it’s downloaded. More info > Run anyway.
  • Windows only (uses PowerShell, which is already built in).

Been running this all day since i have finally got it working without any issues, hoping they dont patch it!