V1.5
This commit is contained in:
@@ -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":
|
||||
[
|
||||
|
||||
@@ -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);
|
||||
|
||||
}
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user