remibert / pycameresp

Motion detection with image notification for Esp32CAM and Esp32 flasher with GUI based on esptool.py.
Other
71 stars 20 forks source link

Pushover token/user #2

Closed mrmate2 closed 3 years ago

mrmate2 commented 3 years ago

Dear remibert, I am asking for Your assistance again. Please, give me more detailed and step by step instructions about what data to enter in Pushover Tab of camera web server. I installed pusover on android phone, and have got user key in this android application. What is the difference between user key and token? Is it the same? What do I have to enter as "User" and "Token"? Another surprise: If I connect to Access point directly, my Chrome browser is succssesfully showing streaming video.If I enyer the web server interface being connected through home wifi router-chrome browser is not showing sreaming video. But Firefox browser show video.Why this happening? And seems brightness adjustment does not work at all... Many thanks for Your patience and kind reply!

remibert commented 3 years ago

Hello,

I think, you must create an application on pushover, when you have created an application, you get user and token, see :

https://pushover.net/apps/build https://pushover.net/apps/build

Try the firmware delivered yesterday (V2), it solves some problems with browser. Chrome and Safari work better, I never used firefox with the streaming.

Attention the new firmware changes the port of the web server, it is a consequence of the introduction of homekit. Now you have to open the web server on port 8080 (http://xxx.xxx.xxx.xxx:8080).

For the router, I think you must open a port with the nat translation or something like this, refer to documentation of router or try a question on forum of the router web site.

Be careful, there is no strong security protection if you are exposing streaming to the world wide web. Note you cannot simultaneously see the video on several browsers at the same time, esp32 is very very limited in performance, there can only be one stream at a time (The last requestor has priority). Basically the firmware is made for motion detection, and streaming cuts off detection, after a time I stop streaming (avoid to forget), and motion detection resumes. Lots of things are probably still perfectible.

Regards.

Le 2 mars 2021 à 21:36, mrmate2 notifications@github.com a écrit :

Dear remibert, I am asking for Your assistance again. Please, give me more detailed and step by step instructions about what data to enter in Pushover Tab of camera web server. I installed pusover on android phone, and have got user key in this android application. What is the difference between user key and token? Is it the same? What do I have to enter as "User" and "Token"? Another surprise: If I connect to Access point directly, my Chrome browser is succssesfully showing streaming video.If I enyer the web server interface being connected through home wifi router-chrome browser is not showing sreaming video. But Firefox browser show video.Why this happening? And seems brightness adjustment does not work at all... Many thanks for Your patience and kind reply!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/remibert/pycameresp/issues/2, or unsubscribe https://github.com/notifications/unsubscribe-auth/AP3HE2BBJMOKWHBE2LKJFQDTBVD3LANCNFSM4YPWHLWQ.

mrmate2 commented 3 years ago

Good day! After Your previous post, I managed to run software, everythinks works fine! I have noticed that motion captured photos are stored on SD card( if it is present). If there is no SD card, are they stored in internal memory of ESP32Cam? In both cases, if the photo storage memory is full, what will happen, or older files will be automatically deleted? Is there a way to remotely access stored photos( in internal menory or on SD card) via FTP? When connected via FTP i see only "config" directory, welcome.py, main.py, and boot.py files. Nothing else. My apologies for bothering, but would You be so kind to give at least brief explanation of meaning/usage of adjustment values in Motion Tab of web interface:Images configuration and Detection configuration sections. For example: which item adjustment will increase/decrease sensitivity of motion detection, the size of motion object detected,e.t.c. And again, many thanks for software and replies on my noob questions.

remibert commented 3 years ago

Hello,

If you have no sdcard, the image is lost, however, you will have the push over notification. If you have sd card inserted, (plug it and reboot, no dynamic detection), you can see the images in the folder sdcard with ftp, and then you can download, erase directly by ftp.

The default values are set for intrusion detection, in a room that does not receive exterior light, and has internal lighting (the camera needs light to detect). Putting the camera outside may detect birds or cats, clouds that obscure the sun, or passing cars.

The motion detection is based on simple mechanism, I calculate the differences between many previous photos, if it exceeds a certain number of differences I notify. The camera takes approximately an image every 600ms. Each image is divided into 118 squares, I calculate the average color in each square, and I compare the values of the squares with the previous photos (image historic size is the number of previous image).

Image historic size : indicates the quantity of images, not change this value. A larger value requires more memory, lower can miss detections. Glitch ignored threshold : sometimes the camera returns erroneous images, in this case differences are ignored, for a detection to be valid, several successive images must be different. Do not change this value unless the camera has failed many times. You can see if the photo is truncated, or gray. Motion detection threshold : gives the number of images that must be different to detect movement. Not change this value, except if you want to reduce the sensitivity (you can to increase the number by one or two max not more). Start detection at image : unfortunately the camera needs to "heat up" a bit to take stable pictures. Not change this value or extend it if you have detection when you plug camera.

To adjust the sensitivity you must act on these follow parameters :

I know it's not easy to set up, I will try to improve this in the future, for now the cameras I use, I leave the default values. In fact there is no 100% effective solution, if you lower the sensitivity you can miss an intrusion, and if you increase it too much you will have many notifications. You have to proceed by trial, if you want to find the default settings, you must delete the "config/MotionConfig.json" file and reboot ESP32.

On ftp avoid deleting the main.py, otherwise the camera will never start. You can delete boot.py and welcome.py (boot.py is not used, and welcome.py displays the home page on the website, you can also customize it or remove it, other page will be always displayed). If you erase config directory, you lost all parameters (not do this).

Do not forget to deactivate the access point, otherwise anyone can connect to your camera.

The state of the motion detection is visible with telnet, this displays a line with the amount of differences squares found in the successive images. With version 2, you have shell with telnet, do one control C, and you can enter command, control twice time and control D reboot the esp32. On shell type "help" to see all commands available.

Regards.

Le 3 mars 2021 à 12:29, mrmate2 notifications@github.com a écrit :

Good day! After Your previous post, I managed to run software, everythinks works fine! I have noticed that motion captured photos are stored on SD card( if it is present). If there is no SD card, are they stored in internal memory of ESP32Cam? In both cases, if the photo storage memory is full, what will happen, or older files will be automatically deleted? Is there a way to remotely access stored photos( in internal menory or on SD card) via FTP? When connected via FTP i see only "config" directory, welcome.py, main.py, and boot.py files. Nothing else. My apologies for bothering, but would You be so kind to give at least brief explanation of meaning/usage of adjustment values in Motion Tab of web interface:Images configuration and Detection configuration sections. For example: which item adjustment will increase/decrease sensitivity of motion detection, the size of motion object detected,e.t.c. And again, many thanks for software and replies on my noob questions.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/remibert/pycameresp/issues/2#issuecomment-789647477, or unsubscribe https://github.com/notifications/unsubscribe-auth/AP3HE2DN4PTFPLJB2ONLMB3TBYMR5ANCNFSM4YPWHLWQ.

mrmate2 commented 3 years ago

Thank You very much for such detailed and thorough explanation concerning my last questions. Presently I am using V1 of Your software and, unfortunately, I do not "see the images in the folder sdcard with ftp".. I can see them only if I remove the card and put it into SD card reader of my PC. Maybe it is an issue of V1 firmware? Few hours later I am planning to flash V2 and will check sd card photos via FTP.... As for motion detection settings, seems that default settings must be the best ones, because I am sure: You have spent many hours testing for the best settings.

remibert commented 3 years ago

If you log with telnet on esp32, perhaps you see error message of sd card. The format of sd card can be a problem, format supported is FAT (32 I think is good, but exfat I'm not sure that work). Press also reset button, it solve also some problem with sd card (not due to my implementation, sd card can be capricious also camera can not responding). Pass on V2, I fixed a lot of problems, if you not erase the esp32, you can keep your configuration (wifi and parameters).

Le 3 mars 2021 à 19:19, mrmate2 notifications@github.com a écrit :

Thank You very much for such detailed and thorough explanation concerning my last questions. Presently I am using V1 of Your software and, unfortunately, I do not "see the images in the folder sdcard with ftp".. I can see them only if I remove the card and put it into SD card reader of my PC. Maybe it is an issue of V1 firmware? Few hours later I am planning to flash V2 and will check sd card photos via FTP.... As for motion detection settings, seems that default settings must be the best ones, because I am sure: You have spent many hours testing for the best settings.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/remibert/pycameresp/issues/2#issuecomment-789952588, or unsubscribe https://github.com/notifications/unsubscribe-auth/AP3HE2AXIWO7ZJORIY2XKCLTBZ4UZANCNFSM4YPWHLWQ.

mrmate2 commented 3 years ago

All is ok now, on V2 I can access photos on sd card. Remains one question: what will be when the free space on SD card will be over?Do I have to clean old files manually? Small note: in my case brightness and contrast adjustment have no effect in V2... On V1 brightness/contrast adjustments were working ok.