def on_connect(client, userdata, flags, rc):
if rc == 0:
print_line('MQTT connection established', console=True, sd_notify=True)
print()
else:
print_line('Connection error with result code {} - {}'.format(str(rc), mqtt.connack_string(rc)), error=True)
#kill main thread
os._exit(1)
miflora-mqtt-daemon.py 文件源码
python
阅读 19
收藏 0
点赞 0
评论 0
评论列表
文章目录