|
@@ -514,6 +514,8 @@ class Lampcontrol extends Base_Controller {
|
|
|
exit(send_websocket($clientid,$data));
|
|
|
}else{
|
|
|
$res['msg'] = unpack('H*', $res['msg'])[1];
|
|
|
+
|
|
|
+ set_log('dimming_asy.txt',$res['msg']);
|
|
|
if (strtolower(crc16(pack('H*',substr($res['msg'], 0,-4)))) == strtolower(substr($res['msg'], -4)) && strtolower(substr($res['msg'], 18,2)) == '01') {
|
|
|
if ($lightness != 0) {
|
|
|
$this->Lamp_model->update(array('status'=>1,'lighteness'=>$lightness),array('id'=>$lampData['id']));
|