[Custom Component] Tapo: Cameras Control

Thank you! :slight_smile: It will take a couple of days at least to finish the release so no hurry. I will post a zip file on discord channel testing when it is ready.

Hey, thanks for this wonderful component!!!

Quick question, i have already set up the cameras through onvif and they seem to be working fine, so i dont want to mess with that.

I can disable the streams from the component and just keep the motion sensor for each camera right?
I would lose the tpz and other commands functionality though as the services depend on the streams, right?

Thanks in advance and again, thanks for the component!

Hey, you can but then you would have no entity to call in services so the whole integration would not be needed. Onvif also creates motion sensor for the cameras.

Ah so that’s what these were: “MyMotionDetectorRule Cell Motion Detection”
I had disabled them as they stayed on (indicating motion detected) indefinately.

And now that im checking the new sensors (the ones from the tapo component), they also stay on indefinately.
image

Any ideas as to how to troubleshoot? Lower the sensitivity perhaps?

Yeah there was one user who was experiencing the same https://github.com/JurajNyiri/HomeAssistant-Tapo-Control/issues/26.

See the troubleshooting section in readme, play with sensitivity, make sure the camera is set up correctly etc. I am not sure what could be causing this. If you figure it out please let us know!

Probably yes, but might need some work from @JurajNyiri to fully support the C310 as well.

@JurajNyiri Does it support the C310 as well?

And is it possible to make a service for setting the alarm on or off?
I want the motion detection always on but would like to turn off the alarm when i am at home.

Thanks for your awesome work!

Thank you :slight_smile:

It needs to be tested, I do not own c310 and I do not plan to buy it as I already have all the outside cams I need.

The service for alarm has been available since 2.0, check the readme services section, you are able to automate what you described.

1 Like

@JurajNyiri can answer this question. @JurajNyiri, is it possible to do with the current videostream? Or is the new feature what you planned was the snapshot?

Anyone had issues after upgrading to 117.0 ?

I got

Setup failed for tapo_control: Unable to import component: No module named 'zeep.asyncio'
7:45:34 AM – setup.py (ERROR)

See post 44 in this thread. Issue was in HA 0.116.3 and fixed with 2.1.1 of this component.
At a guess you need to update this custom component :+1:t2:

@djm you can do this with the camera.snaphost service.

action:
  service: camera.snapshot
  data:
    entity_id: camera.yourcamera
    filename: '/tmp/yourcamera_{{ now().strftime("%Y%m%d-%H%M%S") }}.jpg'

A word of warning, this appears to have issues at times which I suspect are linked to the current streaming issues that are being worked on.

2 Likes

Sorry, but I don understand, what wrong on this code. If I tap the button, nothing does it. :frowning:

type: button
tap_action:
  action:
    - service: camera.snapshot
    - data:
        entity_id: camera.tapo_hd
        filename: '/config/tmp/yourcamera_{{ now().strftime("%Y%m%d-%H%M%S") }}.jpg'
entity: camera.tapo_hd

@radek-foltyn I’m not so hot on buttons but the first thing I’d try is changing the path to the media directory which is available by default in HA (115 onwards I think) e.g.

type: button
tap_action:
  action:
    - service: camera.snapshot
    - data:
        entity_id: camera.tapo_hd
        filename: '/media/yourcamera_{{ now().strftime("%Y%m%d-%H%M%S") }}.jpg'
entity: camera.tapo_hd

Another approach is to create the snapshot via a script, that way you can reuse it if needs be.

Here’s a quick example based on my camera name:

'1604089117818':
  alias: Front Door Camera Snapshot
  sequence:
  - service: camera.snapshot
    data:
      filename: /media/frontdoorsnapshot_{{ now().strftime("%Y%m%d-%H%M%S") }}.jpg
    entity_id: camera.front_door_hd
  mode: single

Then you can created a button that calls the script.

type: button
tap_action:
  action: toggle
entity: script.1604089117818

Hope that helps?

It still doesn’t work with the button. May I ask why? Using a script it’s ok.

I’m still learning so can’t really say what exactly but I would suggest its something to do with the YAML structure/format - especially if the script works. I’ll try and have a look later though. hopefully someone else will come along with more experience than me :slight_smile:

How about using a picture card?

type: picture-entity
entity: camera.tapo_hd
camera_image: camera.tapo_hd
camera_view: live
tap_action:
  action: call-service
  service: camera.snapshot
  service_data:
    entity_id: camera.tapo_hd
    filename: '/media/cameratapohdsnapshot{{ now().strftime("%Y-%m-%d-%H%M%S") }}.jpg'
name: Click For Snapshot

The above works for me. You get a live feed as the picture and clicking will take a snapshot. All I’ve done thats different from my working code is change the camera name to your cameras name so this should work.

I cant get it to work with a button either.

You´re right, got it working now. Thanks!

I have updated today my Home Assistant and Supervisor and now i get this error when i restart:

Invalid config

The following integrations and platforms could not be set up:

Anyone getting the same?

What is the error in the log?