Page 1 of 2

Open thoughed project, video Doorbell project

Posted: Thursday 21 June 2018 19:35
by hoeby
Hi everybody,

For a few months i work whit domoticz.
The first days it needed a lot of time to get used whit it. But i like it more every day.
Not all wishes are made, but need to do it in steps, otherwise the money flies out the door.

Speaking about a door. One of my wishes is to have a doorbell with camera, to send notification.
Looking at the RING doorbell. Not cheap and untill now not connectable whit domoticz.
I ordered an CTVMAN CM50B01PE WIFI, but it was disappointed.
The CTVMAN is not waterproof. Camera is not protected, therefor the rain will fall on the lens.
Also the motion sensor is not waterproof. Rain will come in the doorbell and it needs just time, to stop working correctly.
An other thing i discovered, the camera stops streaming an image when the doorbell button is pushed. When the doorbell button is pushed the image starts to stream and after a few seconds the stream stops. Couldn't find it, but the RING doorbell connects to an external server. I think that the CTVMAN also connects to an external server. And at last, the doorbell is BIG. Of course it can take 2 batteries.

The CTVMAN Doorbell i am speaking about
Image

After looking around, searching for a doorbell whit the functions a wass looking for.
I stopped searching. I couldn't find it.
Therefor i wan't to design my own doorbell. But looking at this forum, it looks like more people are looking for a video doorbell which is not that expensive, but also can be made to your own wish.
But starting about that. I am not a person which can write big scripts. It will be build whit standard electronics. Lets look where how it will look like and where it will end (or maybe not will end).

What are my wishes, just to start with:
- Push button send to domoticz, for notification or ring chime
- Camera which is attachable whit domoticz
- A led coloured push button
- Optional, MP3-player to play doorbell sound or a recorded speech message when button is pushed
- Trying to get a smaller doorbell than most video doorbells which are on the marked.

How are my thougheds to achieve this:
I ordered a pi zero W. This will be used for a pi cam. This can be connected to domoticz.
I choose for the pi zero wifi version. I don't like to have a network cable to the front door, this because of safety reasons, that your home network isn't outside the door.
For the pi zero there a multiple camera's available. So everybody can choose a cam which fits to his wish.
The pi also can be used for inputs and outputs. The thoughed is that the push button is connected to an input and that triggers 2 outputs. One for a led signal that the button is pushed. The other for playing a MP3 file.
For connection the doorbell function to domoticz i want to use a fibary universal z-wave module.

Also these things i first want to mount in a 3d printed unit.
When the design is ready and usefull, i want to looked to make a metal version.
But also need to think about a waterproof version.

A lot to think about.
I hope a few people like to think about it. Not that those people need to build it. But just the thoughts i am happy whit.
I need to start easy. When everything works propperly then it can be extended.

What are you thinking about this?
Do i miss something? Or are there people that say, look at this or that?

Re: Open thoughed project, video Doorbell project

Posted: Thursday 21 June 2018 19:51
by heggink
Did you look at vibell?

Re: Open thoughed project, video Doorbell project

Posted: Thursday 21 June 2018 21:43
by dlefol
I'm looking at the same kind of set up but didn't have the time to look at it in more details.
I didn't know vibell. Does it work with domoticz ?

Re: Open thoughed project, video Doorbell project

Posted: Thursday 21 June 2018 21:48
by heggink
No idea but since it's open source based on raspberry pi then not too difficult to connect.

What integration would you like?

Re: Open thoughed project, video Doorbell project

Posted: Thursday 21 June 2018 21:57
by hoeby
Thanks for the input.
I didn't look to vibell, until 5 minutes ago. Didn't known it exist, thoughted i googled enough to find the options.
But didn't found the vibell

But looking to the vibell. It is not exactly i am looking for.
Looking at the vibell video, it is only working on the pi, i am missing the options to connect it to domoticz.
Think about notification whit telegram (snapshot) or an other notification option i am missing. Or use sonos speaker as chime.
It is a separted app, i am looking for something to use in dashticz in the future.
But it cann be a nice point to start whit.

Re: Open thoughed project, video Doorbell project

Posted: Thursday 21 June 2018 22:07
by heggink
As I said, being open source, it should not be too difficult to set it up as a webcam in domoticz. Also, the button should be able to trigger a script to activate a switch in domoticz so you see who pushed. Only tricky thing may be to integrate the audio/mic but probably that can be done thru dashticz...

Re: Open thoughed project, video Doorbell project

Posted: Saturday 23 June 2018 14:27
by hoeby
I choose not to go for vibell.
Maybe it is usefull, but i looks like a complet setup with everything atached to it (hope you understand it what i mean).
I want to keep it modulair, and not 1 script for the doorbell. This hass it positiv site but also negativ. But i have to start somewhere, and my knowledge is not that big to modify a script like vibell uses.

