浏览代码

Usage of mqtt app_name for client instance

master
Dirk Alders 2 年前
父节点
当前提交
62ac64ddfc
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2
    2
      mpd_monitor.py

+ 2
- 2
mpd_monitor.py 查看文件

@@ -51,7 +51,7 @@ class mpc(object):
51 51
 
52 52
 
53 53
 def send_state_msg_mqtt(state):
54
-    client= paho.Client("mpd")
54
+    client= paho.Client(config.APP_NAME)
55 55
     client.username_pw_set(config.MQTT_USER, config.MQTT_PASS)
56 56
     try:
57 57
         client.connect(config.MQTT_SERVER, 1883)
@@ -63,7 +63,7 @@ def send_state_msg_mqtt(state):
63 63
 
64 64
 
65 65
 def send_title_msg_mqtt(title):
66
-    client= paho.Client("mpd")
66
+    client= paho.Client(config.APP_NAME)
67 67
     client.username_pw_set(config.MQTT_USER, config.MQTT_PASS)
68 68
     try:
69 69
         client.connect(config.MQTT_SERVER, 1883)

正在加载...
取消
保存