Initial commit: homelab configs, Docker, Neo4j, voice control, Gitea

This commit is contained in:
mo
2026-05-10 02:02:03 +02:00
commit 4dea5925fb
42 changed files with 5680 additions and 0 deletions
+32
View File
@@ -0,0 +1,32 @@
"""Quick test: pg_client + dashboard API."""
import os, sys
os.environ["NEO4J_PASSWORD"] = "WaQTUw2t"
os.environ["PG_PASSWORD"] = "WaQTUw2t"
# Test PostgreSQL connectie
from src.pg_client import query
print("PostgreSQL test:")
try:
r = query("SELECT count(*) as cnt FROM dashboard.favorites", fetch="one")
print(f" Favorites: {r['cnt']}")
r2 = query("SELECT count(*) as cnt FROM dashboard.calendar_events", fetch="one")
print(f" Events: {r2['cnt']}")
r3 = query("SELECT count(*) as cnt FROM dashboard.passwords", fetch="one")
print(f" Passwords: {r3['cnt']}")
print(" [OK] PostgreSQL werkt!")
except Exception as e:
print(f" [FOUT] {e}")
# Test Neo4j connectie
print("\nNeo4j test:")
try:
from src.neo4j_client import get_driver, get_all_devices, close
devices = get_all_devices()
print(f" Devices: {len(devices)}")
print(f" Eerste: {devices[0]['ip']} - {devices[0]['hostname']}")
print(" [OK] Neo4j werkt!")
close()
except Exception as e:
print(f" [FOUT] {e}")
print("\nAlle connecties werken. Server kan starten.")