From 50a6bf2373217032b67e1140f93d70b7af85912e Mon Sep 17 00:00:00 2001 From: "support.sampyo" Date: Tue, 30 Jul 2024 05:22:35 +0000 Subject: [PATCH] Commit message --- framework.yaml | 2 +- main.py | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/framework.yaml b/framework.yaml index 7cb6b9f..4580450 100644 --- a/framework.yaml +++ b/framework.yaml @@ -7,5 +7,5 @@ spec: virtualEnv: base # 사용할 가상환경 이름입니다. package: requirements.txt # 설치할 Python 패키지 정보 파일입니다.(기본 값은 requirement.txt 입니다.) stackbase: - tagName: v0.0.48 # Stackbase(gitea)에 릴리즈 태그명 입니다. + tagName: v0.0.49 # Stackbase(gitea)에 릴리즈 태그명 입니다. repoName: sampyo-dio # Stackbase(gitea)에 저장될 저장소 이릅니다. diff --git a/main.py b/main.py index f9a4eef..7b671f0 100644 --- a/main.py +++ b/main.py @@ -5,7 +5,7 @@ import sys, signal import gpiod from pymodbus.client import ModbusTcpClient # import AWSIoTPythonSDK.MQTTLib as AWSIoTPyMQTT -# import sdtcloudnodeqmqtt +import sdtcloudnodeqmqtt import pytz from datetime import datetime import threading, socket @@ -301,13 +301,13 @@ def runAction(): # 2. device-app-light-app -> Good # 3. device-test-app -> Bad global data - # sdtcloud = sdtcloudnodeqmqtt.sdtcloudnodeqmqtt() - # mqttClient1 = sdtcloud.setClient(f"device-app-1{uuid.uuid1()}") # parameter is client ID(string) - # mqttClient2 = sdtcloud.setClient(f"device-app-2{uuid.uuid1()}") # parameter is client ID(string) - # mqttClient3 = sdtcloud.setClient(f"device-app-3{uuid.uuid1()}") # parameter is client ID(string) - # mqttClient4 = sdtcloud.setClient(f"device-app-4{uuid.uuid1()}") # parameter is client ID(string) - # mqttClient5 = sdtcloud.setClient(f"device-app-5{uuid.uuid1()}") # parameter is client ID(string) - # mqttlist = [mqttClient1, mqttClient2, mqttClient3, mqttClient4, mqttClient5] + sdtcloud = sdtcloudnodeqmqtt.sdtcloudnodeqmqtt() + mqttClient1 = sdtcloud.setClient(f"device-app-1{uuid.uuid1()}") # parameter is client ID(string) + mqttClient2 = sdtcloud.setClient(f"device-app-2{uuid.uuid1()}") # parameter is client ID(string) + mqttClient3 = sdtcloud.setClient(f"device-app-3{uuid.uuid1()}") # parameter is client ID(string) + mqttClient4 = sdtcloud.setClient(f"device-app-4{uuid.uuid1()}") # parameter is client ID(string) + mqttClient5 = sdtcloud.setClient(f"device-app-5{uuid.uuid1()}") # parameter is client ID(string) + mqttlist = [mqttClient1, mqttClient2, mqttClient3, mqttClient4, mqttClient5] # If you have config's value, please make config.json file. # - Project Code's variable: projectCode(string) @@ -322,7 +322,7 @@ def runAction(): if result: data['timestamp'] = int(time.time() * 1000) - # sdtcloud.pubMessage(mqttlist[cnt], data) + sdtcloud.pubMessage(mqttlist[cnt], data) cnt += 1 if cnt == 5: cnt = 0