Initial Commit
- initial default booting image
This commit is contained in:
12
support/testing/tests/package/sample_python_paho_mqtt.py
Normal file
12
support/testing/tests/package/sample_python_paho_mqtt.py
Normal file
@@ -0,0 +1,12 @@
|
||||
from paho.mqtt import publish, subscribe
|
||||
|
||||
publish.single(
|
||||
'buildroot/test',
|
||||
payload="Hello, World!",
|
||||
qos=2,
|
||||
retain=True,
|
||||
hostname="localhost",
|
||||
port=1883)
|
||||
|
||||
message = subscribe.simple('buildroot/test')
|
||||
print(message.payload.decode())
|
||||
Reference in New Issue
Block a user