Script : Add GPS EXIF to DLSR photo using HASS DB

I’m a passionate photographer and have an extensive photo library (more than 80K photo). To quickly find photos in this library I often use location metadata (GPS EXIF), it works well for smartphone photos but it does not for photos taken with traditional cameras (my DLSR at least).

I wrote a python script to insert GPS EXIF into my DLSR photo using the closest GPS location recorded in Home Assistant DB.

I use latitude, longitude and altitude coordinates recorded in device_trackerentities sent by home assistant mobile app.

This script only works with MariaDB for now but if needed I will make it more DB agnostic.

Let me know if you some of you are interested to make this code more user friendly :slight_smile: