ESP32-CAM as doorbell with camera Topic is solved

Moderator: leecollings

Ivo1986
Posts: 16
Joined: Tuesday 07 January 2020 10:27
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: Urmond - Netherlands
Contact:

Re: ESP32-CAM as doorbell with camera

Post by Ivo1986 »

Wow I like it! :) Which camera do you use? I have the 2.1cm 160 degree night vision. Dit not test is in the dark yet :P
https://www.aliexpress.com/item/4000130 ... 4c4dzrESdV
hoeby
Posts: 530
Joined: Saturday 02 June 2018 11:05
Target OS: Raspberry Pi / ODroid
Domoticz version: V2022.1
Location: Echt, Netherlands
Contact:

Re: ESP32-CAM as doorbell with camera

Post by hoeby »

This design is for the 120 degree camera lens.

The 160 (normal and night version) have a different size, they don't fit.
It is not only the camera mounting hole which is different, the length of the lens is also different.

Could you measure if the size-drawing on ali is correct for the camera you have?
Maybe i can modify the housing, that those can fit in this housing.
I don't have those 160 degree versions, can't measure myself
Thin-client --> Docker Domoticz main environment
Pi3A+ --> Google home (GAssistPi)
Pi3B+ --> Docker (P1monitor, Domoticz test environment, Ubiquity controller)
EddyG
Posts: 1042
Joined: Monday 02 November 2015 5:54
Target OS: -
Domoticz version:

Re: ESP32-CAM as doorbell with camera

Post by EddyG »

Love this design with 22 mm button. I printed and installed the first design, but found the button too small.
Can not wait to see the stl files on Thingiverse so I can print them too.
Running the V2.01 and put some uptime routines in the source.
Longest uptime is currently 5 days and 6 hours.
Reboots should not happen, but reboot and reconnect is really fast. Will try to investigate why a reboot happens.
I twice had a lockup and had to pull the power. Will look if a watchdog is possible.
Jojik1
Posts: 16
Joined: Monday 06 January 2020 23:57
Target OS: -
Domoticz version:
Contact:

Re: ESP32-CAM as doorbell with camera

Post by Jojik1 »

Good day,
please, give me an advice.
ESP32 - CAM
uploaded image - OK
PC Windows 10
http://192.168.31.7/capture - OK
http://192.168.31.7/stream - OK

Raspberry domoticz ip 192.168.31.55:9090
running command

#!/bin/sh
SnapFile="/var/tmp/camsnapshot_deur.jpg"

# Get image doorbel
wget -O $SnapFile "http://192.168.31.7/capture"

# Send Telegram message with image
curl -s -X POST "https://api.telegram.org/1111111111:aaa ... /sendPhoto" -F chat_id=444444444444 -F photo="@$SnapFile"

# Remove Image
/bin/rm $SnapFile

exit 0

- NO

individual commands
SnapFile="/var/tmp/camsnapshot_deur.jpg"
wget -O $SnapFile "http://192.168.31.7/capture"

https://ibb.co/VCqMvxC

isn't it a problem that I have an eps32 module ESPRESSIF ????
EddyG
Posts: 1042
Joined: Monday 02 November 2015 5:54
Target OS: -
Domoticz version:

Re: ESP32-CAM as doorbell with camera

Post by EddyG »

It is an authentication problem.
Use the ESP32-cam without user and password or use
wget -O $SnapFile "http://<username>:<password>@192.168.31.7/capture" (did not test it)
Jojik1
Posts: 16
Joined: Monday 06 January 2020 23:57
Target OS: -
Domoticz version:
Contact:

Re: ESP32-CAM as doorbell with camera

Post by Jojik1 »

So progress!
An image is already being sent to me using the command line.
It needed to be added
! bot!
curl -s -X POST "https://api.telegram.org/151... - NO
curl -s -X POST "https://api.telegram.org/bot151... OK



https://ibb.co/747zHK4

Thank you.

Yes it helped.
The image is already stored in the var / tmp folder.
Unfortunately, he will not send to the Telegram
EddyG
Posts: 1042
Joined: Monday 02 November 2015 5:54
Target OS: -
Domoticz version:

Re: ESP32-CAM as doorbell with camera

