Vivint Doorbell Integration

Hey Tommy,

Im trying to configure that when motion is detected, the camera will notify HA, but im having trouble finding the script which activates when motion is detected (Im assuming there is a script that is being called similar to play_sound for when the button is being pressed). Any help is appreciated.

Cheers

I haven’t searched around to see if there is a similar script but there is likely not one.

However since Motion Detection is done by the Vivotek software and in general you have to setup Motion detection using the Vivotek GUI (Goto “Configuration” tab and Applications->Motion Detection), you can also configure the Vivotek software for an “Event” using the GUI (Goto Event->Event Settings).
For an “Event”, you would use the motion detection as a trigger, and one of the actions you can define for an event is “Server” (with some “server-name”).

Configure a “Server” with your “server-name” and configure it with an HTTP URL. I just tried this by setting the URL to http://HA_IP_ADDRESS:PORT/api/webhook/DoorbellMotion and when the trigger occurred (I used a manual trigger to test out), Vivotek sent an HTTP POST with the /api/webhook/DoorbellMotion to that address and port.

Hope this helps.

Hi all,
I wanted to share a project that I have have been working on that allow you to establish a two-way audio call with the Vivint/Vivotek Doorbell from a web browser. The project is made up of 3 parts:

  • DoorVivint Card - A Lovelace card that can view your Vivint/Vivotek Doorbell video, and with the push of a button, establish a two-way call with the doorbell. It uses JSSIP and relies on the webbrowser’s support for WebRTC to work properly and as I found out, not all do :frowning: ). As WebRTC uses secure websocket’s, you really need to have a public SSL certificate (duckdns will do).
  • app_rtsp_sip - An Asterisk application that handles the split audio streams of the Vivint/Vivotek Doorbell (audio from the doorbell is setup using RTSP, and audio to the doorbell is setup using SIP). It is a companion project to DoorVivint Card.
  • Asterisk - Asterisk is a free opensource IP PBX. It connects to the DoorVivint card directly (using a websocket), and to Vivint/Vivotek doorbell via the app_rtsp_sip application. It is the brains that lets the DoorVivint Card call the Vivint/Vivotek doorbell. To get app_rtsp_sip working with Asterisk, both need to be compiled from scratch and subsequently installed.

It is a rather involved task to get all this setup and running, but I have done my best to provide instructions to do just that.

Currently I have this working on Chrome running on Windows 10. My ultimate goal was to get this working on my Home Assistant iOS App, but thus far I have been unsuccessful getting this part of the project working. Similarly, depending on your browser’s support for WebRTC and JSSIP, it may or may not work for you.

Best Regards.

4 Likes

Wow Tommy,

That’s amazing. I am trying to get this working on my vivint camera too I believe i have the same model as James_Y. I’m at the step of adding the card, however without luck. Any Tips?

Maybe i did not add the correct resources? I installed via manuel and HACS both method yeilded failed result. May I see how you added your resources?

Please Advise/?

Add via HACS.

Check this thread to see if this helps:

I think what you have was what use to be the old way of configuring resources into ui-lovelace.yaml. This has since moved into configuration.yaml.

Also another thing to look into, the card config you show may need to be shifted to the right by two spaces.

Hi all,

I’ve been working with HA for about a month now, and have recently followed the advice of this thread to get my Vivint doorbell onto my local network. It is a DB8332-SW Version 0200m, if that matters. Originally using the default password and now with a revised password I have both http and telnet access.

The additions to configuration.yaml seem very straightforward, I’ve just used items from https://www.home-assistant.io/integrations/vivotek/ and the config passes all checks. For completeness, my config is:

camera:
  - platform: vivotek
    name: 'Front Door Camera'
    ip_address: 192.168.1.5
    ssl: false
    verify_ssl: false
    username: root
    password: 
    security_level: admin
    framerate: 5
    stream_path: live2.sdp

In which the password (not shown) is my actual root password. However, when I restart to include the new integration, I get (the final line is)…

libpyvivotek.vivotek.VivotekCameraError: Unauthorized. Credentials may be invalid.

