JurajNyiri / HomeAssistant-Tapo-Control

Control for Tapo cameras as a Home Assistant component
Apache License 2.0
1.08k stars 87 forks source link

Feature Request: Two way audio - audio entities. #99

Open CoYoNq opened 3 years ago

CoYoNq commented 3 years ago

Is your feature request related to a problem? Please describe. nope

Describe the solution you'd like use audio in 2way audio enabled devices for rec/playback

Additional context Would be great to use the audio features in scripts (ie, recieving voice commands or sending custom notifications)

JurajNyiri commented 3 years ago

Unfortunately, not currently possible as noone figured out how it works. First someone will need to do that and then it can be implemented into https://github.com/JurajNyiri/pytapo/ . Some work is documented in https://github.com/JurajNyiri/pytapo/issues/4 .

JurajNyiri commented 1 year ago

Need more help at https://github.com/JurajNyiri/pytapo/issues/41

dm82m commented 1 year ago

@JurajNyiri as AlexxIT found a way and provides the functionality to use 2-way-audio through go2rtc - is there any plan that your integration will support 2-way-audio in the future?

JurajNyiri commented 1 year ago

It is now possible to use camera as media_player, see webrtc integration readme. This gives you a possibility to send any sound to the camera, or even open 2 way talk session via a browser in any device.

I will keep this opened as I might implement it also here in the future, but it is not a priority right now.

krasatos commented 8 months ago

Hey there :) Any progress on this front?

JurajNyiri commented 8 months ago

This can be achieved with webrtc so the priority is very low to not going to implement.

ssorgatem commented 2 months ago

It doesn't seem to work with my WS320 cameras with webrtc... it does for the C200 though

pepijndevos commented 1 month ago

Could anyone share their working tapo webrtc two way configuration?

ssorgatem commented 1 month ago

Could anyone share their working tapo webrtc two way configuration?

Make sure to use go2rtc with the "tapo://" protocol (not direct rtsp) to connect to the camera. I use the one bundled with frigate.

Then, on configurtation.yaml I have this:

media_player:
  - platform: webrtc
    name: tapo_davant
    stream: davant
    audio: pcma
  - platform: webrtc
    name: tapo_barbacoa
    stream: barbacoa
    audio: pcma
  - platform: webrtc
    name: tapo_nens
    stream: nens
    audio: pcma
  - platform: webrtc
    name: tapo_bressol
    stream: bressol
    audio: pcma

Where "stream" is the name of the stream in your go2rtc config.

This is working for C200 cameras but not for WS320 cameras for some reason.