For now i am looking to use the GPIO pins from the doorbell used PI, and send them by network to the domoticz PI.
I can find information about using the GPIO pins, but all the info i am finding is about the use of the pins, that are available on the pi where domoticz is installed. But until now i can't find a lot of info about using the pi zero GPIO pins and send the info by netwerk to domoticz.
Does somebody have a nice link, where i can information?

Re: Open thoughed project, video Doorbell project

Posted: Saturday 23 June 2018 22:47
by hoeby
Made a step forward (for me it is a step).

I found out a way to get the signal to domoticz.
I made a little script and when i run it manual from the pi zero i can change the status of a virtual switch in domoticz.

I am using this script. domoticz-IP needs to be replaced by your domoticz IP-address.
My virtual switch has IDX=117. This also needs to be changed when you will use this
http://domoticz-IP:8080/json.htm?type=c ... itchcmd=On

Of course i need also to switch it of. Otherwise your chime will be playing sounds.
This is the same script, but than "Off" at the end.

Now back to the pi zero. Going to search for information how to control the GPIO exactly.
Now i have the switch function in domoticz ready, the notifications or starting chime are not that dificult (can be blocky)

Re: Open thoughed project, video Doorbell project

Posted: Tuesday 03 July 2018 21:51
by hoeby
I think i have the scripting ready.
What works, when you push the doorbell button:
- A MP3 file will play. Do let play a DINGDONG file, or something else what you want (by scripting on Pi)
- LED will switch from alive LED tot push LED. (by scripting on Pi)
- Script will control virtual device in domoticz (by scripting on Pi)

What is done in domoticz:
- The virtual switch activates a script, to send telegram notification
- Sonos speakers play DINGDONG

What still to do:
- Just started whit dashticz. Want to connect the camera to dashticz, that there is a screen whit live image neer the door or in your room
- There is hardware neccesary. Want to try to design a PCB, which fits on the pi zero.
- Need to make a nice case around it. Ordered IP67 pushbuttons, i am waiting for those parts.

Re: Open thoughed project, video Doorbell project

Posted: Sunday 03 February 2019 22:04
by tlambin
Hi,

I am very interested.
how are things going? any progress?

Re: Open thoughed project, video Doorbell project

Posted: Monday 04 February 2019 18:33
by hoeby
I got everything to work with the pi zero.
1 push on the button triggers;
- DZ vents script which sends a telegram notification with snapshot from the pi zero camera
- MP3 file is played, with use of adafruit pcb (i2s)
- 2 LED's connected with the py. One stays on for standby, by push this standby LED goes off and pushed LED goes on, this for 10 seconds.
- A virtual switch is triggered, so it could be used in domoticz, this switch also triggers the DZ vents which sends notification.
- live camera view on dashboard.

All made on the table.
After that looking functions and network safety.
I received a couple of messages from some people that there are RING doorbells stolen in the city. And about the RING bug which sends your wifi credentials. The raspberry pi zero is not that good protected. Just take it off the wall/door and the wifi credentials could be found on your SD card. Also pricewise, it is not the cheapest doorbell with all parts on it.

Have toughed about it to install the Pi zero inside the house and connect the button. But how about the camera, which uses the flatcable.
Extending the flatcable didn't worked that good, signal is gone.

Thinking about those things, i put it away and started working on my own dashboard design and a google home with domoticz control.
This took most of my time, that i forgot about the doorbell.

Therefor i paused the project. To search for information what is wise to do.
I shopped in the garage and found a video encoder. With this is possible to install the network part inside the house and PAL camera outside, without network on the front door. For the in/out put i am thinking of a wemos D1 mini with esp-easy. This already works with domoticz. This wemos will be mounted inside the house, because it also has network information. Bad part of his solution, it uses 2 IP-addresses.

Do you have an idea, or has somebody seen something online which could be interessted?

Re: Open thoughed project, video Doorbell project

Posted: Monday 04 February 2019 19:02
by Siewert308SW
@hoeby

Sounds promising, care to share your scripts?
I expect my newly won Digoo SB-XYA Smart video doorbell this week.
Want to integrate it in Domoticz, maybe your way gives me a headstart ;-)

Re: Open thoughed project, video Doorbell project

Posted: Monday 04 February 2019 19:23
by hoeby
@Siewert308SW;
Congratulations with winning the Digoo SB-XYA Smart video, hope you get it integrated with domoticz.
I stopped with those doorbells which working with the cloud services. Every month a lot of new doorbells comming to the shops. All having the same base of working, but is the software/firmware the same? When every doorbell is different, it takes a lott of time to keep your research up to date. Therefor i stopped looking to the software/firmware of the doorbells and searched for a more universal option.

