cri.dev
about posts rss

How to add a TP-link Tapo camera to homeassistant

Published on
Tagged with iot2

After struggling to add my tp-link tapo devices (specifically cameras) to my homeassistant instance, found a way to get everything working properly.

Everyone gets a static IP

First of all, I suggest you assign your cameras a static IP.

If you struggle to find your camera’s IP in your router settings, check out the MAC address of your camera (you’ll find it on the bottom side) and assign that a static IP.

This will save you several headaches and your future self will thank you.

At this link you can find all the info to set up a camera account that you’ll use to access your cameras outside of the tp-link app

https://www.tp-link.com/en/support/faq/2790/

ffmpeg dry-run

Once you have your camera’s IP and access credentials, you can try things out in the terminal.

You’ll need ffmpeg installed.

ffmpeg -i "rtsp://<USERNAME>:<PASSWORD>@<IP>:554/stream1" -f image2 -vframes 1 -pix_fmt yuvj420p output.jpg

If the image is created, things are looking good.

Homeassistant setup

In the “Integrations” page, just add a new integration named “Generic Camera”.

When adding a new camera, these are the settings I used:

“Stream source URL”: rtsp://YOUR_IP:554/stream1

“RTSP transport protocol”: UDP

“Authentication”: Basic, and provide username and password in the dedicated fields.

Disable “Verify SSL certificate”

Here, have a slice of pizza 🍕