mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2025-12-07 09:36:05 -08:00
MQTT, INSTALL scripts work⤵
This commit is contained in:
@@ -26,7 +26,14 @@
|
||||
"string" : "A plugin to publish a notification via the Apprise gateway."
|
||||
}
|
||||
],
|
||||
"params" : [],
|
||||
"params" : [
|
||||
{
|
||||
"name" : "devices",
|
||||
"type" : "sql",
|
||||
"value" : "SELECT dev_LastIP from DEVICES",
|
||||
"timeoutMultiplier" : true
|
||||
}
|
||||
],
|
||||
"database_column_definitions":
|
||||
[
|
||||
{
|
||||
@@ -271,7 +278,7 @@
|
||||
{
|
||||
"function": "CMD",
|
||||
"type": "readonly",
|
||||
"default_value":"python3 /home/pi/pialert/front/plugins/_publisher_mqtt/mqtt.py",
|
||||
"default_value":"python3 /home/pi/pialert/front/plugins/_publisher_mqtt/mqtt.py devices={devices}",
|
||||
"options": [],
|
||||
"localized": ["name", "description"],
|
||||
"name" : [{
|
||||
@@ -294,7 +301,7 @@
|
||||
{
|
||||
"function": "RUN_TIMEOUT",
|
||||
"type": "integer",
|
||||
"default_value": 600,
|
||||
"default_value": 10,
|
||||
"options": [],
|
||||
"localized": ["name", "description"],
|
||||
"name" : [{
|
||||
|
||||
@@ -100,9 +100,16 @@ class sensor_config:
|
||||
|
||||
plugObj = getPluginObject({"Plugin":"MQTT", "Watched_Value3":hash_value})
|
||||
|
||||
mylog('verbose', [f"[{pluginName}] Previous plugin object entry: {json.dumps(plugObj)}"])
|
||||
# mylog('verbose', [f"[{pluginName}] Previous plugin object entry: {json.dumps(plugObj)}"])
|
||||
|
||||
if plugObj == {}:
|
||||
self.isNew = True
|
||||
mylog('verbose', [f"[{pluginName}] New sensor entry mac : {mac}"])
|
||||
mylog('verbose', [f"[{pluginName}] New sensor entry input_string : {input_string}"])
|
||||
mylog('verbose', [f"[{pluginName}] New sensor entry hash_value : {hash_value}"])
|
||||
else:
|
||||
self.isNew = False
|
||||
|
||||
self.isNew = plugObj == {}
|
||||
|
||||
# Log sensor
|
||||
global plugin_objects
|
||||
@@ -117,7 +124,7 @@ class sensor_config:
|
||||
watched2 = sensorType,
|
||||
watched3 = hash_value,
|
||||
watched4 = mac,
|
||||
extra = 'null',
|
||||
extra = input_string,
|
||||
foreignKey = deviceId
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user