From 5c1d08ee98ec9bfe8f88b7f1d1e3a2989b9ba035 Mon Sep 17 00:00:00 2001 From: "support.sampyo" Date: Tue, 30 Jul 2024 04:55:55 +0000 Subject: [PATCH] Commit message --- framework.yaml | 2 +- main.py | 26 +++++++++++++------------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/framework.yaml b/framework.yaml index 87dc422..7cb6b9f 100644 --- a/framework.yaml +++ b/framework.yaml @@ -7,5 +7,5 @@ spec: virtualEnv: base # 사용할 가상환경 이름입니다. package: requirements.txt # 설치할 Python 패키지 정보 파일입니다.(기본 값은 requirement.txt 입니다.) stackbase: - tagName: v0.0.47 # Stackbase(gitea)에 릴리즈 태그명 입니다. + tagName: v0.0.48 # Stackbase(gitea)에 릴리즈 태그명 입니다. repoName: sampyo-dio # Stackbase(gitea)에 저장될 저장소 이릅니다. diff --git a/main.py b/main.py index 341a813..f9a4eef 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 @@ -278,16 +278,16 @@ def clean_system(): Valve_MainWater(chip=output_lines, status=status, action='Off') time.sleep(0.5) - Valve_EnterWater(chip=output_lines, status=status, action='On']) + Valve_EnterWater(chip=output_lines, status=status, action='On') time.sleep(0.5) - Valve_Vent(chip=output_lines, status=status, action='On']) + Valve_Vent(chip=output_lines, status=status, action='On') time.sleep(clean_duration) Valve_PureWater(chip=output_lines, status=status, action='Off') time.sleep(0.5) - Valve_Vent(chip=output_lines, status=status, action='Off']) + Valve_Vent(chip=output_lines, status=status, action='Off') time.sleep(0.5) - Valve_EnterWater(chip=output_lines, status=status, action='Off']) + Valve_EnterWater(chip=output_lines, status=status, action='Off') time.sleep(0.5) def runAction(): @@ -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