...
|
...
|
@@ -191,6 +191,9 @@ class AesController extends HomeBaseController{ |
|
|
}
|
|
|
}else if($type==2){
|
|
|
if($key[0]=='0xff' && $key[7]=='0xef'){
|
|
|
if ($key[5]=='0x01'){
|
|
|
Db::name('equipment')->where('mac_address',$MACAddress)->update(['electricity'=>0]);
|
|
|
}
|
|
|
if ($key[6]=='0x01'){
|
|
|
//修改数据库设备状态
|
|
|
$this->apiResponse(1,'状态为开锁');//开着
|
...
|
...
|
@@ -203,6 +206,8 @@ class AesController extends HomeBaseController{ |
|
|
}
|
|
|
$this->apiResponse(0,'状态为关锁');//关了
|
|
|
}
|
|
|
|
|
|
|
|
|
}else{
|
|
|
$this->apiResponse(2,'返回指令错误');
|
|
|
}
|
...
|
...
|
|