Differences

This shows you the differences between two versions of the page.

Link to this comparison view

iothings:proiecte:2025sric:homemonitoringsystemwithalerts [2025/05/24 14:13]
andrei.buhnici [Thingsboard]
iothings:proiecte:2025sric:homemonitoringsystemwithalerts [2025/05/24 14:37] (current)
andrei.buhnici [References]
Line 50: Line 50:
 ====== Software ====== ====== Software ======
  
-=== Code Snippets ​===+=== Arduino ​Code ===
 I have 2 ino files, 1 for the base ESP32 which controls the sensors and sends the data, and the other is for the esp32 cam module to take the picture and save it to my google drive. The base ESP32 code is the Thingsboard example modified to fit my needs and the esp32 cam module contains different examples combined (http server example, take photo example and google drive data upload example). I have 2 ino files, 1 for the base ESP32 which controls the sensors and sends the data, and the other is for the esp32 cam module to take the picture and save it to my google drive. The base ESP32 code is the Thingsboard example modified to fit my needs and the esp32 cam module contains different examples combined (http server example, take photo example and google drive data upload example).
  
Line 1063: Line 1063:
 </​code>​ </​code>​
  
-And also there is the telemetry data:+And also there is the telemetry data and the dashboard shown in the context section.
  
 {{:​iothings:​proiecte:​2025sric:​tb_ss.png?​600|}} {{:​iothings:​proiecte:​2025sric:​tb_ss.png?​600|}}
 +
 +{{:​iothings:​proiecte:​2025sric:​tb_dashboard.png?​600|}}
  
  
 ====== Challenges ====== ====== Challenges ======
 +The most challenging thing was to actually take the photo, because it needed a bit more setup with the google cloud and the actual taking of the photo. And also i really struggled with the google script because it was returning a redirect response and i had to figure out how to follow the redirect link in order to get the image URL. It took me a lot of time to realise i can just extract the url from the body of the redirect message and just make another request. Also i first wanted to send the image url through BLE to the main ESP32 and it took me a while to realise that BLE and Wi-Fi don't really work simultaneously,​ because there is interference and communication ordering and stuff. So i had to give that up and find another way, because i really didn't want to connect wires since i was skeptical about how to connect them. So i eventually came up with a web server and then it went smoothly.
 +
 +Another big challenge was how to send SMS only once and not every time an "​alarm"​ is triggered. And to achieve what i have now i reached the limit of free sms messages sent in 3 different days. I first tried to keep count of alarms in Thingsboard but it didn't went well and i just figured that i can manage the alarm stuff locally and just set them off from the cloud and that's exactly what i did. Now an alarm triggers once until it's turned off.
 +
 +And the last challenge i encountered was setting the right values for potentiometers and the thresholds set by me.
 +
 +There was a lot of trial and error during this project but thankfully nothing was fried :D.
  
 ====== References ====== ====== References ======
 +- https://​thingsboard.io/​docs/​devices-library/​esp32-dev-kit-v1/​
 +
 +- https://​docs.sunfounder.com/​projects/​umsk/​en/​latest/​03_esp32/​esp32_lesson04_mq2.html
 +
 +- https://​www.electronicwings.com/​esp32/​pir-sensor-interfacing-with-esp32
 +
 +- https://​circuitdigest.com/​microcontroller-projects/​interface-ky038-sound-sensor-with-esp32
 +
 +- https://​randomnerdtutorials.com/​esp32-cam-take-photo-save-microsd-card/​
 +
 +- https://​www.niraltek.com/​blog/​how-to-take-photos-and-upload-it-to-google-drive-using-esp32-cam/​
 +
 +- https://​ocw.cs.pub.ro/​courses/​iothings/​laboratoare/​2022/​lab3
 +
 +- https://​thingsboard.io/​docs/​user-guide/​ui/​rule-chains/​
  
  
iothings/proiecte/2025sric/homemonitoringsystemwithalerts.1748085236.txt.gz · Last modified: 2025/05/24 14:13 by andrei.buhnici
CC Attribution-Share Alike 3.0 Unported
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0