copied cosmostat web dashboard for init dashboard work

This commit is contained in:
matt committed 2026-10-14 00:36:21 -07:00
1 parent b414065d63
commit 92a97752ad
28 files changed
+2804 -3

No files matched your search

+19
View File
@@ -0,0 +1,19 @@
import redis
import json
from config import *
####################################################
### Redis Functions
####################################################
r = redis.Redis(host=bind_ip, port=redis_port)
def update_redis(data):
# push data to redis
# Publish to the Redis channel that the WS server is listening on
r.publish('temp_hum', json.dumps(data))
if debug_output:
print("=== Stats Redis Update ===")
print(json.dumps(data, indent=2))
return True