Post by EddyG »

I suppose you checked that the file exists in /var/tmp
You could do a (just to see what the rights are).

Code: Select all

ls -al /var/tmp
You could try to put a sudo in front of the telegram command.
I use the same command and that works.
Just to see if there is no error in the BotToken use:

Code: Select all

curl -s -X POST "https://api.telegram.org/bot"$TelegramBotToken"/sendMessage" -F chat_id=$TelegramChatID -F text="Doorbell is ringing!"
I use variables, so replace them with your token. You also missed the "bot" directly after the .org
hoeby
Posts: 530
Joined: Saturday 02 June 2018 11:05
Target OS: Raspberry Pi / ODroid
Domoticz version: V2022.1
Location: Echt, Netherlands
Contact:

Re: ESP32-CAM as doorbell with camera

Post by hoeby »

The new housing is on thingiverse, lets call it V2 :P

https://www.thingiverse.com/thing:4765620

The new housing is made for low-profile buttons.
Mounting hole is 22mm.

This housing is for a 120degree lens.

The mounting plate designed to place a m3 nut in it, to screw the top housing to the mounting plate.

All sizes are tight fit. Specially when fitting the top to the mounting plate.
This is done, to keep everything tight, to keep the water out. Maybe little sanding is needed, to get everything in place. This depends on your printer deviation.

A link to the used buttons:
https://nl.aliexpress.com/item/10050017 ... web201603_

Image
Image
Thin-client --> Docker Domoticz main environment
Pi3A+ --> Google home (GAssistPi)
Pi3B+ --> Docker (P1monitor, Domoticz test environment, Ubiquity controller)
hoeby
Posts: 530
Joined: Saturday 02 June 2018 11:05
Target OS: Raspberry Pi / ODroid
Domoticz version: V2022.1
Location: Echt, Netherlands
Contact:

Re: ESP32-CAM as doorbell with camera

Post by hoeby »

Also added the angle wedges for the V2 housing.

Made the following wedges:
- Left and right versions
- 10, 20 and 30 degree
- Corner mounting and wall mounting

The 10 degree example
Image

This is the corner mounting
Image

This is the same angle, but then the wall mounting
Image
Thin-client --> Docker Domoticz main environment
Pi3A+ --> Google home (GAssistPi)
Pi3B+ --> Docker (P1monitor, Domoticz test environment, Ubiquity controller)
EddyG
Posts: 1042
Joined: Monday 02 November 2015 5:54
Target OS: -
Domoticz version:

Re: ESP32-CAM as doorbell with camera

Post by EddyG »

Tnx. Just as I started printing this afternoon my printer "died" on me.
Currently got it working again, after 2 hours I will look at the result.
I think it will be nice. :) Then I have to wait for the pushbutton.
China is just coming back from New Years holiday, so that might take some extra time.
EddyG
Posts: 1042
Joined: Monday 02 November 2015 5:54
Target OS: -
Domoticz version:

Re: ESP32-CAM as doorbell with camera

Post by EddyG »

I printed it in draft mode (0.2mm) and it fits after a little grinding perfect. Good design job. :!:
Only remark I have is that the part were the nut goes in should be a little bit skewed at the top to get an easy entry of the back plate into the housing.
Could not test the fitting of the 120mm camera because of the draft. I try again with fine mode.
Are you planning to have a 160mm version too?
I am planning to fit a D7805 1A rectifier and a DB107 voltage regulator with 2 elco's also inside.
These are the smallest I could find sofar.
I wonder if you tried that already?
hoeby
Posts: 530
Joined: Saturday 02 June 2018 11:05
Target OS: Raspberry Pi / ODroid
Domoticz version: V2022.1
Location: Echt, Netherlands
Contact:

Re: ESP32-CAM as doorbell with camera

Post by hoeby »

