add clientid manag

This commit is contained in:
2024-12-30 11:30:30 +01:00
parent 927578ecd3
commit 4619255a32
2 changed files with 18 additions and 13 deletions

View File

@@ -1,4 +1,5 @@
import paho.mqtt.client as mqtt
import paho.mqtt.publish as publish
import subprocess
import argparse
import requests
@@ -68,7 +69,7 @@ class CurrentClients:
def get_client_list(args, auth):
try:
mqtt.publish.single(args.pub_topic, '{"commands":[{"command":"listClients"}]}', hostname=args.host, port=args.port, auth=auth)
publish.single(args.pub_topic, '{"commands":[{"command":"listClients"}]}', hostname=args.host, port=args.port, auth=auth)
except Exception as e:
logger.error(f"Error publishing client list request: {e}")