Compare commits
No commits in common. "main" and "v1.0.0" have entirely different histories.
4
main.py
4
main.py
|
@ -4,7 +4,7 @@ import uuid
|
|||
import random
|
||||
|
||||
sdtcloud = sdtcloudpubsub.sdtcloudpubsub()
|
||||
sdtcloud.setClient(f"device-app-{uuid.uuid1()}") # parameter is client ID(string)
|
||||
mqttClient = 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(100, 1000)
|
||||
|
||||
}]
|
||||
sdtcloud.pubMessage(msg)
|
||||
sdtcloud.pubMessage(mqttClient, msg)
|
||||
time.sleep(2)
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
|
Loading…
Reference in New Issue