refresh
Код: Выделить всё
$status=$this->getProperty("status");
$status2=$this->getProperty("status2");
if ($status) {
getURL('http://'.$this -> getProperty("IP").'/gpio?st=1&pin='.$this -> getProperty("pin1"), 0);
} else {
getURL('http://'.$this -> getProperty("IP").'/gpio?st=0&pin='.$this -> getProperty("pin1"), 0);
}
if ($status2) {
getURL('http://'.$this -> getProperty("IP").'/gpio?st=1&pin='.$this -> getProperty("pin2"), 0);
} else {
getURL('http://'.$this -> getProperty("IP").'/gpio?st=0&pin='.$this -> getProperty("pin2"), 0);
}
Код: Выделить всё
$status=$this->getProperty("status");
if ($status) {
$this->callMethod('turnOff');
} else {
$this->callMethod('turnOn');
}
$status2=$this->getProperty("status2");
if ($status2) {
$this->callMethod('turnOff');
} else {
$this->callMethod('turnOn');
}
Код: Выделить всё
$this->setProperty("status",0);
$this->setProperty("status2",0);
$this->callMethod("refresh");
Код: Выделить всё
$this->setProperty("status",1);
$this->setProperty("status2",1);
$this->callMethod("refresh");