$device_id=$params['did'];
$destination_id=$params['dest'];
$packet_id=$params['pid'];
$command_id=$params['c'];
$data=$params['d'];
if ($device_id==0) {
if ($command_id==10) {
//temp
setGlobal('ws.tempInside',round($data/100));
} elseif ($command_id==12) {
//motion
callMethod('intSensor.statusChanged',array('status'=>1));
clearTimeOut($id.'_move');
setTimeOut($id.'_move',"callMethod('intSensor.statusChanged',array('status'=>0));",20);
}
}