Update main.py

This commit is contained in:
1708639776959.sdttutorial 2024-04-29 09:02:00 +00:00
parent 750987f18b
commit 887ddfc8a5
1 changed files with 2 additions and 2 deletions

View File

@ -4,7 +4,7 @@ import uuid
import random
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:
@ -19,7 +19,7 @@ def runAction():
"value": random.randint(18, 27)
}]
sdtcloud.pubMessage(mqttClient, msg)
sdtcloud.pubMessage(msg)
time.sleep(2)
if __name__ == "__main__":