some scripts i used for the raspberry pi zero setup.
For the wemos D1 i didn't started making scripts. First need to make a roadmap what i want and if the wemos D1 mini + esp-mini would be the thing which could be the answer to the roadmap

For getting the camera working on the raspberry pi zero i used the next link:
https://github.com/silvanmelchior/RPi_Cam_Web_Interface

Second the 3 scripts for the raspberry pi
used to play the mp3 file.

Code: Select all

#!/usr/bin/env python
import os
from time import sleep
import RPi.GPIO as GPIO

GPIO.setmode(GPIO.BCM)					# set up BCM GPIO numbering
GPIO.setup(25, GPIO.IN, pull_up_down=GPIO.PUD_DOWN)	# set GPIO25 as input (button)
while True:						# this will carry on until you hit CTRL+C
	sleep(0.1)					# added to stop interference
        if GPIO.input(25):				# if port 25 == 1  
		sleep(0.1)				# wait 0.1 seconds
		os.system('mpg123 Connecting.mp3')	# playing MP3: connecting.mp3
		sleep(15.0)           			# wait 15.0 seconds



Used for the light status

Code: Select all

import RPi.GPIO as GPIO  
from time import sleep     				# this lets us have a time delay (see line 15)  
GPIO.setmode(GPIO.BCM)     				# set up BCM GPIO numbering  
GPIO.setup(25, GPIO.IN, pull_up_down=GPIO.PUD_DOWN)     # set GPIO25 as input (button)  
GPIO.setup(23, GPIO.OUT)   				# set GPIO18 as an output (LED) 
GPIO.setup(24, GPIO.OUT)  				# set GPIO24 as an output (LED) 
  
try:  
    while True:            				# this will carry on until you hit CTRL+C  
	sleep(0.1)					# added to stop interference
        if GPIO.input(25): 				# if port 25 == 1  
	    GPIO.output(23, 1)         			# set port/pin value to 1/HIGH/TRUE            
	    GPIO.output(24, 0)         			# set port/pin value to 0/LOW/FALSE  
	    sleep(15.0) 	       			# wait 15.0 seconds
        else: 
	    GPIO.output(23, 0)         			# set port/pin value to 0/LOW/FALSE
	    GPIO.output(24, 1)         			# set port/pin value to 1/HIGH/TRUE 
	    sleep(0.1)         	       			# wait 0.1 seconds  
 
 
finally:                   				# this block will run no matter how the try block exits  
    GPIO.cleanup()        		 		# clean up after yourself  
Used to switch a dummy switch when input pi zero is triggered

Code: Select all

#!/usr/bin/python

# Doorbell py with read contact uitlezen,
import urllib
import json
import RPi.GPIO as GPIO
from time import sleep

domoticzurl = 'http://xxxxx:[email protected]:xxxx/json.htm?type=command&param=switchlight&idx=1&switchcmd=On'

GPIO.setmode(GPIO.BCM)
buttons = (25)
GPIO.setup(buttons, GPIO.IN, pull_up_down = GPIO.PUD_DOWN)

try:
	while True:
		sleep(0.1)
        	if GPIO.input(25):
			sleep(0.1)
			response = urllib.urlopen(domoticzurl)
        		data = json.loads(response.read())
			print data
	                sleep(15.0)           
 
 
finally:                   # this block will run no matter how the try block exits  
    GPIO.cleanup()         # clean up after yourself 
And the last script, the DZ-vents script, for sending telegram notifcation

Code: Select all

return {
    on = { 
       devices = {'Camera voordeur'},
    },

    execute = function(domoticz, device)
        if(device.state == 'On') then
            local teleTok   = 'xxxxxxxx:xxxxxxxx'
            local chatId    = 'xxxxxxxx'
            local snapFile  = '/home/pi/domoticz/scripts/camera_'
            -- local domoReq is made for an Axis camera. Put here the string to make a snapshot from your camera
            local domoReq   = 'http://xxx.xxx.xxx.xxx/jpg/1/image.jpg'
            local camName   = 'Voordeur'
            os.execute('wget -O "'..snapFile..camName..'.jpg" "'..domoReq..'"')
            os.execute('curl -s -X POST "https://api.telegram.org/bot'..teleTok..'/sendPhoto?chat_id='..chatId..'" -F photo="@'..snapFile..camName..'.jpg"')
            os.execute("rm " ..snapFile..camName..'.jpg')
        end
    end
}

Re: Open thoughed project, video Doorbell project

Posted: Monday 04 February 2019 20:16
by hoeby
Just found this
The Xiaomi-Zero-Intelligent doorbell
Looked in the Xiaomi app, it is possible to connect it with the app.
Sorry, my knowledge is not that great to add this device to the Xiaomi plug-in, but maybe there is somebody who could look at it, if there are possibilities

Image

Re: Open thoughed project, video Doorbell project

