Browse Source

Usage of mqtt app_name for client instance

master
Dirk Alders 2 years ago
parent
commit
62ac64ddfc
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      mpd_monitor.py

+ 2
- 2
mpd_monitor.py View File

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

Loading…
Cancel
Save