-
-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
2 Way Audio not working in Frigate Card #184
Comments
I would like to add a guide for those wanting to get their Hikvision doorbell working with the web-rtc card complete with mp3 playback. Eventually it will be updated for the Frigate card when 2 way audio is resolved with it. |
Great guide , not sure if I need to combine it or not... Gonna wait for the frigate updates first, because that card is nicer indeed... Also next update doesn't require frigate add-on/integration... Just question, why do you have the camera defined 2 times in go2rtc , why not use the first one for the mp3 also? |
I tried using the first one but could not get the mp3 to play for the life of me. When I defined it again but with channel 102 it works reliably every time. Also another weirdness, when I update webrtc-camera to version 3.5.1 then I start having issues with mp3 playback and intermittent 2 way audio. I'm on master which is working but obviously should move on once I find out why it's playing up! |
You managed to solve the problem. I have a Hikvision camera and doorbell. The problem was this. At first there was sometimes intermittent two-way communication. And now when I press the microphone, the sound disappears. |
ok, found the issue!! dermotduffy/frigate-hass-card#1356 The issue that two way audio isnt working the second time, is that the "close" command is not being used in the go2rtc addon, it will be implemlented later!! for now i send the command below, right after you do the answer/hangup and before pressing the mic button, this makes the previous twoway audio close first...
I keep this one open, untill a new go2rtc addon is released!! |
Thank you |
update 1.9.0 is released, but seems the issue is still present, i still send the curl , before i start two way audio |
Thank you. I'm really looking forward to the fix. |
Same, but the curl is working great!! |
Добрый вечер не могу заставить это работать. |
I do this in the frigate card for my "phone/answer" button:
First i do the script, to make my answer+hangup+close audio This is my script:
and my shell command is:
|
hikvision_close_audio: "curl -i --digest -u admin:XXXXX -X PUT http://192.168.0.70/ISAPI/System/TwoWayAudio/channels/1/close" |
correct |
Damn, nothing works. All the same, the sound gets quieter and then starts to break up if I log in several times and go to the card with a microphone. type: custom:webrtc-camera Only reloading the Go2rtc configuration helps |
So how is everything right? hikvision_close_audio: "curl -i --digest -u admin:XXXXX -X PUT http://192.168.0.70/ISAPI/System/TwoWayAudio/channels/1/close" |
yeah thats why i do |
admin:XXXXX-X PUT |
Hi |
it works, but if you answer the doorbell 2 times when not refreshing the card, i dont have audio, you can send the close command i posted earlier i saw new updates on the card, didnt try yet, maybe its better now |
Thanks for letting me know. frigate.yml: ` cameras: detect: go2rtc: and streams info from go2rtc: { |
sorry, no idea, for mic to work, you need https with valid ssl, mauybe thats the issue? |
Hi, I have the same problem with two-way-audio when browsing away from the frigate-card after first use of the microphone. The first time it works, but if I browse away to another lovelace section and then back to the section with the frigate-card, two-way-audio isn't working anymore. The browser doesn't show the microphone status icon again, so for me it seems that no new microphone connection is made to the browser? Below is the relevant part of the frigate-card config, I thought using the ISAPI channel close command would solve my problem, but it isn't. I have to reload the whole page, or wait a few minutes. Then the mic connections starts again if I click the phone icon.
Any idea? Also in the addon log I can see that the channel close command works successfully
|
When I tested it a long time ago, I saw the phone button always, I was able to toggle it... |
Hmm I always see the phone button? Do you mean the microphone button? I always see the microphone button in the frigate-card. I have the same problem as you had, until you were able to fix it with the channel close command. What I meant with
is, that my browser shows the red microphone icon on the tab which is using the microphone. This icon is missing and the microphone doesn't work. |
Hmm, not sure, I didn't test it anymore for a year :-( |
Hmm, than I don't understand your comment you made here, only a few months ago 😅 -> dermotduffy/frigate-hass-card#1356 (comment) |
Well, if I do the hangup, I send the close command also, so the twowayaudio is really closed.. |
I also send to close command now when pressing the phone-hangup button. Still not working when would you be so kind as to share your current config of the card? |
I don't use it anymore, the last update is on the GitHub page :-) |
yes, that works, but ONLY if i also send the command below when i click on the hangup button (or send if before you you do do the answer) ... thats why the "original" mic button on the card doesnt work, it doesnt send the isapi command maybe the command below on your doorbell station doesnt work? whay happens if you do it in putty? gives it back an 200 state? shell:
|
isnt the action below forcing it back to oneway audio?
|
I do send the close command. In your addon I can see the reply, which contains "ok". So the command seems to work. I'm not able to try with curl, as I have a "!" in my password and I wasn't able to get it working, though trying different methods of escaping it.. The My frigate-card config type: custom:frigate-card
cameras:
- camera_entity: camera.doorbell
live_provider: go2rtc
go2rtc:
modes:
- webrtc
menu:
style: outside
position: bottom
buttons:
microphone:
enabled: true
type: toggle
screenshot:
enabled: false
download:
enabled: false
fullscreen:
enabled: false
snapshots:
enabled: false
timeline:
enabled: false
media_player:
enabled: false
clips:
enabled: false
live:
enabled: false
cameras:
enabled: false
frigate:
enabled: false
camera_ui:
enabled: false
live:
controls:
builtin: true
auto_mute: []
lazy_unload: []
microphone:
always_connected: false
disconnect_seconds: 20
elements:
- type: custom:frigate-card-menu-icon
icon: mdi:volume-high
tap_action:
- action: custom:frigate-card-action
frigate_card_action: unmute
- type: custom:frigate-card-menu-icon
icon: mdi:volume-off
tap_action:
- action: custom:frigate-card-action
frigate_card_action: mute
- type: custom:frigate-card-menu-icon
icon: mdi:phone
tap_action:
- action: custom:frigate-card-action
frigate_card_action: unmute
- action: custom:frigate-card-action
frigate_card_action: microphone_unmute
- action: perform-action
data:
entity_id: button.eingang_hangup_call
perform_action: button.press
- action: call-service
service: text.set_value
data:
entity_id: text.eingang_isapi_request
value: PUT /ISAPI/System/TwoWayAudio/channels/1/close
- type: custom:frigate-card-menu-icon
icon: mdi:phone-hangup
tap_action:
- action: custom:frigate-card-action
frigate_card_action: microphone_mute
- action: call-service
service: text.set_value
data:
entity_id: text.eingang_isapi_request
value: PUT /ISAPI/System/TwoWayAudio/channels/1/close
- type: custom:frigate-card-menu-icon
icon: mdi:door-open
hold_action:
- action: perform-action
data:
entity_id: switch.eingang_door_relay_0
perform_action: switch.turn_on
dimensions:
aspect_ratio_mode: static
aspect_ratio: "16:9"
cameras_global:
dimensions:
layout:
fit: fill
status_bar:
style: none |
But you are using the core go2rtc config? Maybe that's conflicting? I had that too , I removed the camera. ... Have a look at my code again, I updated it, I use an URL instead... |
The core integration doesn't support two way audio |
No, the frigate-card example was using go2rtc via the frigate addon. |
Ah ok, I don't use that frigate addon |
At the moment I'm trying to get rid of the frigate addon. go2rtc addon already works, but I want to use the core go2rtc integration which has the option to specify an go2rtc server -> https://www.home-assistant.io/integrations/go2rtc/#examples But nothing happens, I thought the core go2rtc integration will create the camera entities in this case? |
Are you running the latest go2rtc binary,? They added some changes to it, maybe the frigate addon isn't using the latest go2rtc |
There was an audio close channel command added to the go2rtc addon, maybe since you are using the frigate addon, you are missing that one, I look up later |
Btw, I don't think you need to send the Isapi close command at all... It's only needed when you send first the answer command, in my setup, the doorbell has actually the audio open ... If you send just hangup, there is no need to close audio |
Frigate is using a version > 1.9.0, so the fixed version should be already included. I have the go2rtc addon running. I don't want to expose go2rtc on my proxy. I tried to use the go2rtc stream url which I get when visiting the go2rtc UI via HA Ingress, but this is not working in the frigate-card (stream is not starting, no request seen in the go2rtc log). Now there is the core go2rtc integration (https://www.home-assistant.io/integrations/go2rtc/#examples) where I have specified my go2rtc addon address, but nothing happens (no error, no new entity, just nothing). Do you know what additional steps I have to take to get the camera into HA? |
ingress indeed doesnt work i think, but i use nginx, i didnt expose 1984 or 1985 ; i just use 8123 to access go2rtc , but offcourse its open to outside word, so used a strong user/pass combo |
I think we could get it work with the core go2rtc integration, then no exposing would be needed. |
not sure, you still need to point to the go2rtc addon, but i didnt test that yet will do it in a few moments :) |
this is what i was talking about also: |
if you use this:
i dont think it will work, since its not running on https, for the mic support you need https .. that means go2rtc needs to be running with a valid ssl anyway? |
but what would be the point of specifying the |
its a way of disabling the core integration if you dont need it ... i use the core integration for normal cameras, and i use the addon only for my tuya cameras, they are quite specific and dont work with the core... maybe some users dont want to use the core at all |
but let me try, rebooting HA now, specified the addon now with the core integration |
Do you have any expectation what should happen after specifying the external go2rtc server? I thought it will create a camera entity. |
hmm, that doesnt work, specified the addon url, then did it like below, but it fails to load, it needs https
|
no, it doesnt create an camera entity, its just if you want to make control of your own go2rtc instance, and dont want to make use of the core integration at all, you still need to make the cameras in go2rtc.yaml, but even that doesnt create an camera enitty... i'm not pointing to a camera entity in my frigate card, i actually point to the stream source from go2rtc |
I think I don't understand the use case of using the external go2rtc server with the core integration. I know that you have specified the url in the frigate-card, but I thought that I can create the entity in HA and then using this entity (just like before using the frigate integration). |
you dont need to point indeed an external go2rtc, its not needed, and you dont need an camera entity either... just make sure this url works from outside: https://user:[email protected]:8123 OR https://user:pass@homeassistant:1985
|
I think I have found out for what it is used for.. I have created a generic.camera in HA and suddenly this camera also was present in the go2rtc addon, EDIT: I don't know how, but somehow the generic.camera also appeared in my go2rtc.yml config 😅 |
yes indeed, thays why i use the core integration, i have 8 cameras, to make them webrtc... but you cant use the core integration for the twowayaudio ... cause you need to customize the yaml for it |
got it working now with go2rtc addon and frigate-card, but issue still exists. If I browse away on the lovelace card and back to it, somehow the mic session is lost and the microphone won't work.. :( |
thats annoying :-( |
What happened?
Not an issue with the Hikvision Camera Integration - however I was unable to consistently get 2 way audio from the Frigate card for the Hikvision Camera Integration. This is an issue being dealt with but in the meantime we are using the web-rtc card which works but slightly clunky.
Add-on
Hikvision Doorbell
What version of the add-on are you running?
3.0.14
Installation type
Home Assistant add-on
Relevant log output
No response
Relevant configuration
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered: