From 887ddfc8a5a606eeaf151d1161d29f2ca6808e45 Mon Sep 17 00:00:00 2001 From: "1708639776959.sdttutorial" Date: Mon, 29 Apr 2024 09:02:00 +0000 Subject: [PATCH] Update main.py --- main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index 99b2cb9..0db5c31 100644 --- a/main.py +++ b/main.py @@ -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__":