Posted: Monday 04 February 2019 22:01
by Siewert308SW
@hoeby

Thx...
As far as i know according the manual it also has a a 8gb internal storage capability.
Don't know it for sure as i don't have it but will be arriving soon.
Thx for scripts and link, will see what i can use to integrate.
Maybe not needed as it also has BT, maybe i can catch a signal, will see.

Re: Open thoughed project, video Doorbell project

Posted: Thursday 28 March 2019 13:14
by Jessiryan
Hey Guys,

Did look for Hogar Controls? I have been using their Video Door Bell for a while now. Love the motion sensor and inbuilt night mode. The bell integrates well with existing systems and needs no hub to operate. The installation was easy and fast. You can connect it with the app. And after that, the video doorbell sends you a push notification when the motion sensor is triggered. There are various doorbell melodies for regular doorbell operations. It maintains good quality while recording or live streaming the video in low light conditions. You can check out their website for more info on specs. I am putting down a link for you. Video Door Bell

Re: Open thoughed project, video Doorbell project

Posted: Thursday 28 March 2019 20:27
by hoeby
That doorbell has a nice design.

But i can't find alot of info about it.
Is live camera stream possible without pushing the button?
Is the camera connected to a cloud?

The doorbell i made is working on espeasy.
I stopped with the pi zero. And placed a wemos D1 mini
It has a separed camera in it. Just to keep everything away from the cloud. No it doesn't looks that nice as yours , but it does the function where it is needed for. Like:
- on push button rgb led are running
- mp3 is played , that the person outdoor can hear.
- nightvision ip camera
- trigger snapshot and sent telegram (this does domoticz)
- trigger dashboard for live view

Separed it triggers the normal home buzzer. Need to keep my wife happy

Re: Open thoughed project, video Doorbell project

Posted: Wednesday 17 April 2019 15:48
by megamarco83
hoeby wrote: Thursday 28 March 2019 20:27 That doorbell has a nice design.

But i can't find alot of info about it.
Is live camera stream possible without pushing the button?
Is the camera connected to a cloud?

The doorbell i made is working on espeasy.
I stopped with the pi zero. And placed a wemos D1 mini
It has a separed camera in it. Just to keep everything away from the cloud. No it doesn't looks that nice as yours , but it does the function where it is needed for. Like:
- on push button rgb led are running
- mp3 is played , that the person outdoor can hear.
- nightvision ip camera
- trigger snapshot and sent telegram (this does domoticz)
- trigger dashboard for live view

Separed it triggers the normal home buzzer. Need to keep my wife happy
hi, thanks for that
i'm try to do my own doorbell
can you help me posting what you did with espeasy and nodemcu / wemos?
when i try to get info to build without success my doorbell i see also the esp32-cam This module as far as i understand is not working with espeasy but with arduino code.
what do you think?
my doubt are: night vision will work?
how to make it waterproof?
thanks for your help

Re: Open thoughed project, video Doorbell project

Posted: Thursday 18 April 2019 22:09
by hoeby
I don 't know if espeasy can be run on a esp-cam.

Standard the esp-cam doesn't support night vision. I tried removing the IR filter, but the images are still terrible.

I use the wemos for:
- push button doorbell, to switch dummy in domoticz.
- output to play mp3 file in the doorbell.
- rgb led which change from colour when button is pushed.

The output and rgb led are running by a script on the wemos. When domoticz is offline, the doorbell still works . Only image send to telegram and trigger to my dashboard, so it displays the live camera images, don't work at that moment .

The push button triggers 2 functions. The input on the wemos. And the normal buzzer in my house. Need to keep my wife happy.

Re: Open thoughed project, video Doorbell project

Posted: Thursday 18 April 2019 22:21
by megamarco83
hoeby wrote: Thursday 18 April 2019 22:09 I don 't know if espeasy can be run on a esp-cam.

Standard the esp-cam doesn't support night vision. I tried removing the IR filter, but the images are still terrible.

I use the wemos for:
- push button doorbell, to switch dummy in domoticz.
- output to play mp3 file in the doorbell.
- rgb led which change from colour when button is pushed.

The output and rgb led are running by a script on the wemos. When domoticz is offline, the doorbell still works . Only image send to telegram and trigger to my dashboard, so it displays the live camera images, don't work at that moment .

The push button triggers 2 functions. The input on the wemos. And the normal buzzer in my house. Need to keep my wife happy.
No, eps32-cam is not working with espeasy, but with arduino code. I see that there are some video on YouTube where night vision seams to be ok.. Did you tested?
I still waiting to receive my esp32 to make tests by myself
Rrgarding to wemos what firmware are you using?
Can you please post your code for mp3 play and rgb led?
Can you also provide some link for this two device that are you using?
Last question how you menage the voice and video with your wemoss doorbell?
Thanks so much