Closed mrmate2 closed 4 years ago
Hi MrMate2, it is easy to have this. have a look in the file: camera_pins.h copy the Definitions you want from the section "CAMERA_MODEL_TTGO_T1_CAMERA" to the section "CAMERA_MODEL_AI_THINKER". i.e. copy the code :
to line 100 and then the features you want will be enabled in your code automatically. (both telegram and web interface will start having it on the next compile)
I can't add such feature (PIR and button) in the code because that is not a default feature.
As for the restart command: I though about it. but enabling the sleep mode with an interval would make the ESP more or less same as reset every X number of mins. and then next command is to disable the sleep.
Tell me if you want further elaborations.
Dear Asmaklad, many thanks for Your reply! I changed the lines as per Your advise, buttons in telegram and web interface already appeared, but if motion detection activated-the result is every second (or so) i have MOTION DETECTED alarm+photo even without PIR connected..... By the way, to what physycal pins it has to be connected, if this part code will work finally? Is it ok that pin 34 mentioned 2times in AI-thinker part? This is how it looks after editing according to Your advise:
//#define I2C_BME280_ADDR 0x3d
////////////////////////////////////////
////////////////////////////////////////
yes the code is like what I advised.
However, you will have to change it to the PIR PIN number that corresponds to your setup. it really depends on which PIN you chose for PIR. I recommend making a PULL _DOWN on the chosen PIN . like this circuit for example https://easyelectronicsproject.com/esp32-projects/esp32-cam-pir-motion-detector-with-photo-capture-1/
As for the button, looking back to it: I don't think I have implemented anything in the code for that. And yes , having pin 34 used twice is not correct. I would remove the #define BUTTON_PIN 34 from the AI_THINKER section.
For the BOT to refresh the command list , you need to issue the command "/options" or "/start" in telegram.
Or to avoid all of this hassle, if you really want to use PIR, order this board instead "ESP32 CAM TTGO T1 (google it)"
All is done, now working perfect! Many thanks! Great project! All the best!!
Thanks for using the project. Please spread the word. If you want, please tell on how do you use it ? maybe some screenshots . I find satisfaction that I made something useful and usable in the real world. thanks again for sharing.
Please spread the word.
Definitely, I will do my best to spread information about Your code among as many people as I can. With reference to this repository, of course! Surely,the best is to make a video on Youtube. Unfortunately, I am not a blogger at all.... :). Maybe,one day I will ask some experienced blogger from Youtube to test this code and to make review.
If you want, please tell on how do you use it ? maybe some screenshots .
For the moment, I dont have examples of my usage of Your code yet. My plan is to use 2-3 units, it in my house, to monitor movements of my children around the house when me and wife are away. To be sure that they are not doing nothing and lying on the sofa all day and watching tv... :)
Believe me,Ias I was not able to do myself,I was searching for similar code long time, already about one year. I have seen nearly all videos on youtube with reference to esp32cam., I have read many articles, in English and Russian. The sources were numerous, but none was about code with" ALL IN ONE" My search criteria was: -interaction with camera via telegram app( not emails receiving only) -pir sensor motion detection with ON/OFF -use LED as flash with ON/OFF -ability to shoot photo at intervals -ability to change resolution of photo "on a fly"
The code is great for my purposes. Only one thing can be added: support for Telegram bot to control at least 1 horisontal servo motor. And only one thing is not perfect: delay of 3-4 seconds between motion detection and first photo shot.
All the best! And many thanks for Your work! Best regards from Ukraine!
Is it possible to specify more than 1 "AdminChatID", in order for my wife to control same from her phone?
I am already working on these two features, but I am not finished yet : 1) Pan Tilt Servo control Features . 2) More than one AdminID , and also another extra role as Viewer only.
@mrmate2
A new version of TeleView is available that has :
Good day, is it possible to enable external PIR support on "AI Thinker ESP32-CAM", i.e. some GPIO pin to listen for PIR input, or at least to enable external physical button to activate photo capture? If yes-then to make appropriate switch in telegram bot interface. Your project is very good, but no motion detection for PIR "AI Thinker ESP32-CAM" is dissapointing... Unfortunately my skills in coding are not yet sufficient. Many thanks in advance. Best regards from Ukraine!
P.S just thoughts: -"restart" button in telegram would be a good option
setting lapse time in secons instead of minutes also would be nice. sometimes need photo every 20-30 sec...