EddyG wrote: Thursday 18 February 2021 9:29 Only remark I have is that the part were the nut goes in should be a little bit skewed at the top to get an easy entry of the back plate into the housing.
Like said, it is a tight fit. :lol:
Can look at it, to make it easier to close
EddyG wrote: Thursday 18 February 2021 9:29 Are you planning to have a 160mm version too?
I wrote a couple a posts back, but got no answer:
hoeby wrote: Tuesday 16 February 2021 10:54 The 160 (normal and night version) have a different size, they don't fit.
Could you measure if the size-drawing on ali is correct for the camera you have?
I don't have those 160 degree versions, can't measure myself
Maybe you could answer this. Modification looks not big.
Only need to watch, that there is enough space and the button isn't touching the esp

EddyG wrote: Thursday 18 February 2021 9:29 I am planning to fit a D7805 1A rectifier and a DB107 voltage regulator with 2 elco's also inside.
These are the smallest I could find sofar.
I wonder if you tried that already?
Didn't tried that, because i use the free space in the housing to put 2 solid state relays in it.
One is for triggering the input of the esp32
The other one i use to control a normal relay, which activates the normal chime.
Thin-client --> Docker Domoticz main environment
Pi3A+ --> Google home (GAssistPi)
Pi3B+ --> Docker (P1monitor, Domoticz test environment, Ubiquity controller)
hoeby
Posts: 530
Joined: Saturday 02 June 2018 11:05
Target OS: Raspberry Pi / ODroid
Domoticz version: V2022.1
Location: Echt, Netherlands
Contact:

Re: ESP32-CAM as doorbell with camera

Post by hoeby »

EddyG wrote: Thursday 18 February 2021 9:29 Only remark I have is that the part were the nut goes in should be a little bit skewed at the top to get an easy entry of the back plate into the housing.
Small modification is done and on thingiverse.

Not easy to see, but you see a small chamfer line left of the hole
Image
Thin-client --> Docker Domoticz main environment
Pi3A+ --> Google home (GAssistPi)
Pi3B+ --> Docker (P1monitor, Domoticz test environment, Ubiquity controller)
EddyG
Posts: 1042
Joined: Monday 02 November 2015 5:54
Target OS: -
Domoticz version:

Re: ESP32-CAM as doorbell with camera

Post by EddyG »

On this page are some measurements: https://nl.aliexpress.com/item/40001304 ... web201603_

When I measure the 160 degrees version
Diameter: 10.05 mm
Total height: 11.82 mm incl. the sticker to 'glue' the lens to the SD-card holder (for cooling?)
Collar height of the lens: 2.74 mm
My measurements are not the same as Ali data.
Your current hole is 9 mm outside and 10 mm inside, the 160 degrees need minimum 10.1 or even 10.3 mm.
And I do not know if the 160 degree has to come out of the housing completely.
It looks like the height is less then your 120 mm and it looks to me that I have to lower the ESP32 to get enough slack to get the lens true the hole.
Or bringing the opening for the lens a little bit further to the middle.

One more remark. It might be due to the quality of my printer or the draft version, but at both sides positioned at the middle of the pushbutton the wall is a little bit thinner and that shows in my case on the outside.

This 160 degrees version seems to have a longer flatcable. https://nl.aliexpress.com/item/10050012 ... web201603_
hoeby
Posts: 530
Joined: Saturday 02 June 2018 11:05
Target OS: Raspberry Pi / ODroid
Domoticz version: V2022.1
Location: Echt, Netherlands
Contact:

Re: ESP32-CAM as doorbell with camera

Post by hoeby »

Your sizes are not all usefull, sorry.
Height less than 120mm? That is 12cm, something went wrong there.

I printed my housing and don't notice the thinner wall mark on the outside, where the button is. The wall is thinner, to give room for the nut, without making the housing larger.
Thin-client --> Docker Domoticz main environment
Pi3A+ --> Google home (GAssistPi)
Pi3B+ --> Docker (P1monitor, Domoticz test environment, Ubiquity controller)
EddyG
Posts: 1042
Joined: Monday 02 November 2015 5:54
Target OS: -
Domoticz version:

Re: ESP32-CAM as doorbell with camera

Post by EddyG »

