A mobile-first web application for capturing and logging water meter readings with automatic metadata extraction, GPS-based timezone detection, and cloud storage integration.
- Mobile-optimized interface works on iOS and Android
- Upload photos from camera or photo library
- Support for JPEG, PNG formats
- Automatic EXIF metadata extraction
- Touch-friendly image manipulation (pinch zoom, pan, rotate)
- Automatic GPS coordinate extraction from photo metadata
- Smart timezone detection using Geoapify API
- Displays latitude, longitude, and hemispheric references
- Real-time timezone recommendation based on location
- Visual confirmation with green notification
- Three automatic modes:
- EXIF datetime: Uses photo's original timestamp
- Capture time: For browser camera photos (< 10 seconds old)
- Manual entry: Prompts user for old photos without metadata
- Timezone-aware UTC conversion
- Dual display: Original time (local) and UTC time
- Single meter or compound meter support
- Flexible units: Gallons, Liters, Cubic Feet, Cubic Meters
- Organization ID, Device ID, and Meter Name fields
- Structured JSON output with all metadata
-
Local/OneDrive Save: Downloads files to iOS Files app
- User selects destination (OneDrive, iCloud Drive, etc.)
- Saves both image and JSON metadata
- Two-step process for iOS compatibility
-
SharePoint Integration (optional):
- Direct upload to configured SharePoint folder
- Azure AD authentication with SSO support
- Batch upload (image + JSON)
- Pre-configured for:
/sites/MarlinProductEngineering2/Shared Documents/Mobile/EXIF
- iOS Debug Console: Real-time debugging visible on-screen
- Comprehensive console logging
- Error handling with user-friendly messages
- No external dependencies except CDN libraries
-
Fork or clone this repository
git clone https://github.com/jahrling/water-meter-logger.git
-
Enable GitHub Pages
- Go to repository Settings
- Navigate to Pages section
- Select
mainbranch and root folder - Save
-
Access your app
- URL:
https://jahrling.github.io/water-meter-logger/exif-extractor.html - Bookmark it or add to home screen on mobile
- URL:
- Open the app in Safari (iOS) or Chrome (Android)
- Tap "Choose File" or drag-and-drop a photo
- Review extracted GPS and timestamp data
- Enter meter details (Org ID, Device ID, meter name, reading)
- Select timezone (auto-detected if GPS available)
- Tap "Save Image & JSON" to download files
The Geoapify API key is pre-configured with 3,000 free requests per day.
How it works:
- Photo with GPS → Automatic timezone detection
- Green notification appears: "📍 Timezone Detected from GPS"
- Dropdown auto-updates to correct timezone
Supported regions: USA, Canada, Europe, Asia, Australia, South America, Africa (50+ timezones mapped)
To enable the "Save to SharePoint" button:
-
Register Azure AD Application
- Go to Azure Portal
- Navigate to: Azure Active Directory → App registrations → New registration
- Fill in:
Name: Water Meter Photo Logger Supported account types: Accounts in this organizational directory only Redirect URI: Single-page application (SPA) URL: https://jahrling.github.io/water-meter-logger/
-
Configure API Permissions
- Add Microsoft Graph permissions:
Files.ReadWrite.AllSites.ReadWrite.All
- Grant admin consent
- Add Microsoft Graph permissions:
-
Add Client ID to Code
- Copy Application (client) ID from Azure
- Edit
exif-extractor.html, find line ~740:clientId: "YOUR_AZURE_APP_CLIENT_ID",
- Replace with your actual client ID
- Commit and push changes
-
Update Target Folder (optional)
- Edit
sharePointConfigobject (line ~750):const sharePointConfig = { siteUrl: "your-tenant.sharepoint.com", sitePath: "/sites/YourSite", libraryName: "Shared Documents", folderPath: "Your/Folder/Path" };
- Edit
📖 See SHAREPOINT_SETUP.md for detailed instructions.
- Open the app in Safari
- Tap the Share button
- Select "Add to Home Screen"
- Tap "Add"
The app will now appear on your home screen like a native app!
- Open the app in Chrome
- Tap the three-dot menu
- Select "Add to Home screen"
- Tap "Add"
{
"filename": "IMG_1234.jpg",
"orgId": "ORG123",
"deviceId": "DEV456",
"meterName": "Building A Main",
"meterType": "single",
"meterReadings": {
"reading1": 12345.67,
"units": "gallons",
"reading2": 67890.12
},
"OffsetTimeOriginal": "UTC-06:00",
"timestamp_utc": "2024-01-15T20:30:45.000Z",
"DateTimeOriginal": "2024-01-15T14:30:45.000Z",
"gps": {
"latitude": 41.878100,
"latitudeRef": "N",
"longitude": -87.629800,
"longitudeRef": "W",
"gpsVersionID": "2.2.0.0"
}
}| Field | Type | Description |
|---|---|---|
filename |
string | Original photo filename |
orgId |
string | Organization identifier |
deviceId |
string | Device/sensor identifier |
meterName |
string | Human-readable meter name |
meterType |
string | "single" or "compound" |
meterReadings.reading1 |
number | Primary reading (always required) |
meterReadings.reading2 |
number | Secondary reading (compound meters only) |
meterReadings.units |
string | "gallons", "liters", "cubic_feet", or "cubic_meters" |
OffsetTimeOriginal |
string | Timezone of photo (e.g., "UTC-06:00") |
timestamp_utc |
string | Timestamp in UTC (ISO 8601) |
DateTimeOriginal |
string | Original timestamp from EXIF (ISO 8601) |
gps.latitude |
number | Decimal degrees latitude |
gps.latitudeRef |
string | "N" or "S" |
gps.longitude |
number | Decimal degrees longitude |
gps.longitudeRef |
string | "E" or "W" |
gps.gpsVersionID |
string | GPS version from EXIF |
- Pure HTML/CSS/JavaScript - No build process required
- Single file application - Easy to deploy and maintain
- Progressive Web App (PWA-ready) - Can be added to home screen
- Geoapify Reverse Geocoding API - Timezone detection from coordinates
- Microsoft Graph API - SharePoint file upload (optional)
- ✅ iOS Safari 12+
- ✅ Android Chrome 80+
- ✅ Desktop Chrome, Edge, Firefox, Safari
- No data collection - All processing happens in browser
- No server backend - Direct client-to-API communication
- OAuth 2.0 - Secure authentication for SharePoint
- API key included - Pre-configured Geoapify key (public tier)
Problem: GPS location detected but timezone doesn't update
- Solution: Check the debug panel (black console at bottom). If timezone name appears but isn't mapped, open an issue with the timezone name.
Problem: No GPS data extracted
- Cause: Browser camera photos don't include GPS metadata
- Solution: Use photos from your native Camera app with location services enabled
Problem: iOS saves to Downloads instead of prompting for location
- Solution: This is expected behavior. Use the Files app to move files to OneDrive or iCloud Drive after download.
Problem: "SharePoint not configured" error
- Solution: Follow SHAREPOINT_SETUP.md to register an Azure AD app and add the client ID.
Problem: Upload button doesn't work on iOS
- Solution: Ensure you're using Safari. Other browsers may have restrictions.
Problem: Photo appears upside down or rotated
- Solution: Use the rotation buttons (⟲ ⟳) at the bottom-left of the image.
- Browser camera photos have no EXIF data (use native Camera app instead)
- Timezone mapping requires pre-defined list (currently 50+ timezones)
- Large files (>10MB) may be slow to upload to SharePoint
- Offline mode not supported (requires internet for timezone lookup)
- Desktop use works but is optimized for mobile
- Add offline mode with cached timezone database
- Support for video uploads
- Batch upload multiple photos
- Historical reading charts
- Export to CSV
- Dark mode
- Multi-language support
- Progressive Web App (PWA) with service worker
Contributions are welcome! Please feel free to submit a Pull Request.
- Clone the repository
- Open
exif-extractor.htmlin your browser - Make changes
- Test on both desktop and mobile
- Submit PR
To add a timezone mapping:
- Find the
getUTCOffsetFromTimezone()function - Add your timezone to the
timezoneMapobject:'America/Argentina/Buenos_Aires': 'UTC-03:00',
- Test with a photo from that location
- Submit PR
MIT License - See LICENSE file for details
- EXIF.js - EXIF metadata extraction library
- Geoapify - Free geocoding and timezone API
- Microsoft - Azure AD and Graph API documentation
- Anthropic Claude - Development assistance
Having issues? Please open an issue on GitHub.
Upload a photo and see GPS data automatically extracted
Green notification appears when timezone is auto-detected
Choose to save locally or directly to SharePoint
Made with ❤️ for water meter monitoring Made with Claude.ai