logo elektroda
logo elektroda
X
logo elektroda

Wicket bell with ESP32 cam - camera stops taking pictures after 30 minutes of inactivity

glogus 1884 23
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #1 19464962
    glogus
    Level 9  
    Hello
    I'm trying to make a doorbell with an ESP 32 cam. The problem is that after about 30 minutes of inactivity the cam itself stops taking pictures (dark screen), the rest of the ESP32 chip works, sends a notification, opens the striker, only the screen is dark. After a reset it is OK again.
    I will mention that I am a beginner in programming and will be very grateful for any help.
    I have tried uploading various examples from the web, but always the same.
    Regards and please help
  • ADVERTISEMENT
  • #2 19465032
    vieleicht
    Level 37  
    Here they describe similar problems and the conclusion is that the fault lies with the camera. I suggest reducing the frame_rate or swapping the camera/using a different module as a trial.
    https://github.com/esphome/issues/issues/551
  • ADVERTISEMENT
  • #3 19465295
    glogus
    Level 9  
    I already have 3 of these modules from different sources and on all of them I have the same thing, then the module is probably out. I have also tried different power sources. I have noticed that when I check it every few minutes it can work fine.
    I will read the link you gave me. Thanks and looking forward to further suggestions
  • #4 19470634
    Anonymous
    Level 1  
  • #5 19470662
    glogus
    Level 9  
    I supply power from 5V, from various power supplies, even a laboratory one with 5V and 3A output.
    I soldered 100uF and 100nF capacitors onto the 5V and Gnd pins for filtering purposes.
    Recently, after reading the post provided where they suspect overheating of the camera, I glued a heatsink to the camera and nothing helps either.
  • ADVERTISEMENT
  • #6 19471371
    Anonymous
    Level 1  
  • #7 19471541
    glogus
    Level 9  
    I'm currently testing on an antenna on a pcb, but the router hangs over the desk on which I'm testing the device. I'm wondering if this problem can be solved by restarting the camera every few minutes (after all, with the intercom it is used sporadically during the day), I just have a problem how to do it, I'm a beginner in programming and these ESP sleeps I don't quite understand.
    Greetings
  • #8 19471768
    Anonymous
    Level 1  
  • #9 19471799
    glogus
    Level 9  
    I am currently testing this example (zip)
    I have also tried others.
    I don't know if waking up via a button will work, or if the connection time to the server will be too long. ( I use my own BLYNK server set up on a malinka)
    Currently there is a constant connection and even when the camera stops working there is a notification to the phone and an open button from the phone and local ( you can't take a picture)
    In this arrangement the ringing trigger is proximity, but this can be changed to a button
  • #10 19472703
    Anonymous
    Level 1  
  • #11 19474739
    glogus
    Level 9  
    Hello
    I've pasted the one as you wrote (hopefully right (attachment)), but unfortunately it didn't help.
    What surprises me is that the LED flashes and the screen is black.
    If it's not a problem for you, please help me make it so that the whole thing resets say every 5 minutes when not in use, as the camera itself probably can't.
    With a manual reset it takes about 20 sec to make a call, so triggering it with the ring button is a bit pointless.
    I am very grateful to you for your help
  • #12 19474763
    Anonymous
    Level 1  
  • ADVERTISEMENT
  • #13 19476118
    glogus
    Level 9  
    Hello
    I have done everything as described in the link provided, but it is too complicated and problematic to handle for the household members.
    In addition, there are delays in the notifications.
    In my solution, the notifications come immediately (own server) and the operation consists of receiving the notification, looking at the photo and possibly touching the wicket opening icon. Sharing with householders is just scanning the QR code with their phones.
    So I think probably the best solution though would be a cyclic reset of the module. ( I have no other idea)
    The problem is that I don't really know how to do this.
    The worst part is that I got into this problem without a thorough timing test and crashed the old intercom. (I have provisionally connected a wireless bell, but the gate has to go to open manually).

    Added at 15 [minutes]:

    Sorry to poison you so much (you are the only person who helps such a grandparent- thank you very much).
    I've now noticed that when I reset the camcorder with the button on the board, I get a connection almost instantly and everything works (I was turning off the power supply before)
  • #14 19476462
    Anonymous
    Level 1  
  • #15 19477333
    glogus
    Level 9  
    Hello
    Thank you for taking the time to do this.
    In this as you put it "exercise" the camcorder worked for a few hours and then hung up. Unplugging the power and it was OK again.

    I pasted what you sent me and got the error.
    (The library too, of course).

    I pasted it here at the end of the loop void setup()
    startCameraServer();

    Serial.print("Camera Ready! Use 'http://'");
    Serial.print(WiFi.localIP());
    local_IP = WiFi.localIP().toString();
    Serial.println("' to connect");
    Blynk.begin(auth, ssid, password, IPAddress(192,168,0,113), 8080);

    void configAutoRestart(uint64_t secs) {
    const esp_timer_create_args_t __args = {
    .callback = [] (void*) {
    esp_restart();
    },
    .arg = nullptr,
    .dispatch_method = ESP_TIMER_TASK,
    .name = "AutoRestart",
    };
    static esp_timer_handle_t __handle;
    esp_timer_create(&__args, &__handle);
    esp_timer_start_periodic(__handle, secs * 1000000);
    }

    }

    I received an error:

    a function-definition is not allowed here before '{' token

    I do not know where I am making the error.
    If you can write me this for a reboot every 10 minutes

    I WILL BE VERY THANKFUL and sorry to exploit you like this
  • #16 19477343
    Anonymous
    Level 1  
  • #17 19479157
    glogus
    Level 9  
    Hello
    Apologies for such an error, but I've been unwell lately (return of illness).
    Now it works except that after those 10 minutes the whole ESP hangs, just a reset from the board
  • #18 19479317
    Anonymous
    Level 1  
  • #19 19479682
    glogus
    Level 9  
    I did as you wrote and after 10 minutes no wifi connection, pressing the button on the esp resumes the connection
  • #20 19479697
    Anonymous
    Level 1  
  • #21 19480349
    glogus
    Level 9  
    Attached is the code I am testing with your improvements.
    I noticed that when I check the ringtone every few minutes it works fine, when left idle there is now no wifi connection, previously the ringtone worked, only the photo was missing (black screen, strangely the lamp flashed when the photo was triggered).
    The ringtone works with BLYNK on my server, but other projects I have on mim work all the time (weather station, letter notification and others) so it's probably not the server's fault.
  • #22 19480719
    glogus
    Level 9  
    Hello
    I don't know if it's relevant, but today I noticed that while the camera is on standby, it keeps sending images.
    I typed the address of the camcorder into my phone and I am getting the image
  • #23 19480725
    Anonymous
    Level 1  
  • #24 19482199
    glogus
    Level 9  
    I uploaded the code yesterday and it worked all afternoon, I left it overnight and in the morning it was out of picture.
    But strangely enough I reset and it worked all day.
    I'm wondering if by chance it's because I was in range of the camera all day and there was movement (there were changes in the recorded image), and at night there was no movement.
    And I still have a question:
    how to check which software is currently uploaded, because I'm already dumbfounded (I'm testing on two ESPs)

    Added after 38 [minutes]:

    It's already bad, no photo

Topic summary

The discussion revolves around a user experiencing issues with an ESP32-CAM based doorbell project, where the camera stops taking pictures after approximately 30 minutes of inactivity, resulting in a dark screen. Despite the ESP32 chip functioning normally (sending notifications and opening the door), the camera requires a reset to operate again. Various troubleshooting steps were suggested, including reducing the frame rate, using different power sources, and implementing a cyclic reset function to restart the ESP32 periodically. The user also explored the possibility of overheating and power supply issues, while considering the use of an external antenna. Ultimately, the user sought assistance in programming a solution to automatically restart the camera to maintain functionality.
Summary generated by the language model.
ADVERTISEMENT