This commit is contained in:
jhartworks
2024-12-13 13:57:00 +01:00
parent 7f88ce0009
commit b69958b2d7
3 changed files with 9 additions and 4 deletions
+3 -1
View File
@@ -5,6 +5,8 @@
{ "type": "ValidationTextBox", "name": "devName", "caption": "Name" },
{ "type": "NumberSpinner", "name": "devTime", "caption": "Refreshtime" },
{ "type": "NumberSpinner", "name": "devLoraQueTime", "caption": "LORA QUE Time (min)" },
{ "type": "Label", "caption": "Mqtt Properties" },
{ "type": "SelectInstance", "name": "mqttGwId", "caption": "Mqtt Gateway", "validModules":["{C6D2AEB3-6E1F-4B2E-8E69-3A1A00246850}"] },
{ "type": "SelectInstance", "name": "modGwId", "caption": "Modbus Gateway", "validModules":["{A5F663AB-C400-4FE5-B207-4D67CC030564}"] },
@@ -47,7 +49,7 @@
],
"actions":
[
{ "type": "Button", "label": "Send QUE", "onClick": "MLR3_WriteSetpointvalues($id);" }
],
"status":
[
+4 -1
View File
@@ -9,6 +9,8 @@ class LoraMlr003 extends IPSModule {
$this->RegisterPropertyString("devName","A Small Valve in a Big World 01");
$this->RegisterPropertyInteger("devTime",10);
$this->RegisterPropertyInteger("devLoraQueTime",10);
$this->RegisterPropertyString("mqttPrefix","milesight01");
$this->RegisterPropertyInteger("mqttGwId",54321);
$this->RegisterPropertyInteger("modGwId",54321);
@@ -68,6 +70,7 @@ class LoraMlr003 extends IPSModule {
$devEui = $this->ReadPropertyString("devEui");
$mqttGwId = $this->ReadPropertyInteger("mqttGwId");
$devTime = $this->ReadPropertyInteger("devTime");
$devLoraQueTime = $this->ReadPropertyInteger("devLoraQueTime");
$topicuplink = $mqttPrefix.'/uplink'.'/'.$devEui;
$topicdownlink = $mqttPrefix.'/downlink'.'/'.$devEui;
@@ -76,7 +79,7 @@ class LoraMlr003 extends IPSModule {
$this->MqttPublish("s".$devEui, $mqttGwId, $devName." ".$devEui. " downlink", $topicdownlink, "", false, false);
$this->SetTimerInterval("ReadUpdate", $devTime * 1000);
$this->SetTimerInterval("WriteUpdate", 10 * 60 * 1000);
$this->SetTimerInterval("WriteUpdate", $devLoraQueTime * 60 * 1000);
}
/**
+2 -2
View File
@@ -7,7 +7,7 @@
"version": "6.0",
"date": 1491343200
},
"version": "1.4",
"build": 6,
"version": "1.5",
"build": 0,
"date": 0
}