[Custom Component] Tapo: Cameras Control

I have since released beta-2 with important fixes.

By cloud account and cloud password I mean the password for your TP-Link Tapo account that you use to sign in to the official Tapo app. Everyone has one.

1 Like

Cool, guess it’s time to play around with recordings/local storage now then :slight_smile: … i haven’t spend much time/energy on my cams lately, actually disabled few in ha, do to to much “stream-traffic” to/from ha, and wifi-noise" in my network … been reading alittle about “go2rtc” and wondering if i should run a instance on proxmox in some vm there. And this way “Collect” the devices there.
As of now i’ve “overloaded” ha, with 4 tapo c200 (wifi), 2 c310(wired), + i have 2 wired and 1 wifi D-Link, and 2 usb cams … well as mentioned, a handful “disabled/removed” in HA ,at the moment

I’m running go2rtc bundled with Frigate and am trying to get a couple of Tapo C200 cameras set up as media players. I have installed WebRTC Camera through HACS. Looking at the example, it’s not quite clear what I need to do:

media_player:
  - platform: webrtc
    name: Dahua Camera
    stream: dahua
    audio: pcmu/48000
  - platform: webrtc
    name: Tapo Camera
    stream: tapo
    audio: pcma

How do I tell it what camera entity to talk to?

You need to add Tapo cameras to go2rtc config file first, then you can create proxy media players.

How do I find the go2rtc config when using the Frigate-bundled go2rtc?

The quoted config snippet, should that go in the go2rtc config or the HA config?

That goes into ha config. Go see documentation of go2rtc, you can add it either through web on the port it’s running at or via creating the file in root of ha config folder yourself.

I’ve checked out the go2rtc docs, but I feel what I’m missing is an understanding of how all the various components talk to each other. Like, my go2rtc is running in Frigate’s Docker container, which is separate from my HA Docker container. If I add it to my HA config folder, how would go2rtc see it?

When you say, add it through the web, would that be on http://frigate:5000/live/webrtc/?

Hey I would recommend asking for support in go2rtc repo.

Ok, fair. But I’m thinking, maybe my go2rtc config is fine, since I have configured the Tapo cameras in Frigate?

As for the HA config, don’t I need to reference the specific camera entity somewhere?

Thank you for posting this. I deleted some broken entities (camera motion sensors among them) from my system not realizing some where from the cameras that become “unavailable”. Tried removing and reinstalling and still motion sensors. After reading this I rebooted the cameras and triggered motion, refreshed the integration and boom, back in. Much appreciated.

1 Like

Hi there,

I have just installed the add on for use with my TapoC110.

I’ve noticed that my system seems to have slowed down dramatically! When accessing HA using the companion app, I regularly get the ‘Unable to connect to home assistant’ message, with the app taking approximately 13 seconds to launch to UI.

Any idea why this would be?
Full disclosure - I have no clue re video processing etc. I assumed adding a camera would be as simple a procedure as adding any device to HA.

Try enabling the stream integration and check logs for any error messages. That should not be happening.

When you say enable stream integration, is that done by ticking the stream box In the tapo add on? Or is there more to it than that?

I have this in my config, so I guess that means stream is up and running.

I’ve uninstalled the add-on and can confirm that my system seems to be back up to its usual speed. I run HA on an i5 laptop (only have HA installed on it) so didn’t expect there to be any issues with hardware speed.

Any ideas how to get to the bottom of this, as I would definitely like to be able to access the camera from within HA.

Try official onvif integration and when trying this one provide logs.

I am using an automation with a C110 which saves and sends a snapshot once the motion sensor is being triggered. This basically works.

But when I start watching the video stream while there are motions, the same automation produces no valid image anymore. That means, an 0-byte image will be stored and no image sent.

When I stopped watching the stream, it takes an indeterminate amount of time for the automation to be able to produce valid images again (maybe after an HA restart).

These are my settings.

(sorry, it’s German)

grafik

grafik

grafik

Is this normal, i.e. I cannot have both functions at the same time, or do I have to tweak something? Thank you!

Try using stream component from HA, maybe it will work better. There is a limit of maximum number of streams on the camera and in order to create a photo another stream session needs to be opened, there is nothing that could be done about it from my side as stream is handled by HA, this integration just informs HA about the url where the stream is.

For this purpose I would recommend using something like Frigate though, it is a lot better at it.

1 Like

Hi for info on my RPi 4 4GB I am running HA + Frigate + this Tapo integration and it works well with 5x C200 cameras + 3x C310 cameras. I could not imagine that it could handle so much to be honest.

What I found was working good for me is (I just started using the new beta version of Frigate that uses go2rtc, which was out just before this integration implemented also go2rtc):

  • In the new version of Frigate there’s go2rtc embedded so I channel all SD streams to it, as well as 3 HD streams (2x C310 and 1x C200 cams)
  • then I retrieve the go2rtc streams in Frigate and apply whatever needs to be applied for recording and detection (using Coral dongle)
  • then I live-stream the go2rtc SD streams in different picture glance cards, with overlay from this Tapo integration

I tried chanelling all the HD streams via go2rtc for the recording streams but I’m a bit high on CPU and definitely too high for the 4GB RAM (maybe that could still work with the 8GB version), but 3 HD recording steams are still OK.

I believe if one does not want to use Frigate it is very useful to use go2rtc within the Tapo integration then restream from there. With the direct connection to the camera it takes a few seconds before the first picture is displayed, and it updates every several seconds, while with go2rtc it is near instant and live.

Here is the type of lovelace card that I create using the combination of both Frigate + Tapo. I can display all 8 cards together in a dashboard, and all streams are live together, and pan-tilt is also (slowly) working, that’s amazing!

    camera_view: live
    type: picture-glance
    camera_image: camera.your_cam_from_frigate_go2rtc
    entities:
      - entity: button.my_cam_sync_time
        tap_action:
          action: toggle
      - entity: button.my_cam_move_left
        icon: mdi:arrow-left-drop-circle-outline
        tap_action:
          action: toggle
      - entity: button.my_cam_move_up
        icon: mdi:arrow-up-drop-circle-outline
        tap_action:
          action: toggle
      - entity: button.my_cam_move_down
        icon: mdi:arrow-down-drop-circle-outline
        tap_action:
          action: toggle
      - entity: button.my_cam_move_right
        icon: mdi:arrow-right-drop-circle-outline
        tap_action:
          action: toggle
      - entity: switch.my_cam_privacy
        tap_action:
          action: call-service
          service: switch.toggle
          service_data:
            entity_id: switch.my_cam_privacy
      - entity: switch.my_cam_indicator_led
        tap_action:
          action: call-service
          service: switch.toggle
          service_data:
            entity_id: switch.my_cam_indicator_led
      - entity: select.my_cam_move_to_preset
    hold_action:
      action: more-info

which looks like this:
image