This commit is contained in:
jaydee
2022-12-30 12:29:55 +01:00
parent 09cac2a609
commit d62166d109
2 changed files with 4 additions and 1 deletions

View File

@@ -15,7 +15,7 @@ _IMP_FILE = "/share/external/DEV3304_1/auto_import"
_DEV_DATA = "/share/external/DEV3304_1/MISC/version.txt" _DEV_DATA = "/share/external/DEV3304_1/MISC/version.txt"
print("###############")
#sys.exit() #sys.exit()
while True: while True:
@@ -37,6 +37,8 @@ while True:
print("--------------") print("--------------")
print(strValue) print(strValue)
_DEV_CONT = json.loads(strValue) _DEV_CONT = json.loads(strValue)
print(_DEV_CONT)
print(_DEV_CONT["wifi mac"])
wifimac = _DEV_CONT["wifi mac"] wifimac = _DEV_CONT["wifi mac"]
if wifimac == "2474f742c017": if wifimac == "2474f742c017":
_DEV = "gopro9_1" _DEV = "gopro9_1"

View File

@@ -1039,6 +1039,7 @@ if curos == "Windows":
r = json.dumps(results) 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='{"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("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)) #print(json.dumps(stats))
#writeLog(json.dumps(stats)) #writeLog(json.dumps(stats))
else: else: