diff --git a/auto_import.py b/auto_import.py index 4b4d23c..c03523d 100644 --- a/auto_import.py +++ b/auto_import.py @@ -15,7 +15,7 @@ _IMP_FILE = "/share/external/DEV3304_1/auto_import" _DEV_DATA = "/share/external/DEV3304_1/MISC/version.txt" - +print("###############") #sys.exit() while True: @@ -37,6 +37,8 @@ while True: print("--------------") print(strValue) _DEV_CONT = json.loads(strValue) + print(_DEV_CONT) + print(_DEV_CONT["wifi mac"]) wifimac = _DEV_CONT["wifi mac"] if wifimac == "2474f742c017": _DEV = "gopro9_1" diff --git a/mqtt_srv.py b/mqtt_srv.py index d1c0d4b..a5c6657 100644 --- a/mqtt_srv.py +++ b/mqtt_srv.py @@ -1039,6 +1039,7 @@ if curos == "Windows": r = json.dumps(results) #client.publish("home-assistant/" + host + "/hwstats", payload='{"TPCHDIO":"' + str(results["TPCHDIO"]) + '", "SMEMUTI":"' + str(results["SMEMUTI"]) + '", "TCPU":"' + str(results["TCPU"]) + '", "TGPU1DIO":"' + str(results["TGPU1DIO"]) + '", "SGPU1BIUTI":"' + str(results["SGPU1BIUTI"]) + '", "FCPU":"' + str(results["FCPU"]) + '", "SVIRTMEMUTI":"' + str(results["SVIRTMEMUTI"]) + '", "SCPUUTI":"' + str(results["SCPUUTI"]) + '"}', qos=0, retain=False) client.publish("home-assistant/" + host + "/hwstats", payload=r, qos=0, retain=False) + client.publish("sectorq/systems/" + host.lower() + "/stat", payload="on", qos=0, retain=True) #print(json.dumps(stats)) #writeLog(json.dumps(stats)) else: