Update Readme.md
This commit is contained in:
parent
28060f5940
commit
d20367d67b
33
Readme.md
33
Readme.md
@ -14,4 +14,35 @@ This is a Gadgetbridge MQTT bridge for TrueNAS Scale, which allows you to connec
|
|||||||
## Editing Sensors
|
## Editing Sensors
|
||||||
|
|
||||||
- add new mqtt sensor around here [main.py#L90](https://git.olli.info/Oliver/GadgetbridgeMqtt/src/branch/main/main.py#L90)
|
- add new mqtt sensor around here [main.py#L90](https://git.olli.info/Oliver/GadgetbridgeMqtt/src/branch/main/main.py#L90)
|
||||||
- add new function for new sensor around here [main.py#L208](https://git.olli.info/Oliver/GadgetbridgeMqtt/src/branch/main/main.py#L208)
|
- add new function for new sensor around here [main.py#L208](https://git.olli.info/Oliver/GadgetbridgeMqtt/src/branch/main/main.py#L208)
|
||||||
|
|
||||||
|
## 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)
|
||||||
|
```bash
|
||||||
|
# 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.
|
||||||
Loading…
Reference in New Issue
Block a user