GSM ESP32 Camera Take Still Picture and Show In IOS App

Connect both ESP32 together via UART, I2C, ESP-NOW, Bluetooth, via Blynk Bridge…

Why not let the ESP that’s taking the photos handle the naming, and also update the URL in the app, using Blynk Bridge or the API?

Pete.

1 Like

I am making progress with a serial link between the two ESP32’s, and now have a number being sent from the main ESP to the ESP camera. I have just realised that it is my PHP script that is handling the image file name, not the ESP32 camera. So sending an image number is not going to help me here, need a rethink.

Thers an example earlier in the thread of how to append the current timestamp to the file name in the ESP, and it’s a simple task to change your PHP to stop it renaming your files on the server.

I think you’re making it far too complex by doing the serial connection, far easier to update Blynk directly as I suggested earlier.

Pete.

2 Likes

Is there a reason for using the two ESP32 devices?

I have used a single RPi (Zero) with the Pi Cam to handle all the video (would work for photo as well), streaming of said video and Blynk scripting (to control the image ON/OFF, BrightPi LED control, and even Pan & Tilt for awhile), all on the single device.

Eventually I will get around to finalising my DIY Wireless Doorbell Camera and may post it in the forum (if it still uses Blynk)

@Gunner, The main reason for using two ESP32 devices is that I can use the ESP32 camera as a module to my main ESP32 board. I am not sure that I could integrate the components into my main ESP32 quicker or cheaper than doing it this way. The amount of I/O pins that i am using on my main ESP32 means that I do not have the required spare either to add the camera.

@PeteKnight, I have got this far by copying and modifying existing examples so far, without fully understanding them. Whilst this gets me some results, it often presents complex issues when it comes to changing how they fundamentally work. Thank you for the pointer of stopping the PHP script renaming the file. I guess if I can get the two ESP’s to sync the file name and change it each time, it should have the desired effect.

My main goal is to build an alarm system to go into the back of a van, to detect a break in. The purpose of the camera is to allow the user to take a picture of the back of the van if the alarm triggers to verify wether or not the alarm is genuine or not. The whole system will need to run off of GSM (SIM800), I am hoping to setup the system so that one GSM modem can service the needs of the alarm system reporting to Blynk, and also the camera module being able to upload the picture when required.

I am currently only running Blynk on my main ESP32, not the ESP32 camera. The ESP32 camera takes a picture and uploads it when the main ESP32 triggers it.

I may be suffering from modifying my design on the fly and finding I am down a route that is not the most suitable. I think I need to take a step back and work out what is the best way to integrate the camera function into the alarm system.

Thank you for your input, much appreciated

I think you should be able to use bridge to link the two and then use a virtual pin to send the file name from one to the other.

Hi All,

After some thinking, I decided to persue the current method further. I am now in a situation where I am changing the URL each time a picture is taken. This is done by the main ESP32 incrementing the file number each time a new picture is requested. The file number is sent to the ESP32 cam via serial, and the file number is added on to the end of the upload URL as an id. The php script is setup to identify the id number and then add it on to the end of the file name before saving the file. The main ESP32 then updates the image widget URL to match that of the new image. This works well, which I am quite pleased about.
Only thing is, I am still having the same issue where the image is not refreshing in the Blynk app.

@ldb are you using android or IOS app?

Thank you

Both, but mainly Android.

Its strange, it seems to work properly once (refresh the image) after rebooting the main ESP32. After the first image is taken it then does not refresh again.

If you’re rebooting, does your file number starts from the beginning again? You need to assign an unique URL every time, thus the idea of using the epoch, at least this is what worked for me.

If I reboot the main ESP32, the file number starts from 1 each time. I see what you are saying, to overcome the cache the URL needs to be different every time. Rather than just different from the previous.
Will see what I can do.

Thanks

Are you using the latest beta version (2.26.1(2)) of the iOS app, installed via the TestFlight app?

Pete.

@PeteKnight I am using the normal IOS app, 2.26.0(9)

It Finally works!

@ldb, thank you for the pointers! Now using the unix time stamp as the id and file name, it works as desired. Each time I request a new image, it updates properly.

To everyone who has given some time to me in this thread, thank you very much. This is quite a large milestone in this project so far.

If anyone would like to see my code please say and I will post it up.

Thanks again!

Hi jimbob123!

I am trying to do a quite similar project, but I am lost in all the options…

I managed to run a raspberry pi based surveillance system on our boat for the last three years, which ran great. The boat is about 1 1/2h driving from my home and it is good to have the feeling everything is o.k. on board.
Now I got the information, that the shore power must be switched off, when I am not on board. I can produce some energy with a solar panel, but the raspberry pi (and the LTE router in the second line) are too battery hungry (1A/h ). As the batteries hold about 150 Ah, I need to find a low power solution.

I use ESPEASY with a ESP32 in the. moment, and I am able to send all the sensor data via MQTT. Best would be, if the ESP32 could go to deepsleep and wake up by timer (this would work ) or a pir motion sensor event.
I tried ESP32-Camera to wake up, upload a picture to an ftp server, and go sleeping again. But I did not manage to modify or write the sketch.
How did you succed?