How to create a photo gallery widget/database?

25 views Asked by At

I am relatively new to IT and currently working on building a security system using a Raspberry Pi and Thingsboard. My Raspberry Pi 5 is connected to a camera and a PIR sensor and it shots a photo every time the PIR sensor detects a body, so I can see who was there. I managed to build a widget in a Thingsboard dashboard that shows the latest photo shot. Basically, a Python code is run in my Raspberry, then it encode the photo from JPEG to base64 and sends the photo to Thingsboard in base64; after that, the widget receives the image and decode the photo in JPEG using Javascript. Now, I need to find a way to see - let's say - all the photos shot in the past 24 hours. Ideally, I would like to have a new widget on my dashboard where I can scroll through the photos captured over the specified timeframe (hours/days). I tried to use a time-series table but the images aren't displayed correctly (I only see the base64 encoded string and can't decode it inside this widget). I've read the documentation and tried to understand how the rule engine works and it seems to me that it could be used for my goal but I'm completely lost. Thanks in advance for your assistance.

0

There are 0 answers