Fork of https://git.olli.info/Oliver/GadgetbridgeMqtt/ with support for Fossil Hybrid HR
Go to file
2025-12-07 13:50:10 +00:00
termux_setup Update termux_setup/shrinkdb.py 2025-12-07 13:50:10 +00:00
compose.yaml Update volume mapping in compose.yaml to mount the entire Gadgetbridge directory 2025-12-07 13:07:50 +01:00
healthcheck.py Update healthcheck.py 2025-09-17 19:42:21 +00:00
main.py Add method to get midnight timestamp and update queries to use it 2025-12-07 12:57:18 +01:00
Readme.md Update Readme.md 2025-12-07 13:47:31 +00:00

GadgetbridgeMqtt for TrueNAS Scale

This is a Gadgetbridge MQTT bridge for TrueNAS Scale, which allows you to connect your Gadgetbridge database to Home Assistant or other MQTT clients.

Setup

  • copy content compose.yaml your TrueNAS Scale Apps -> Discover Apps -> ⋮ -> Install via YAML
  • edit
    • mount point for your Gadgetbridge database
    • your Timezone
    • environment variables for your MQTT broker
  • start the app

Editing Sensors

Automated Gadgetbridge DB Shrink & Sync

1. Install Apps (F-Droid)

  • Termux (Terminal)
  • Termux:Boot (Auto-start scripts)

2. Configure Apps

  • Gadgetbridge: Settings → Auto Export → Location: /sdcard/Documents/GB_Raw
  • Nextcloud: Auto Upload → Custom Folder → Local: /sdcard/Documents/GB_Sync → Remote: /Backup/Gadgetbridge
  • Termux:Boot: Open app once to initialize.

3. Termux Setup (Run these commands)

# 1. Setup storage & install python
termux-setup-storage
pkg update -y && pkg install -y python wget

# 2. Create script directories
mkdir -p ~/scripts ~/.termux/boot

# 3. Download python script
wget -O ~/scripts/shrinkdb.py https://git.olli.info/Oliver/GadgetbridgeMqtt/raw/branch/main/termux_setup/shrinkdb.py

# 4. Create autostart launcher
printf '#!/data/data/com.termux/files/usr/bin/sh\ntermux-wake-lock\npython ~/scripts/shrinkdb.py &\n' > ~/.termux/boot/start_gb

4. Finish

Reboot your phone. The script will now run automatically, shrinking DBs from GB_Raw and placing clean versions in GB_Sync for Nextcloud.