…this seems to have been a common error that happened last year moving from 0.99 to 0.100 (that was fixed?). Please, if it’s obvious to you, what stupid thing am I missing?

Yeah I’ve run into this before…Your config looks fine, but for comparison of what you have versus what I have, the only difference is I have live2.sdp in double-quotes, and I don’t have the security_level set, but its suppose to be admin by default anyway. If that doesn’t work, my only other suggestion would be to double-check the passwords…maybe change them in the vivotek web gui (and of course in this HA config) just to see.

@wmaker, thanks. I will give your suggestions a shot. I just successfully got the vivotek to mount a samba share (but not from the web interface - from telnet! argh!) so progress continues. Hopefully I can get HA to see the darn thing.

Looks like to get my SMB mount permanent I’ll need to follow your steps in post #16, so thanks in advance for blazing this trail!

Best,
Kendall

Just some random updates that may hopefully help others… (I still can’t get HA to recognize the darn thing)…

  • The root filesystem can be remounted read/write using the “standard technique”… if you want to add changes to various scripts without having to perform the bind mounts mentioned in the first post (unless these are overwritten at reboot? donno)… Not sure what convinced me of this but I can’t repeat it…
  • Using the web interface you can set up network storage, but the current scripts in cgi-bin won’t correctly test mount a Samba share… however
  • mount.cifs will mount a Samba share if you remove the arg sec=ntlm and replace it with vers=3.0 (force a SMB version 3 mount)… at least this worked for me. I read that one shouldn’t use vers and sec (security) options at the same time, so I removed the sec option.
  • This has to be corrected in /mnt/flash/etc/auto.conf, so that automount can mount the SMB share when asked.
  • With this correction in place and the right event settings, the Vivotek is saving tarfiles (containing a snapshot and clip) to the Samba share…

Looks like I need to lower the sensitivity as 6 tarfiles have appeared in the last 10 minutes hahahahah!

Progress, I guess.

Fixed… If you are having trouble with the “Credentials may be invalid.” error, try changing your (http) authentication from basic to digest:

authentication: digest

All is well now.

Wow great additions from a lot of people! Just out of curiosity, does the vivotek integration perform better than just setting up an RTSP stream from the camera?

Before the Vivotek integration came along I did setup my Vivotek cameras using RTSP stream. The other thing I do with the Vivotek integration is to use some of service calls it provides.

Is the video streaming performance about the same between the two? I don’t really use the call functionality

Good question… I seem to recall when I first setup the Vivotek integration, it was setting up an rtsp stream to the camera just like a regular camera would do, so I think the performance is the same.

1 Like

Hi Tommy,
did you maybe updated your plugin recently or the version available on the github is the latest one?
I finally managed to run it with my Dahua VTO2000A doorbell. It is great idea to run the communication as designed here and I believe it will run reliable.
I’m now thinking about some customizations however would like to avoid making mistakes I’ll do while learning :-).

Hi,
The version on my github is still the latest one.

@wmaker Hi Tommy, great project. I am trying to do something similiar, but really don’t understand the ports and DNS stuff. I am using Hassio with NGINX manager and are not sure how to resolve the wss://my.duckdns.org:8089/ws.
Are you using a reverse proxy or how are you forwarding the Duckdns to the correct ports.
Thank you Mark

Hi,
The websocket is the one used by the webbrowser/doorvivint card to reach the Asterisk server.

In the example, the webrowser/doorvivint card tries to get to the Asterisk server using my.duckdns.org with destination port 8089. The my.duckdns.org would name resolve to your router’s WAN/Public IP address so packets sent by the webrowser/doorvivint card would arrive at your router’s WAN/Public IP address with destination port 8089. You would put a Port Forward rule in your router to route Port 8089 to your internal LAN IP address of your Asterisk Server.

If you have to go through your NGINX to reach the Asterisk Server, then I would think you would set it up similar to how you set it up my.duckdns.org:8123 for Home Assistant.

@wmaker Thank you for your quick reply. I am a little confused with the whole network stuff. I have turned off NGINX and will see what happens. I think I have a few DNS caches that are also causing me issues.