-
-
Notifications
You must be signed in to change notification settings - Fork 1
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
Getting rid of Asterisk #1
Comments
You can see in my automation.yaml that I already use such sensor:
But on my tests, unless the VTO is connected to a SIP server (that's why Asterisk), such sensor won't fire. |
Thank you. I had tested before using the VTO's own SIP Server and it didn't work. But I will test again. You are not the first one who says it works. I have some questions though: The IP address you blurred is the VTO's IP address?
That is one difference. I purposely disabled cloud access on my VTO. Also, can you please explain what happens when you press the doorbell button with this setup? What audio does it play? If the sensor is working correctly, I would expect it to play "Calling now, please wait a moment" and then nothing else. |
|
Yes, intuitively that's what it does, but I read somewhere that these options can be changed, but you need to change them with "Enable SIP Server" unticked, save, and then tick it. Not sure if it's true anyway.
Amazing. I wish I could replicate that. I will do some tests this weekend. I hope I don't need to enable cloud function for this to work though. |
To add another point of data for your consideration @felipecrs my setup is identical to this of @moskovskiy82 as it comes to the VTO. Pressing the button will trigger an Opened/Closed event in HA for the button entity: The automation is as simple as:
As for the VTO side, the announcement would at first be something to the effect of "Calling now, please wait a moment", but don't remember the exact wording, followed by another announcement when the call fails (since I don't have anything set up to actually pick it up). I don't remember the wording verbatim, but something like "Call was not picked up...". This announcement is made after 20–30 seconds of ringing. I hope this helps! Would really love to recreate your setup without needing to deal with Asterisk, etc. |
You can solve that by cancelling the call as soon as possible after it starts ringing. Check my automation: dahua-vto-on-home-assistant/home-assistant/automations/doorbell-ringed.yaml Lines 13 to 15 in d03427b
|
But hey guys, if the You can just skip setting up Asterisk in this case, and proceed with everything else. :D |
@moskovskiy82 can you please extend the details? I am trying to get this working without the need of Asterisk. |
OK while waiting for @moskovskiy82 reply I would like to give Asterisk a try therefore @felipecrs can you please give me some further details? 🙏🏼 Like what "SIP Domain" did you enter to connect the VTO to Asterisk? Did you leave "VDP" or did you enter "asterisk" (as suggested by someone in another issue I cannot remember about)? Also what extension number is Home Assistant then? 801? I've got by the way a VTO2202F-P-S2. |
@Cr4z33 check the files in this repository, I believe everything is explained there. |
@felipecrs tell me did you have to enter the "5060" port and the "admin" SIP server username in the Asterisk integration config? Actually would you mind copying&pasteing the YAML config here please? 😬 I still can't get it working. 🥲 |
Where? I didn't understand it. Anyway, the config is pretty much default as far as I remember: ami_password: secretpass
auto_add: false
auto_add_secret: secretpass
video_support: false
generate_ssl_cert: true
certfile: fullchain.pem
keyfile: privkey.pem
additional_sounds: []
mailbox: false
mailbox_port: 12345
mailbox_password: ""
mailbox_extension: "100"
mailbox_google_api_key: ""
log_level: info |
@felipecrs thanks for sharing, but I got Asterisk working at last by editing I had to change the default port to After that my VTO calls got accepted by Asterisk. Now I have to keep adapting your Frigate card code to my entities and devices so it's still a long journey... 🥵 I hope you won't mind if I will reply here again? At the end of the day I think it's useful for everybody interested into it. 😅 |
I think you messed up with something. You didn't need to do this. Furthermore, chan-sip (
Absolutely not, please do it. |
Well before I was getting errors in the Asterisk addon logs when pressing the VTO button and also the Asterisk integration was accepting 5038 port only. As soon as I changed the port to 5060 in sip.conf the integration accepted it too (and the errors were gone). |
@felipecrs so far I got FINALLY working the Frigate card! 😁 I am replying this just to leave it here as a note for everybody out there. The main misunderstanding (if you are an average Home Assistant user like me hehe) in the Frigate Card code provided by Felipe is that Now all I have to do is adapt your automations to my house. |
Hey @Cr4z33, in fact |
Oh even more at risk of misunderstanding then lol! OK I take back what I said about go2rtc. 😅 |
But it's true, even though
|
Yeah I noticed it. Right now I am dealing with your ringing doorbell automation: first thing is that I replaced Fully Kiosk with Browser Mod that allows me to use more devices (ie. I've got a tablet running Linux), but generally speaking it's really a nice project for the Dahua VTOs! 👏🏼 Most of all I am happy I didn't have to setup a pfSense machineto deal with WebRTC SSL issues and others as needed with other projects. It works even with the Amcrest AD410 video doorbell so I guess it might work with HikVision and IMOU (they all belong to the same company after all) too! |
It should work with any camera that go2rtc can 2-way audio with. For Hikvision, you'll need @pergolafabio's add-on to stop the call and receive the events. |
A piece of news, Dahua released a new firmware for my VTO: V4.600.0000000.2.R.240802 I already upgraded to it, and everything remains working. I will test getting rid of Asterisk soon to see if something changed. |
Just to reiterate @felipecrs , as I've managed to get SIP working on my house alarm panel - Dahua integration https://github.com/rroller/dahua is working just fine in detecting button presses without the SIP server running on the VTO. I was treating over needing it to run SIP server on the VTO, since it didn't work with my Satel alarm system (it wouldn't recognize the VTO SIP), so was glad to see it works just fine with any SIP server setup thus far (more specifically mine is on INT-TSI panel from Satel). The issue I am having is I don't know if the VTO2101E-P-S1 (https://www.dahuasecurity.com/ceen/products/All-Products/Discontinued-Products/Video-Intercoms/VTO2101E-P-S1) has any chance of working with your setup, as the audio encoding doesn't seem to be adjustable (I believe). The thing I would like to work is to have the option to pick up SIP connections from HA phone APP, as I have a SIP wall alarm panel serving as the permanent reception device. |
I advise you to test the solution to change the codec in fix_vto_codecs.sh anyway. Or have you tried already and it doesn't work? Otherwise, if you want to keep using SIP, then you can use the SIP hass card: https://github.com/TECH7Fox/sip-hass-card BTW the purpose of this issue is to drop the dependency on an external SIP server. If I am understanding correctly, you still depend on an external SIP server and that's why the Dahua integration works. If that's not the case, i.e. if you are using the VTO embedded SIP server, please clarify. |
Thanks!! |
|
|
Thanks for all the help! |
Keep us updated as I'm using Felipe's solution and I am trying to include also my VTH touch panel to get the VTO SIP calls (at the same time with the Asterisk server). |
@convicte so has there been any success? 🙂 |
Came here to mention that Asterisk should hopefully not be necessary. I don't have a Dahua/Amcrest, but a similar Lorex and found a repo called DahuaVTO2MQTT that speaks the Dahua API and publishes messages to MQTT. Since Frigate usually means you've got an MQTT broker, this may be a simpler solution (if I understand correctly, the Dahua Home Assistant add-on is probably the same thing... so this is if you can't use add-ons, or if it isn't working for you for any other reason). The main repo is here: https://gitlab.com/elad.bar/DahuaVTO2MQTT Take your pick and hopefully one works for you (they're both docker containers). They should publish all the events you'll need - motion, button press, etc... |
@esand, do you use a VTH? |
No, I do not. I only have the Lorex doorbell which is built using Dahua stuff and a tweaked API that the DahuaVTO2MQTT app seems to still work with enough that I can get doorbell button press events (all I need it for). |
Got it. I'm very unoptimistic about it, considering rroller/dahua#359, but I'll give it a try once I get to it. Thank you! |
Got rid of Asterisk and found another trigger. Used: https://github.com/arnonym/ha-plugins ha-sip Config: enabled: true Now ha-sip is connected to the SIP Server running inside the VTO hence my HA now has an extension number. To trigger the automation I used a webhock trigger, creating an automation with the webhook trigger and adding the webhook ID generated on the automation to the ha-sip config: webhook: https://github.com/arnonym/ha-plugins ha-sip I was forced to find this since my binary_sensor.door_new_button_pressed of the VTO4202FB-P-S3 simply does not work with or without SIP server enabled on the VTO. Anyway @felipecrs , thanks for the automation, and the other insights.... it was a huge help to finish my environment. |
Great. This saves everyone from the pain of having to configure Asterisk. I will also try it and update the guide accordingly if all works fine. |
Also you might be able to play with this and answer the call after X seconds with a recorded message or.... need some more time to investigate... |
I was able to play audio (like Google TTS) to the doorbell using Alexxit's WebRTC integration media player. So, as long as the call is not ongoing, it can be used to play any audio back, including a message. |
Long time listener, first time caller. Using HA-SIP and the VTO acting as SIP server, as well as VTO2MQTT, I can now reliably* get MQTT messages when the button is pressed. I have a VTO 2211G-WP. I had no luck at all with Asterisk. Entirely user error, I suspect, with TLS proving somewhat beyond my skills... *Well - the VTO2MQTT container crashed and needed a "systemctl docker restart" to get going again, so maybe not so reliable... |
Found a link for this solution on one of the telegram channels. Is asterisk required only for the button pressed event?
As this is easily achieved with the dahua integration or i get something wrong? Would love to have the same set up but setting up an asterisk for this seems will take too much time
trigger:
entity_id: binary_sensor.kalitka_vto_button_pressed
from: 'off'
to: 'on'
The text was updated successfully, but these errors were encountered: