Door Video Intercom Connection

Moderator: leecollings

Post Reply
febalci
Posts: 331
Joined: Monday 03 July 2017 19:58
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Door Video Intercom Connection

Post by febalci »

I do have a door video intercom connection with the device as shown:

Image

I want to connect this unit to my home automation system via a raspberry. The connection between the intercom and the outer camera/doorbell unit is 4 cables; Audio, Video, Gnd, Vcc (12V). The screen unit itself is said to be working on 18V. I was wondering if i could use the GPIO pins of a raspberry to process (probably analogue) audio and video signals of the unit and feed it to domoticz. I haven't opened up the screen unit yet but i believe there's also connection ports for additional units, so maybe i can use them.

Image

I will try to add circuit pics once i open the case... If it succeeds, then it may simply become a smart doorbell. Is there anyone yet who tried the same?
febalci
Posts: 331
Joined: Monday 03 July 2017 19:58
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Door Video Intercom Connection

Post by febalci »

It turns out the screen unit is working on 220V. It has its own transformer inside to regulate the voltage to 18V. The back of the unit is as follows:

Image

And also this unit is more or less the same with Genway units which is owned by ABB now. However they are not manufacturing these anymore, as you can see on the label it is 10 years old.

So i am gonna try with an easycap video/audio dongle to convert the analog video/audio signals to digital on a raspberry. Connection to the dongle will be with an RCA connector; video signal to center pin of yellow RCA, audio to center pin of red and white RCA, Gnd to outer shell of all three RCA. I've got to get an easycap dongle first, will let you know after i buy it :D
febalci
Posts: 331
Joined: Monday 03 July 2017 19:58
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Door Video Intercom Connection

Post by febalci »

Yeah i got my Easycap. Things went really smooth. Didn't need any drivers. First connected Video line to easycap yellow center, audio to easycap red and white center. Then i wired GND lines of all 3 video, white and red audio together to GND line.
Image
Image

I used uv4l for video and sound streaming. Luckily, all sound and video timeout issues are all handled by the outer camera unit itself. When i press button, the ring audio is send and the camera starts sending video for 50 seconds and then shuts itself again. I used Webrtc streaming server of uv4lbut i guess this is not right in my case cause i do not know how to handle Domoticz side. As i see domoticz only gets mjpeg streams, and as far as i know that doesn't handle audio.
Image
Can you suggest me how to handle two-way audio streaming with domoticz? Or is it not possible?
febalci
Posts: 331
Joined: Monday 03 July 2017 19:58
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Door Video Intercom Connection

Post by febalci »

I decided to revert back to mjpg-streamer rather than uv4l just for Domoticz compatability. I used this fork:
https://github.com/jacksonliam/mjpg-streamer
Started the mjpg server with:

Code: Select all

mjpg_streamer -i input_uvc.so -o output_http.so
So, it gets the video from Easycap and sends to http as mjpeg both stream and snapshot.
And in Domoticz Camera Settings I added the streamer link to settings:

Port:8080 (I run Domoticz on Synology NAS, so nothing here on rpi on this port)
ImageURL: ?action=snapshot

And tadaaaa, whenever somebody presses the doorbell, the stream starts. Now the only thing left is the notification; again when somebody presses the door bell, it will send me a notification with picture; and i will be able to stream it from Domoticz. Unfortunately this way it will not be possible for me to make two way conversation since Domoticz only supports video one way, no sound, no two-ways. I will either set a different smartphone application for this, or leave it as it is.
owner1987
Posts: 6
Joined: Thursday 20 July 2017 11:20
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Door Video Intercom Connection

Post by owner1987 »

How did you manage to get an trigger in domoticz when pushing the doorbell button?

I have a workaround by monitoring the power usage (with a neo coolcam zwave plug) and when it goes up domoticz temporarily activates a virtual switch which runs a script for telegram notifications. But this workaround is not solid, i must cut the power off every couple of hours because the zwave nodes in domoticz are not steady...
febalci
Posts: 331
Joined: Monday 03 July 2017 19:58
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Door Video Intercom Connection

Post by febalci »

owner1987 wrote: Thursday 25 October 2018 18:22 How did you manage to get an trigger in domoticz when pushing the doorbell button?

I have a workaround by monitoring the power usage (with a neo coolcam zwave plug) and when it goes up domoticz temporarily activates a virtual switch which runs a script for telegram notifications. But this workaround is not solid, i must cut the power off every couple of hours because the zwave nodes in domoticz are not steady...
I my case it was easy. The camera sends black screen all the time except wshen someone presses the button it starts sending the video for 1-2 minutes and then goes black again. That is a perfect setup for camera motion detection with the "motion" package as described in domoticz wiki https://www.domoticz.com/wiki/Camera_Setup in "Using your camera as a motion detector" part. You create a dummy motion sensor which is connected to this setup. If someone presses the door bell, the cam starts and the pass from black screen to camera feed creates a motion effect in this setup. If you can't do this setup you can always use rpi io ports (might require some basic electronic knowledge and soldering) for trigger detection instead of zwave use...
owner1987
Posts: 6
Joined: Thursday 20 July 2017 11:20
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Door Video Intercom Connection

Post by owner1987 »

That is a nice solution i will try it also! I have a usb video dongle just like yours too so it should work...

So if I am correct, the 'motion' package installed also on the Pi can trigger a http cal when detecting any motion?
febalci
Posts: 331
Joined: Monday 03 July 2017 19:58
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Door Video Intercom Connection

Post by febalci »

owner1987 wrote: Friday 26 October 2018 0:17 That is a nice solution i will try it also! I have a usb video dongle just like yours too so it should work...

So if I am correct, the 'motion' package installed also on the Pi can trigger a http cal when detecting any motion?
Installing motion and doing the necessary configuration as per wiki page, you will have a dummy motion swicth on domoticz. You can write an event on this switch and do whatever you want. Only if your video door bell supports it like mine do, you gotta carry out some tests i believe. Good luck.
owner1987
Posts: 6
Joined: Thursday 20 July 2017 11:20
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Door Video Intercom Connection

Post by owner1987 »

after a bit of playing i got it working!

- installed mpjeg-sstreamer expirmental on raspiab stretch lite using rpi2 (had to use install dkms to get everything working with my easycap utv007)
- installed motion, and used the streaming url in the config and not the dev/video0.
- Edited the on_event_start config in motion pointing to a virtual trigger in domoticz.

But... the image is badly distorted in my case and not usable, it does trigger the motion package to power on a virtual switch in domoticz.

Did you have any image distortion from the easycap stream? Maybe i need to make an extra wire to the gpio side to make it extra grounded or whatever i am not that good with wiring :)
owner1987
Posts: 6
Joined: Thursday 20 July 2017 11:20
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Door Video Intercom Connection

Post by owner1987 »

Never mind, i got the wiring fo the tulp coneector mixxed with +/- hahaha :)

Works like charm! Great tutorial and i really think that this would make a lot of people happy :)
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest