|
@@ -104,7 +104,7 @@ class TR069Service
|
|
|
return $this->get($url);
|
|
|
}
|
|
|
|
|
|
- function setWlan($id, $ssid, $password = null){
|
|
|
+ public function setWlan($id, $ssid, $password = null){
|
|
|
|
|
|
$url = "{$this->url}/devices/{$id}/tasks?connection_request";
|
|
|
|
|
@@ -123,7 +123,7 @@ class TR069Service
|
|
|
return $return;
|
|
|
}
|
|
|
|
|
|
- function setCATV($id, $state = true){
|
|
|
+ public function setCATV($id, $state = true){
|
|
|
|
|
|
$url = "{$this->url}/devices/{$id}/tasks?connection_request";
|
|
|
|
|
@@ -138,7 +138,7 @@ class TR069Service
|
|
|
return $return;
|
|
|
}
|
|
|
|
|
|
- function setWbroadcast($id, $state = true){
|
|
|
+ public function setWbroadcast($id, $state = true){
|
|
|
|
|
|
$url = "{$this->url}/devices/{$id}/tasks?connection_request";
|
|
|
|
|
@@ -153,7 +153,7 @@ class TR069Service
|
|
|
return $return;
|
|
|
}
|
|
|
|
|
|
- function setWstatus($id, $state = true){
|
|
|
+ public function setWstatus($id, $state = true){
|
|
|
|
|
|
$url = "{$this->url}/devices/{$id}/tasks?connection_request";
|
|
|
|
|
@@ -168,7 +168,7 @@ class TR069Service
|
|
|
return $return;
|
|
|
}
|
|
|
|
|
|
- function setParameter($id, $parameter, $value, $type) {
|
|
|
+ public function setParameter($id, $parameter, $value, $type) {
|
|
|
$url = "{$this->url}/devices/{$id}/tasks?connection_request";
|
|
|
|
|
|
$data = array();
|
|
@@ -182,4 +182,24 @@ class TR069Service
|
|
|
return $return;
|
|
|
}
|
|
|
|
|
|
+ public function getTR069Data($data) {
|
|
|
+ $result = array();
|
|
|
+
|
|
|
+ $result['_id'] = $data['_id'] ?? null;
|
|
|
+ $result['_deviceId'] = $data['_deviceId'] ?? null;
|
|
|
+
|
|
|
+ $result['SSID'] = $data['InternetGatewayDevice']['LANDevice']['1']['WLANConfiguration']['1']['SSID'] ?? null;
|
|
|
+ $result['keyPassphrase'] = $data['InternetGatewayDevice']['LANDevice']['1']['WLANConfiguration']['1']['KeyPassphrase'] ?? null;
|
|
|
+ $result['SSIDAdvertisementEnabled'] = $data['InternetGatewayDevice']['LANDevice']['1']['WLANConfiguration']['1']['SSIDAdvertisementEnabled'] ?? null;
|
|
|
+ $result['Status'] = $data['InternetGatewayDevice']['LANDevice']['1']['WLANConfiguration']['1']['Enable'] ?? null;
|
|
|
+
|
|
|
+ //InternetGatewayDevice.LANDevice.1.WLANConfiguration.1.PreSharedKey.1.PreSharedKey
|
|
|
+ $result['preSharedKey'] = $data['InternetGatewayDevice']['LANDevice']['1']['WLANConfiguration']['1']['PreSharedKey']['1']['PreSharedKey'] ?? null;
|
|
|
+
|
|
|
+ $result['CatvPower'] = $data['InternetGatewayDevice']['VS_AppCfg']['VsCatvCfg']['CatvPower'] ?? null;
|
|
|
+ $result['ExternalIPAddress'] = $data['InternetGatewayDevice']['WANDevice']['1']['WANConnectionDevice']['1']['WANPPPConnection']['1']['ExternalIPAddress'] ?? null;
|
|
|
+
|
|
|
+ return $result;
|
|
|
+ }
|
|
|
+
|
|
|
}
|