Update main.py
This commit is contained in:
parent
41c2b93858
commit
48198075f1
4
main.py
4
main.py
|
@ -3,14 +3,14 @@ import time
|
|||
import uuid
|
||||
|
||||
sdtcloud = sdtcloudpubsub.sdtcloudpubsub()
|
||||
mqttClient = sdtcloud.setClient(f"device-app-{uuid.uuid1()}") # parameter is client ID(string)
|
||||
sdtcloud.setClient(f"device-app-{uuid.uuid1()}") # parameter is client ID(string)
|
||||
|
||||
def runAction():
|
||||
while True:
|
||||
msg = {
|
||||
"message": "Hello World"
|
||||
}
|
||||
sdtcloud.pubMessage(mqttClient, msg)
|
||||
sdtcloud.pubMessage(msg)
|
||||
time.sleep(2)
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
|
Loading…
Reference in New Issue