[Custom Component] Tapo: Cameras Control

Thanks for that.
That’s some scary stuff for us end users :astonished:
Can they only do that if they have access to my network already?
I’ve been meaning to setup a VLan for a while now but put it off because I couldn’t figure it out and didn’t want to accidentally open my network any more then it might be already.
Do you know if I blocked internet access to my 2 tapo cameras would they still work locally ? I know this integration probably wouldn’t work would it as it uses the cloud doesn’t it.
But i see the tapo cameras have the RTSP URL to use.
Thanks

  • In order to attack your camera attacker has to know your password or be inside your network. Under these conditions, we can say everything is vulnurable, including gmail, or your bank acc. Thats nothing new. (I am not going to go into detail here, encyption does make a difference but the point still stands)
  • Port forwarding is still a bad idea, but not because of how the camera communicates nor because of the lack of encryption. If you are inside the network it doesn’t matter if the camera is port forwarded. There might be other vulnerabilities currently unknown. Keep your camera uptodate if you choose to port forward.
  • vlan doesn’t open your network more unless you set it that way
  • This integration doesnt and never will use any cloud and works fully locally
1 Like

Didn’t realise that,
That’s great thanks.
I have port forwarded my Hikvision NVR with 2 PoE cameras connected to it so think I’ll put that and some other things into a vlan.
I only port forwarded a few things as I read it’s not ideal to use Upnp so I disabled it.

Just one single word. This guy is awesome. He tried for an hour or more to fix the problem at midnight tirelessly. He stands behind his software till the end. Once again thank you very much.

For the problem, in my case activating motion sensors for remote control is not possible. But without it, the image and the integration works just fine.

6 Likes

GSzabados thank you very much for your concern. I am not actually planning to use c200 at work anymore. I have another Tuya camera and will go with that and for the c200 I will bring it back home and use it as a door cam.

I wouldn’t do anything similar with a Tuya camera either.

I would rather set up HA on a RPi and would deploy the WireGuard addon to access it through that.

I know nowadays it is hard to get an RPi for a normal price. But a cheap old Thin Client would do as well. And as you have a public IP for your connection, you could set up a DYN DNS address as well easily.

Literally any other solutions which has encryption does a better job than opening a port for the Tapo camera.

I am actually not planning to expose Tuya cam to HA. It will only be used for surveillance purposes from the official Tuya App.

I have same concerns with you as well. I will never setup a camera inside my house for security concerns. The camera at work only stand in the hallway to monitor people while working.

You could do that with the Tapo app as well. And for recording you can use a MicroSD card, and you can access recordings on it remotely with the Tapo app. No need to open ports, etc

For this sort of surveillance I would rather advise for a better camera with wired connection and an NVR.

But of course, everything matters on your budget.

1 Like

Hi, there.
Could you elaborate more on how you run Frigate om your MacMini?
I am running HA in a VirtualBox on a MacMini. Unfortunately I am not sure how I could implement Frigate, so your setup running Frigate on a MacMini might be the way to go for me too.

Hey, its via docker.

docker run -d \
  --name frigate10.1 \
  --restart=unless-stopped \
  --mount type=tmpfs,target=/tmp/cache,tmpfs-size=1000000000 \
  --shm-size=512M \
  -v /Users/jurajnyiri/frigate:/media/frigate \
  -v /Users/jurajnyiri/frigateconfig/config.yml:/config/config.yml:ro \
  -v /etc/localtime:/etc/localtime:ro \
  -e FRIGATE_RTSP_PASSWORD='password' \
  -p 5001:5000 \
  -p 1935:1935 \
  blakeblackshear/frigate:0.10.1-aarch64

I recommend also going through the getting started and installation instructions on frigate. Especially the shm size, you might need to change that depending on number of cameras.

Let me know if you have any specific questions.

Hi, pretty basic question. I am trying to keep the LED on on my c200 even when privacy mode is enabled but it doesn’t seem to be working. Any idea? Thanks!

automation stop_camera1:
  - alias: 'Stop camera when disarmed'
    trigger:
      - platform: state
        entity_id: alarm_control_panel.ha_alarm
        to: "disarmed"
    action:
      - service: tapo_control.set_privacy_mode
        data:
          privacy_mode: 'on'
        target:
          entity_id: camera.camera1_hd
      - service: tapo_control.set_led_mode
        data:
          led_mode: 'on'
        target:
          entity_id: camera.camera1_hd

Camera turns off in privacy mode. Led signalizes that camera is running.

ok thanks! I imagined…was hoping to keep LED always on so people might think camera is always working (even if it’s in privacy mode).

Hello, I have a questions about my C200. Right now I have setup motion detection and when triggered, it plays alarm sound, sends notifications and start recording a video.

  1. Can I make it so the alarm sound keep playing until the recording is done (i.e. for the whole duration of the video)?
  2. Let’s say on trigger I record a 30 minutes video. What happens by default if in that time period the motion detection is triggered again?
  3. Is there any sort of callback about the recording? I’m using default Alarm Panel and I’d like to disarm it automatically after the recording is finished. Thanks!

