added server component

This commit is contained in:
Angoosh Leviocki 2025-01-13 21:48:07 +01:00
parent f41de7596e
commit 2609f72941
Signed by: angoosh
GPG Key ID: 2DAE446D291BD8D3

View File

@ -71,6 +71,10 @@ def checkPC():
if powerState['swhpamp'] == "ON":
publ.single("cmnd/swhpamp/POWER", "off", hostname=broker, port=port, auth={'username':username,'password':password})
except Exception as e: print(e)
try:
if powerState['swmicamp'] == "ON":
publ.single("cmnd/swmicamp/POWER", "off", hostname=broker, port=port, auth={'username':username,'password':password})
except Exception as e: print(e)
if __name__ == "__main__":
sub=threading.Thread(target=subscribe_state)