diff --git a/LoraMlr003/form.json b/LoraMlr003/form.json index 176e4c9..7dc05e3 100644 --- a/LoraMlr003/form.json +++ b/LoraMlr003/form.json @@ -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": [ diff --git a/LoraMlr003/module.php b/LoraMlr003/module.php index bd68ff8..084106f 100644 --- a/LoraMlr003/module.php +++ b/LoraMlr003/module.php @@ -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); } /** diff --git a/library.json b/library.json index 613fedf..14e1e8b 100644 --- a/library.json +++ b/library.json @@ -7,7 +7,7 @@ "version": "6.0", "date": 1491343200 }, - "version": "1.4", - "build": 6, + "version": "1.5", + "build": 0, "date": 0 } \ No newline at end of file