my automations:

automation start_camera1:
  - alias: 'Start camera when armed night'
    trigger:
      - platform: state
        entity_id: alarm_control_panel.ha_alarm
        to: "armed_night"
      - platform: event
        event_type: telegram_command
        event_data:
          command: "/arm"
    action:
      - service: alarm_control_panel.alarm_arm_night
        target:
          entity_id: alarm_control_panel.ha_alarm
      - service: tapo_control.set_privacy_mode
        data:
          privacy_mode: 'off'
        target:
          entity_id: camera.camera1_hd
      - service: tapo_control.set_motion_detection_mode
        data:
          motion_detection_mode: high # high
        target:
          entity_id: camera.camera1_hd
      - service: tapo_control.set_led_mode
        data:
          led_mode: 'on' # high
        target:
          entity_id: camera.camera1_hd
        
automation stop_camera1:
  - alias: 'Stop camera when disarmed'
    trigger:
      - platform: state
        entity_id: alarm_control_panel.ha_alarm
        to: "disarmed"
      - platform: event
        event_type: telegram_command
        event_data:
          command: "/disarm"
    action:
      - service: alarm_control_panel.alarm_disarm
        target:
          entity_id: alarm_control_panel.ha_alarm
      - service: tapo_control.set_motion_detection_mode
        data:
          motion_detection_mode: 'off'
        target:
          entity_id: camera.camera1_hd
      - service: tapo_control.set_privacy_mode
        data:
          privacy_mode: 'on'
        target:
          entity_id: camera.camera1_hd
        
automation motion_detected:
  - alias: 'Motion detected = trigger alarm'
    trigger:
      - platform: state
        entity_id: binary_sensor.camera1_motion
        to: "on"
    action:
      # trigger alarm
      - service: alarm_control_panel.alarm_trigger
        target:
          entity_id: alarm_control_panel.ha_alarm
           
automation alarm_triggered:
  - alias: " Alarm is triggered"
    trigger:
      - platform: state
        entity_id: alarm_control_panel.ha_alarm
        to: "triggered"
    action:
      # notify home assistant
      - service: persistent_notification.create
        data:
          message: "# INTRUDER!!!"
          title: "## Motion Detected"
      # play alarm sound
      - service: tapo_control.set_alarm_mode
        data:
          alarm_mode: 'on'
          sound: 'on'
          light: 'on'
        entity_id: camera.camera1_hd
      # snapshot recording
      - service: camera.snapshot
        data:
          filename: '/media/snapshots/camera1_snapshot.jpg'
        entity_id: camera.camera1_hd
      # video recording
      - service: camera.record
        data:
          filename: '/media/video/camera1_{{ now().strftime("%Y%m%d-%H%M%S") }}.mp4'
          duration: 10 # in seconds. 1800 = 30 mins
        entity_id: camera.camera1_hd
      # telegram notification + snapshot   
      - service: notify.HASSIO_SICUREZZA # notifier_name
        data:
          title: "ALLARME ATTIVATO"
          message: "ALLARME ATTIVATO"
          data:
            photo:
            - file: '/media/snapshots/camera1_snapshot.jpg'
              caption: 'SNAPSHOT'

I saw the latest update of for the C320WS.

How are the LEDs working on that camera? Is it just IR or White Spectrum like the WS suggests, and does it work as a floodlight then?

And how is the line detection working on that model? Do you need a subscription for that as well?

Version 3.7.0 :rotating_light:

New Features

Breaking Changes

This release changes default RTSP transport mechanism to TCP, which should be more stable for the most users. If you experience any issues, slowness or any other negative effects after this release, go to configuration of your device in Home Assistant - Devices - Integrations and choose UDP as RTSP transport mechanism for every Tapo camera. Restart of Home Assistant is required after changing this setting.

1 Like

@JurajNyiri, have you seen the latest release notes of the new Tapo app?

  • Smart Spotlights: A close-up partial lighting to brighten your loved exhibits.
  • Tapo Hub: Connect wirelessly with a wide range of smart devices and make them work together.
  • Motion Sensor: Know when there is movement.
  • Contact Sensor: Know when doors/windows are opened or closed.
  • Smart Button: Tap or rotate to control lights and appliances.
  • Smart Switch: Make your traditional lighting smart.
  • Added support for IFTTT.
  • Improved the algorithm of Sync-to-Sound.

Some interesting devices are coming from Tapo. The Hub and sensors supposed to operate in a sub 1 GHz frequency range. The dimmer switch looks interesting as well.

I cannot wait to get my hands on one of them. Are you ready for some new challenge?

Just installed 3.7.1 vai HACS and the Tapo integration took 210s to load…, what the hell…

What is your hardware, how many cameras do you have and how long does it took before?

Have you tried to start HA once again?

Pi3B, 2 cameras and I never noticed it hanging before…, probably never took more than 60 seconds to start up completely after a restart.

Have not tried restarting since…