[Custom Component] Tapo: Cameras Control

Please refer to your network router manual.

1 Like

Okay, but for that camera what IP do I have to block?

The local IP of the camera, make also sure it is static.

1 Like

Can someone help me with the creation of a button to switch motion detection of my C210 on/off? I’ve started with the “off” which seems to work as I see it get switched off, but I always get an error:

image

The yaml created by the button wizard is:

show_name: true
show_icon: true
type: button
tap_action:
  action: call-service
  service: select.select_last
  target:
    device_id: 4ff5a41ba095e6532479fa8adbecf9bd
    entity_id: select.tapo_camera_7b83_motion_detection
  data: {}
entity: select.tapo_camera_7b83_motion_detection

Running v4.2.4PSA of the integration

Button is not a switch and thus can only do one action and not two.

Example of a button that will set motion detection to high:

show_name: false
show_icon: true
type: button
tap_action:
  action: call-service
  service: input_select.select_option
  target:
    entity_id: select.tapo_camera_7b83_motion_detection
  data:
    option: high
entity: camera.tapo_camera_7b83
show_state: false

What you are probably looking for is Template Switch - Home Assistant.

      tapo_privacy_switch:
        value_template: "{{ is_state('select.tapo_camera_7b83_motion_detection', 'high') }}"
        turn_on:
          service: input_select.select_option
          data:
            entity_id: select.tapo_camera_7b83_motion_detection
            option: high
        turn_off:
          service: input_select.select_option
          data:
            entity_id: select.tapo_camera_7b83_motion_detection
            option: off

And then you can use service switch.toggle in button (it is 1 action):

show_name: false
show_icon: true
type: button
tap_action:
  action: call-service
  service: switch.toggle
  target:
    entity_id: switch.tapo_privacy_switch
entity: camera.tapo_camera_7b83
show_state: false

I haven’t tested any of this but I think it should work like you want.

1 Like

Actually, what I was trying to do was expand the custom:stack-in-card and have the button when pressed switch it off, and if pressed&held to switch it to high. So I now tried this for just the switching off, but it doesn’t do anything:

  - type: horizontal-stack
    cards:
      - type: button
        icon: mdi:motion-sensor
        state_color: false
        show_name: false
        entity: select.tapo_camera_7b83_motion_detection
        tap_action:
          action: call-service
          service: input_select.select_option
          data:
            option: 'off'
          target:
            entity_id: select.tapo_camera_7b83_motion_detection

Does it set the select entity to off?

No, I managed to look at the logs and saw this:

2023-03-23 13:15:53.217 WARNING (MainThread) [homeassistant.helpers.service] Unable to find referenced entities select.tapo_camera_7b83_motion_detection or it is/they are currently not available

The name is correct:

And I do have an automation that is working, I just want a button to override it when needed:

Hello, I bought a C210 and already integrated that to home assistant. Works fine. The camera is looking on a small display at the door and now i am searching for any zoom function eather from the camera or from home assistant to only zoom on this small display. Any idea?

Best regards
Michael

Which one is the url for the still_image? I had an old one and doesn’t work anymore in my automation for snapshots.

Version 5.0.0 :movie_camera:

New Features

  • Media Browser: Browse your recordings stored on camera in Home Assistant.
  • Previously played recordings are securely cached for 24 hours on your Home Assistant host and when requested to play, moved instantly and securely to hot storage from which they are played.
  • Requesting a recording which has not already been cached in Home Assistant can take a longer time as downloads from cameras are really complex and slow process.

Developer Note

Ability to download recordings has been worked on for more than 2 years with a lot of dead ends and 10s to 100s of hours spent on it across multiple developers. It was finally possible thanks to go2rtc and Alex X, who found the last missing piece of the puzzle. Huge thanks also goes to Davide Depau who discovered and wrote the first implementation and core of streaming communication protocol used for this.

Fixes

Breaking Changes

If you wish to play or download recordings, you will need to add cloud password to your camera configuration.

1 Like

hmmm, media-browser , so i actually need a cloud-acount ?, does it not use the “extra” camera-account, user/passwd ?

You already have tplink / Tapo account that you used to sign in to the Tapo app. Media browser requires to enter password for this account into “Cloud password” field if you haven’t already (some cameras require it for control).

All communication is fully local as always :slightly_smiling_face:

1 Like

Nice, this was a long lasted on the Wish-List … dreams comes through :slight_smile:

1 Like

Thanks for the update :+1:
When I view the recording times in media browser all the times are +1 hour… although the app and timeline is correct in the app and within HA. I’m in the UK and have the time zone set to UTC 00:00… if I set it to anything else eg(+1) then the time displayed on the stream and app playback ribbon is wrong.
Am I doing anything wrong???

Hello, make sure your home assistant timezone is set correctly.

Testers needed for 5.1.0 having new configuration entities for AI (vehicle, baby cry, pet, bark, meow, glass break and tamper detection) and patrol mode.
I was not able to test vehicle, pet, bark, meow and glass break. Please let me know if you have a camera which supports it and whether it works!
Download now: Release 5.1.0.beta.1 · JurajNyiri/HomeAssistant-Tapo-Control · GitHub

Is there anyone that can help me with opening ports in the amplifi app (the router on which HA and the camera reside) - I attached the configuration file of the router as it is now.

For a brief moment I had the camera showing up in my HA, but I had no streams. I decided to delete the integration again and start all over, but now it won’t let me add the camera again. I have given it a static lease. The IP address you see is the address of the HA installation.

have you rebooted your system ?