From 48198075f1d8cbbe210a3f9adb9c4cdaa343f3b9 Mon Sep 17 00:00:00 2001 From: "1708639776959.sdtroot" Date: Tue, 21 May 2024 06:18:38 +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 1cae752..4edd18d 100644 --- a/main.py +++ b/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__":