Hello everyone. I’m kinda noob in all that streaming stuff, but I want to play audio on my doorbell Dahua VTO2111D-P-S2. I already aware that there is some problem with audio codec in my doorbell, so I changed it to PCMA/8000 by script, and I even could use 2-way audio via HTTPS between my browser and doorbell, but I’m still don’t understand how to send audio file on it. According to guide from webrtc github page, I have to create virtual media_player using my doorbell from go2rtc addon, so I did it:
- platform: webrtc
name: Dahua Camera
stream: dahua
audio: pcma
I used pcma because Alex said that there is no PCMA/8000 for that case, and I also used that in my go2rtc config:
dahua:
- rtsp://admin:[email protected]:554/cam/realmonitor?channel=1&subtype=0
- ffmpeg:rtsp://admin:[email protected]:554/cam/realmonitor?channel=1&subtype=0#audio=pcma
As far as I understand, ffmpeg should “convert” audio to right format or something like that.
But in the end, I have media_player.dahua_camera object with unknown state and when I trying to play file/tts it gives me this error:
Logger: homeassistant.components.websocket_api.http.connection
Source: custom_components/webrtc/media_player.py:74
Integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 01:46:22 (2 occurrences)
Last logged: 01:55:57
[140510124775680]
Traceback (most recent call last): File “/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py”, line 199, in handle_call_service await hass.services.async_call( File “/usr/src/homeassistant/homeassistant/core.py”, line 1849, in async_call task.result() File “/usr/src/homeassistant/homeassistant/core.py”, line 1889, in _execute_service await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)( File “/usr/src/homeassistant/homeassistant/helpers/entity_component.py”, line 226, in handle_service await service.entity_service_call( File “/usr/src/homeassistant/homeassistant/helpers/service.py”, line 798, in entity_service_call future.result() # pop exception if have File “/usr/src/homeassistant/homeassistant/helpers/entity.py”, line 980, in async_request_call await coro File “/usr/src/homeassistant/homeassistant/helpers/service.py”, line 838, in _handle_entity_call await result File “/config/custom_components/webrtc/media_player.py”, line 74, in async_play_media assert r.ok AssertionError
Can someone help me with that please?