mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2025-12-07 09:36:05 -08:00
MQTT more logging #522
This commit is contained in:
@@ -47,6 +47,11 @@ client = None # mqtt client
|
||||
|
||||
def main():
|
||||
|
||||
mylog('debug', [f"[{pluginName}] DEBUG TEST"])
|
||||
mylog('verbose', [f"[{pluginName}] VERBOSE TEST"])
|
||||
mylog('minimal', [f"[{pluginName}] MINIMAL TEST"])
|
||||
mylog('none', [f"[{pluginName}] NONE TEST"])
|
||||
|
||||
mylog('verbose', [f'[{pluginName}](publisher) In script'])
|
||||
|
||||
# Check if basic config settings supplied
|
||||
@@ -132,6 +137,12 @@ class sensor_config:
|
||||
|
||||
def publish_mqtt(client, topic, message):
|
||||
status = 1
|
||||
|
||||
|
||||
|
||||
mylog('verbose', [f"[{pluginName}] Sending MQTT topic: {topic}"])
|
||||
mylog('verbose', [f"[{pluginName}] Sending MQTT message: {message}"])
|
||||
|
||||
while status != 0:
|
||||
result = client.publish(
|
||||
topic=topic,
|
||||
|
||||
@@ -395,7 +395,7 @@
|
||||
{
|
||||
"function": "dev_NewDevice",
|
||||
"type": "integer.checkbox",
|
||||
"default_value": true,
|
||||
"default_value": 1,
|
||||
"options": [],
|
||||
"localized": ["name", "description"],
|
||||
"name": [
|
||||
|
||||
Reference in New Issue
Block a user