Hey everyone,
I've been using a LARQ smart bottle for a while and always wanted to track my hydration directly in Home Assistant. LARQ has no official HA integration and no public API, so I decided to reverse-engineer things and build one from scratch and build a local-first integration.
GitHub: https://github.com/kasim141-a/hass-larq
What it does
Four sensors:
| Sensor | Description |
|---|---|
| sensor.larq_water_today | Total water consumed today (mL) |
| sensor.larq_last_drink | Timestamp of last recorded drink |
| sensor.larq_daily_goal | Your personalised daily goal (mL) |
| sensor.larq_battery | Bottle battery % via BLE |
How it works
LARQ doesn't expose a public API, so there are two data sources:
1. BLE battery — read directly from the bottle via GATT characteristic 0x2A19 using bleak on the HA host. No cloud involved.
2. Hydration data — LARQ syncs drink events to a Firebase Realtime Database via the iOS app. Each entry has a timestamp and volume in litres. A small Mac-side Python script (run via cron every 5 minutes) fetches today's entries and pushes them to HA via the REST API.
The tricky part — getting your Firebase token
LARQ authenticates via Sign in with Apple, which normally can’t be intercepted. However, the Firebase SDK refreshes its token silently in the background every hour over a plain HTTPS call to securetoken.googleapis.com. If you run an HTTPS proxy (I used Stream - Network Debug Tool App - App Store) on your iPhone for ~1 hour with the LARQ app open, you’ll catch this refresh and get a long-lived refresh_token that the script uses going forward.
Full step-by-step instructions are in the README
Setup summary
- Sniff your Firebase refresh token using an HTTPS proxy
- Copy custom_components/larq/ to your HA /config/ directory
- Install bleak in a venv on your HA host
- Add - platform: larq to configuration.yaml
- Configure and run larq_push.py on a Mac on the same network
- Set up a cron job for automatic updates
Limitations / known issues
- Hydration data is only as fresh as the last time the LARQ app synced to Firebase (the bottle stores events locally and uploads when the app is opened)
- The push script requires a Mac to be on the network — I couldn’t get Firebase token refresh working from within the HA container (Firebase returns INVALID_REFRESH_TOKEN from Alpine Linux / aiohttp, works fine from macOS curl — still not sure why, happy to hear if anyone figures it out)
- BLE battery reading requires the bottle to be in range of the HA host’s Bluetooth adapter
Would love feedback, PRs welcome — especially if anyone figures out the Firebase refresh issue from Linux!
