Switched from influx to victoria metrics (more light weight for pi)

This commit is contained in:
2026-06-27 00:14:10 -04:00
parent ce332be419
commit 74c5e48d8a
3 changed files with 5 additions and 8 deletions

View File

@@ -14,7 +14,7 @@ def cfg():
'LATITUDE': float(os.getenv('LATITUDE', '0.0')),
'LONGITUDE': float(os.getenv('LONGITUDE', '0.0')),
'ALTITUDE': float(os.getenv('ALTITUDE', '0.0')),
'VM_URL': os.getenv('VM_URL', 'http://localhost:8428'),
'DB_HOST': os.getenv('DB_HOST', 'http://localhost:8428'),
'GPS_PORT': os.getenv('GPS_PORT', '/dev/ttyS0'),
'GPS_BAUD': int( os.getenv('GPS_BAUD', '9600')),
'GAS_REFERENCE': int( os.getenv('GAS_REFERENCE', '250000')),
@@ -46,7 +46,7 @@ def write(c, fields, collection='weather'):
for k, v in fields.items() if v is not None
)
if not field_str: return
requests.post(f"{c['VM_URL']}/write", data=f"{collection} {field_str}", timeout=2)
requests.post(f"{c['DB_HOST']}/write", data=f"{collection} {field_str}", timeout=2)
# ── Helpers ───────────────────────────────────────────────────────────────────