added server component
This commit is contained in:
parent
f41de7596e
commit
2609f72941
@ -71,6 +71,10 @@ def checkPC():
|
|||||||
if powerState['swhpamp'] == "ON":
|
if powerState['swhpamp'] == "ON":
|
||||||
publ.single("cmnd/swhpamp/POWER", "off", hostname=broker, port=port, auth={'username':username,'password':password})
|
publ.single("cmnd/swhpamp/POWER", "off", hostname=broker, port=port, auth={'username':username,'password':password})
|
||||||
except Exception as e: print(e)
|
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__":
|
if __name__ == "__main__":
|
||||||
sub=threading.Thread(target=subscribe_state)
|
sub=threading.Thread(target=subscribe_state)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user