Your sizes are not all usefull, sorry.
I make it a little bit more useful, because I forgot the decimal punt. And the correction is 12.0 mm. Sorry for my mistake.
I suppose the rest of the measurements are ok.
I measured again and I was wrong again. The bottom of the esp to the top of the lens is 12.40 mm, so including the height of the lens and the height of the sd-card holder. Your internal height is 13.90 mm. So there is a gap of 1.50 mm.
I printed my housing and don't notice the thinner wall mark on the outside, where the button is. The wall is thinner, to give room for the nut, without making the housing larger.
Then it is the quality of my printer or the fact that I printed it in draft mode.
Loekie63
Posts: 9
Joined: Thursday 28 January 2021 9:13
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: ESP32-CAM as doorbell with camera

Post by Loekie63 »

Hi there,
I like this project verry much but can't seem to get the default domoticz snapshot under added camera's to work propperly. I added the "ESP-32-CAM as doorbell" to Domoticz same way as I added a Foscam before. The problem is that when i take a second snapshot by pushing the camera icon it always show's me the same first picture. The Foscam does not.(edit) When I reboot the ESP-32 doorbell, the new picture is shown correctly but a second snapshot will only show the first picture. This cycle is repeated on every phone or pc I open Domoticz / settings / more options / camera's
(edit) found that this is only a problem during testing in Domoticz. When using the Doorbell as intended the correct photo's are shown.
Attachments
esp-32 doorbell.JPG
esp-32 doorbell.JPG (38.51 KiB) Viewed 3383 times
Last edited by Loekie63 on Tuesday 09 March 2021 19:04, edited 1 time in total.
Diplo95
Posts: 15
Joined: Friday 26 July 2019 10:21
Target OS: Raspberry Pi / ODroid
Domoticz version: 2021.1
Location: Melun France
Contact:

Re: ESP32-CAM as doorbell with camera

Post by Diplo95 »

hoeby wrote: Saturday 25 July 2020 16:42 Today i finished to solder work.
The 2 white wires which can seen, are for the original chime.

Everything is in. Now going to test if everything still works how it needs to work

Image
Hi,
I'm really impressed by the work you've made. So I'm joining the post and try to do the same at home. I've got a parallel project which is to implement a Shinobi video server and will try to make all work together. (so I expect movement detection and maybe face recognition)
But, if I have some skills in software, I'm totally beginner in electronic. Would it be possible for you to publish a scheme of your wires ? Sorry : I just start to understand what is an optocoupler ! :oops:
Domoticz v2021.1 on Raspberry Pi 3B+
Raspbian Buster
ConBee II + Xiaomi devices
Zwave
hoeby
Posts: 530
Joined: Saturday 02 June 2018 11:05
Target OS: Raspberry Pi / ODroid
Domoticz version: V2022.1
Location: Echt, Netherlands
Contact:

Re: ESP32-CAM as doorbell with camera

Post by hoeby »

Diplo95 wrote: Saturday 06 March 2021 23:35 Would it be possible for you to publish a scheme of your wires ?
On page 9 there is a schematic from Funky how to connect the wires.
Please notice, that the button Funky posted doesn't fit the housing i have made.
Image

The photo you quoted, there is a RGB-LED button used.
But the V2 code doesn't support the RGB-LED
The reason is, there are only a few RGB-LED buttons that would fit the housing. I tested a few and noticed that you can't always activate all RGB-LEDs in these buttons at once. Therefor i switched to a LED button with 1 color LED. Just to keep things simpel.
Thin-client --> Docker Domoticz main environment
Pi3A+ --> Google home (GAssistPi)
Pi3B+ --> Docker (P1monitor, Domoticz test environment, Ubiquity controller)
hoeby
Posts: 530
Joined: Saturday 02 June 2018 11:05
Target OS: Raspberry Pi / ODroid
Domoticz version: V2022.1
Location: Echt, Netherlands
Contact:

Re: ESP32-CAM as doorbell with camera

Post by hoeby »

Loekie63 wrote: Saturday 06 March 2021 12:33 I like this project very much but can't seem to get the default domoticz snapshot under added camera's to work propperly.
Could you try in a webbrowser to do: http://ESP32CAM-IP/capture
where you need to change "ESP32CAM-IP" for your IP

This works for me without issues.
Domoticz changes the string.
Thin-client --> Docker Domoticz main environment
Pi3A+ --> Google home (GAssistPi)
Pi3B+ --> Docker (P1monitor, Domoticz test environment, Ubiquity controller)
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests