블로그에서 작성한 글의 시스템 구조에서 가상 월패드와 가상 온도조절기의 예시 코드입니다.
보러가기

월패드의 경우 mqtt 라이브러리 설치가 필요합니다
virtualenv paho-mqtt
source paho-mqtt/bin/activate
pip install paho-mqtt온도조절기의 경우 mqtt 라이브러리와 smartthings sdk 설치가 필요합니다.
git clone https://github.com/eclipse-paho/paho.mqtt.c.git
cd paho.mqtt.c
sudo apt install libssl-dev cmake
sudo make install
git clone https://github.com/SmartThingsCommunity/st-device-sdk-c.git
cd st-device-sdk-c/
git submodule update --init --recursiverun.sh 파일을 이용해 실행할 수 있습니다.