Commit 29dc40f7 authored by chen.weican's avatar chen.weican

【修改内容】3028tsl文件修改;窗帘绑定修改

【提交人】陈伟灿
parent b1be5f3f
...@@ -16,7 +16,7 @@ static cJSON *string_int_type_convert(cJSON *n_id,cJSON *n_dataType); ...@@ -16,7 +16,7 @@ static cJSON *string_int_type_convert(cJSON *n_id,cJSON *n_dataType);
static cJSON *string_double_type_convert(cJSON *n_id,cJSON *n_dataType); static cJSON *string_double_type_convert(cJSON *n_id,cJSON *n_dataType);
static cJSON *string_time_type_convert(cJSON *n_id,cJSON *n_dataType); static cJSON *string_time_type_convert(cJSON *n_id,cJSON *n_dataType);
static cJSON *fit_type_convert(cJSON *n_id,cJSON *n_dataType); static cJSON *fit_type_convert(cJSON *n_id,cJSON *n_dataType);
static cJSON *string_type_convert(cJSON *n_id,cJSON *n_dataType);
static CONVERT_ITEM_S convert_table[] = { static CONVERT_ITEM_S convert_table[] = {
{"bool",bool_type_convert}, {"bool",bool_type_convert},
...@@ -26,9 +26,22 @@ static CONVERT_ITEM_S convert_table[] = { ...@@ -26,9 +26,22 @@ static CONVERT_ITEM_S convert_table[] = {
{"string_int",string_int_type_convert}, {"string_int",string_int_type_convert},
{"string_double",string_double_type_convert}, {"string_double",string_double_type_convert},
{"string_time",string_time_type_convert}, {"string_time",string_time_type_convert},
{"fit",fit_type_convert} {"fit",fit_type_convert},
{"string",string_type_convert},
}; };
static cJSON *string_type_convert(cJSON *n_id,cJSON *n_dataType)
{
cJSON *args = NULL;
char buf[16] = {0};
if(n_id == NULL){
return NULL;
}
if(n_id->type==cJSON_Number){
sprintf(buf,"%d",n_id->valueint);
args = cJSON_CreateString(buf);
}
return args;
}
static cJSON *bool_type_convert(cJSON *n_id,cJSON *n_dataType) static cJSON *bool_type_convert(cJSON *n_id,cJSON *n_dataType)
{ {
cJSON *args = NULL; cJSON *args = NULL;
...@@ -206,7 +219,8 @@ static cJSON *string_val_type_convert(int type,cJSON *n_id,cJSON *n_dataType) ...@@ -206,7 +219,8 @@ static cJSON *string_val_type_convert(int type,cJSON *n_id,cJSON *n_dataType)
if(type==1){ if(type==1){
val.dVal = (n_id->valueint>0) ? 1 : 0; val.dVal = (n_id->valueint>0) ? 1 : 0;
}else{ }else{
val.iVal = (n_id->valueint>0) ? 1 : 0; //printf("n_id->valueint----------------->:%d\n",n_id->valueint);
val.iVal = (n_id->valueint>0) ? n_id->valueint : 0;
} }
}else if(strcmp(n_dataType->valuestring,"double")==0) { }else if(strcmp(n_dataType->valuestring,"double")==0) {
if(type==1){ if(type==1){
......
...@@ -109,7 +109,11 @@ cJSON * kk_control_protocol_convert(kk_map_dev_node_t *devNode,int nodeId,cJSON ...@@ -109,7 +109,11 @@ cJSON * kk_control_protocol_convert(kk_map_dev_node_t *devNode,int nodeId,cJSON
char ch[33]; char ch[33];
if(strcmp(opcode->valuestring,"MOVE_TO_POS") == 0 && strcmp(devNode->syn_opcode,"DOOYA_STATUS") == 0){
if(arg->type == cJSON_String){
kk_record_motorPosition(atoi(arg->valuestring));
}
}
kk_lan_db_channel_get(nodeId,&channel); kk_lan_db_channel_get(nodeId,&channel);
snprintf(ch,33,"%d",channel); snprintf(ch,33,"%d",channel);
......
...@@ -97,7 +97,11 @@ cJSON * val_conver_new2old(cJSON *newccuItem,cJSON *oldccuItem,int syn_type) ...@@ -97,7 +97,11 @@ cJSON * val_conver_new2old(cJSON *newccuItem,cJSON *oldccuItem,int syn_type)
return ccu_value_convert(n_dataType,n_valueRange,o_dataType,o_valueRange,n_value); return ccu_value_convert(n_dataType,n_valueRange,o_dataType,o_valueRange,n_value);
} }
static int s_motorPostion = -1;
void kk_record_motorPosition(int value){
s_motorPostion = value;
debug_log(LOG_DEBUG_LEVEL,"s_motorPostion:%d\n",s_motorPostion);
}
//更新设备状态 //更新设备状态
static int _kk_lan_update_device_status(int nodeId,cJSON *opcode,cJSON *arg,const char *syn_opcode) static int _kk_lan_update_device_status(int nodeId,cJSON *opcode,cJSON *arg,const char *syn_opcode)
{ {
...@@ -116,6 +120,7 @@ static int _kk_lan_update_device_status(int nodeId,cJSON *opcode,cJSON *arg,cons ...@@ -116,6 +120,7 @@ static int _kk_lan_update_device_status(int nodeId,cJSON *opcode,cJSON *arg,cons
memset(valBuff,0,sizeof(valBuff)); memset(valBuff,0,sizeof(valBuff));
if(arg->type==cJSON_String){ if(arg->type==cJSON_String){
debug_log(LOG_CRIT_LEVEL,"nodeId=%d,opcode=%s,arg=%s\n",nodeId,opcode->valuestring,arg->valuestring); debug_log(LOG_CRIT_LEVEL,"nodeId=%d,opcode=%s,arg=%s\n",nodeId,opcode->valuestring,arg->valuestring);
snprintf(valBuff,sizeof(valBuff),"%s",arg->valuestring); snprintf(valBuff,sizeof(valBuff),"%s",arg->valuestring);
}else if(arg->type==cJSON_Number){ }else if(arg->type==cJSON_Number){
...@@ -195,7 +200,7 @@ static int _kk_lan_sync_device_status(const char *deviceCode,kk_map_dev_node_t * ...@@ -195,7 +200,7 @@ static int _kk_lan_sync_device_status(const char *deviceCode,kk_map_dev_node_t *
{ {
cJSON *msg = NULL; cJSON *msg = NULL;
cJSON *arg = NULL; cJSON *arg = NULL;
int ignore = 0;
int nodeId = -1; int nodeId = -1;
char nodeBuff[33] = {0}; char nodeBuff[33] = {0};
...@@ -227,11 +232,23 @@ static int _kk_lan_sync_device_status(const char *deviceCode,kk_map_dev_node_t * ...@@ -227,11 +232,23 @@ static int _kk_lan_sync_device_status(const char *deviceCode,kk_map_dev_node_t *
memset(nodeBuff,0,sizeof(nodeBuff)); memset(nodeBuff,0,sizeof(nodeBuff));
snprintf(nodeBuff,sizeof(nodeBuff),"%d",nodeId); snprintf(nodeBuff,sizeof(nodeBuff),"%d",nodeId);
//printf("----------------------[%s][%d]\n",__FUNCTION__,__LINE__);
cJSON *motorPosCJSON = cJSON_GetObjectItem(arg,"motorPos");
//printf("----------------------[%s][%d]\n",__FUNCTION__,__LINE__);
if(motorPosCJSON != NULL&& motorPosCJSON->type == cJSON_String){//窗帘电机上报的position与设置的不一致,忽略上报
//printf("----------------------[%s][%d]s_motorPostion:%d\n",__FUNCTION__,__LINE__,s_motorPostion);
//printf("----------------------[%s][%d]atoi(motorPosCJSON->valuestring):%d\n",__FUNCTION__,__LINE__,atoi(motorPosCJSON->valuestring));
if(s_motorPostion != atoi(motorPosCJSON->valuestring) && s_motorPostion != -1){
ignore = 1;
}
}
//printf("----------------------[%s][%d]\n",__FUNCTION__,__LINE__);
msg=old_ccu_msg_build_json(nodeBuff,devNode->syn_opcode,NULL,arg); msg=old_ccu_msg_build_json(nodeBuff,devNode->syn_opcode,NULL,arg);
if(!ignore){
send_msg_to_module(msg); send_msg_to_module(msg);
s_motorPostion = -1;
}
cJSON_Delete(msg); cJSON_Delete(msg);
return 0; return 0;
} }
...@@ -289,7 +306,6 @@ static int kk_lan_property_convert(const char *deviceCode,kk_map_dev_node_t *dev ...@@ -289,7 +306,6 @@ static int kk_lan_property_convert(const char *deviceCode,kk_map_dev_node_t *dev
debug_log(LOG_DEBUG_LEVEL,"[err] cfg file.\n"); debug_log(LOG_DEBUG_LEVEL,"[err] cfg file.\n");
continue; continue;
} }
n_dataType = cJSON_GetObjectItem(n_item,"dataType"); n_dataType = cJSON_GetObjectItem(n_item,"dataType");
n_valueRange = cJSON_GetObjectItem(n_item,"valueRange"); n_valueRange = cJSON_GetObjectItem(n_item,"valueRange");
...@@ -356,8 +372,9 @@ static int kk_lan_property_convert(const char *deviceCode,kk_map_dev_node_t *dev ...@@ -356,8 +372,9 @@ static int kk_lan_property_convert(const char *deviceCode,kk_map_dev_node_t *dev
kk_lan_replace_val_to_obj(n_item,valObj,"value"); kk_lan_replace_val_to_obj(n_item,valObj,"value");
if((args = ccu_value_convert(n_dataType,n_valueRange,o_dataType,o_valueRange,valObj))!=NULL){ if((args = ccu_value_convert(n_dataType,n_valueRange,o_dataType,o_valueRange,valObj))!=NULL){
//printf("[%s][%d]\n",__FUNCTION__,__LINE__);
_kk_lan_update_device_status(nodeId,opcode,args,devNode->syn_opcode); _kk_lan_update_device_status(nodeId,opcode,args,devNode->syn_opcode);
//printf("[%s][%d]\n",__FUNCTION__,__LINE__);
} }
......
...@@ -216,8 +216,76 @@ int kk_motor_bind_db_delete_ex(const char* panelDCode) ...@@ -216,8 +216,76 @@ int kk_motor_bind_db_delete_ex(const char* panelDCode)
return SUCCESS_RETURN; return SUCCESS_RETURN;
} }
int kk_motor_bind_db_find_byDeviceCode(const char* panelDCode,struct kk_motor_bind_info* info,int max)
{
int listSize = 0;
sqlite3_stmt *stmt;
char *sqlCmd = NULL;
const unsigned char *motorDeviceCode = NULL;
int motor_ep = 0;
int dummyId = -1;
struct kk_motor_bind_info* pInfo = info;
kk_motor_bind_ctx_t *ctx = _kk_motor_bind_get_ctx();
const char *searchCmd = "select * from PanelBindMotor where panelDCode = '%s';";
_kk_motor_bind_lock();
sqlCmd = sqlite3_mprintf(searchCmd,panelDCode);
INFO_PRINT("Table searchCmd:%s\n",sqlCmd);
sqlite3_prepare_v2(ctx->pDb, sqlCmd, strlen(sqlCmd), &stmt, NULL);
while(sqlite3_step(stmt) == SQLITE_ROW){
motorDeviceCode = sqlite3_column_text(stmt, MOTOR_BIND_DB_MOTOR_DEVICECODE);
motor_ep = sqlite3_column_int(stmt, MOTOR_BIND_DB_MOTOR_EP);
dummyId = sqlite3_column_int(stmt, MOTOR_BIND_DB_DUMMYID);
memcpy(pInfo->deviceCode,motorDeviceCode,strlen(motorDeviceCode));
pInfo->epNum = motor_ep;
pInfo->dummyId = dummyId;
INFO_PRINT("listSize=%d,motorDeviceCode=%s,motor_ep=%d,dummyId=%d\n",listSize,motorDeviceCode,motor_ep,dummyId);
if(++listSize>=max){
break;
}
pInfo++;
}
sqlite3_finalize(stmt);
_kk_motor_bind_unlock();
return listSize;
}
int kk_motor_bind_db_find_byMotorDeviceCode(const char* motorCode,struct kk_motor_bind_info* info,int max)
{
int listSize = 0;
sqlite3_stmt *stmt;
char *sqlCmd = NULL;
const unsigned char *panelDeviceCode = NULL;
int motor_ep = 0;
int dummyId = -1;
struct kk_motor_bind_info* pInfo = info;
kk_motor_bind_ctx_t *ctx = _kk_motor_bind_get_ctx();
const char *searchCmd = "select * from PanelBindMotor where motorDCode = '%s';";
_kk_motor_bind_lock();
sqlCmd = sqlite3_mprintf(searchCmd,motorCode);
INFO_PRINT("Table searchCmd:%s\n",sqlCmd);
sqlite3_prepare_v2(ctx->pDb, sqlCmd, strlen(sqlCmd), &stmt, NULL);
while(sqlite3_step(stmt) == SQLITE_ROW){
panelDeviceCode = sqlite3_column_text(stmt, MOTOR_BIND_DB_PANEL_DEVICECODE);
motor_ep = sqlite3_column_int(stmt, MOTOR_BIND_DB_MOTOR_EP);
dummyId = sqlite3_column_int(stmt, MOTOR_BIND_DB_DUMMYID);
memcpy(pInfo->deviceCode,panelDeviceCode,strlen(panelDeviceCode));
pInfo->epNum = motor_ep;
pInfo->dummyId = dummyId;
INFO_PRINT("listSize=%d,panelDeviceCode=%s,motor_ep=%d,dummyId=%d\n",listSize,panelDeviceCode,motor_ep,dummyId);
if(++listSize>=max){
break;
}
pInfo++;
}
sqlite3_finalize(stmt);
_kk_motor_bind_unlock();
return listSize;
}
int kk_motor_bind_db_find(const char* panelDCode,int panelEpNum,struct kk_motor_bind_info* info,int max) int kk_motor_bind_db_find(const char* panelDCode,int panelEpNum,struct kk_motor_bind_info* info,int max)
{ {
int listSize = 0; int listSize = 0;
...@@ -241,8 +309,7 @@ int kk_motor_bind_db_find(const char* panelDCode,int panelEpNum,struct kk_motor_ ...@@ -241,8 +309,7 @@ int kk_motor_bind_db_find(const char* panelDCode,int panelEpNum,struct kk_motor_
motorDeviceCode = sqlite3_column_text(stmt, MOTOR_BIND_DB_MOTOR_DEVICECODE); motorDeviceCode = sqlite3_column_text(stmt, MOTOR_BIND_DB_MOTOR_DEVICECODE);
motor_ep = sqlite3_column_int(stmt, MOTOR_BIND_DB_MOTOR_EP); motor_ep = sqlite3_column_int(stmt, MOTOR_BIND_DB_MOTOR_EP);
dummyId = sqlite3_column_int(stmt, MOTOR_BIND_DB_DUMMYID); dummyId = sqlite3_column_int(stmt, MOTOR_BIND_DB_DUMMYID);
memset((char*)pInfo,0,sizeof(*pInfo)); memcpy(pInfo->deviceCode,motorDeviceCode,strlen(motorDeviceCode));
snprintf(pInfo->deviceCode,sizeof(*pInfo),"%s",motorDeviceCode);
pInfo->epNum = motor_ep; pInfo->epNum = motor_ep;
pInfo->dummyId = dummyId; pInfo->dummyId = dummyId;
INFO_PRINT("listSize=%d,motorDeviceCode=%s,motor_ep=%d,dummyId=%d\n",listSize,motorDeviceCode,motor_ep,dummyId); INFO_PRINT("listSize=%d,motorDeviceCode=%s,motor_ep=%d,dummyId=%d\n",listSize,motorDeviceCode,motor_ep,dummyId);
...@@ -280,8 +347,7 @@ int kk_motor_bind_db_find_ex(int dummyId,struct kk_motor_bind_info* info,int max ...@@ -280,8 +347,7 @@ int kk_motor_bind_db_find_ex(int dummyId,struct kk_motor_bind_info* info,int max
while(sqlite3_step(stmt) == SQLITE_ROW){ while(sqlite3_step(stmt) == SQLITE_ROW){
motorDeviceCode = sqlite3_column_text(stmt, MOTOR_BIND_DB_MOTOR_DEVICECODE); motorDeviceCode = sqlite3_column_text(stmt, MOTOR_BIND_DB_MOTOR_DEVICECODE);
motor_ep = sqlite3_column_int(stmt, MOTOR_BIND_DB_MOTOR_EP); motor_ep = sqlite3_column_int(stmt, MOTOR_BIND_DB_MOTOR_EP);
memset((char*)pInfo,0,sizeof(*pInfo)); memcpy(pInfo->deviceCode,motorDeviceCode,strlen(motorDeviceCode));
snprintf(pInfo->deviceCode,sizeof(*pInfo),"%s",motorDeviceCode);
pInfo->epNum = motor_ep; pInfo->epNum = motor_ep;
INFO_PRINT("listSize=%d,motorDeviceCode=%s,motor_ep=%d\n",listSize,motorDeviceCode,motor_ep); INFO_PRINT("listSize=%d,motorDeviceCode=%s,motor_ep=%d\n",listSize,motorDeviceCode,motor_ep);
...@@ -332,7 +398,8 @@ int kk_motor_bind_db_delete_by_deviceCode(const char* deviceCode) ...@@ -332,7 +398,8 @@ int kk_motor_bind_db_delete_by_deviceCode(const char* deviceCode)
int rc = 0; int rc = 0;
char *zErrMsg = 0; char *zErrMsg = 0;
kk_motor_bind_ctx_t *ctx = _kk_motor_bind_get_ctx(); kk_motor_bind_ctx_t *ctx = _kk_motor_bind_get_ctx();
//printf("---------------------------->[%s][%d]\n",__FUNCTION__,__LINE__);
kk_service_delete_bind_2gw(deviceCode,1);
_kk_motor_bind_lock(); _kk_motor_bind_lock();
sqlCmd = sqlite3_mprintf(deleteCmd,deviceCode); sqlCmd = sqlite3_mprintf(deleteCmd,deviceCode);
...@@ -346,7 +413,8 @@ int kk_motor_bind_db_delete_by_deviceCode(const char* deviceCode) ...@@ -346,7 +413,8 @@ int kk_motor_bind_db_delete_by_deviceCode(const char* deviceCode)
} }
sqlite3_free(sqlCmd); sqlite3_free(sqlCmd);
_kk_motor_bind_unlock(); _kk_motor_bind_unlock();
//printf("---------------------------->[%s][%d]\n",__FUNCTION__,__LINE__);
kk_service_delete_bind_2gw(deviceCode,0);
kk_motor_bind_db_delete_ex(deviceCode); kk_motor_bind_db_delete_ex(deviceCode);
return SUCCESS_RETURN; return SUCCESS_RETURN;
......
...@@ -51,7 +51,7 @@ static int kk_service_get_reply(char *deviceCode,char *productCode,char *msgId,d ...@@ -51,7 +51,7 @@ static int kk_service_get_reply(char *deviceCode,char *productCode,char *msgId,d
cJSON_AddNumberToObject(paramInfo, "data", (double)param1); cJSON_AddNumberToObject(paramInfo, "data", (double)param1);
}else if(strcmp(type,"ChildLockState") == 0){ }else if(strcmp(type,"ChildLockState") == 0){
cJSON_AddNumberToObject(paramInfo, "ChildLockState", (int)param1); cJSON_AddNumberToObject(paramInfo, "ChildLockState", (int)param1);
}else if(strcmp(type,"PowerMemory") == 0){ }else if(strcmp(type,"PowerDownSave") == 0){
cJSON_AddNumberToObject(paramInfo, "PowerMemory", (int)param1); cJSON_AddNumberToObject(paramInfo, "PowerMemory", (int)param1);
cJSON_AddNumberToObject(paramInfo, "Mode", (int)1); cJSON_AddNumberToObject(paramInfo, "Mode", (int)1);
}else if(strcmp(type,"Screensaver") == 0){ }else if(strcmp(type,"Screensaver") == 0){
......
This diff is collapsed.
{ {
"productCode":"3005", "productCode":"3005",
"operateType":"1003", "operateType":"1006",
"channel":1, "channel":1,
"newccu":[ "newccu":[
{ {
......
{ {
"productCode":"3006", "productCode":"3006",
"operateType":"1003", "operateType":"1006",
"channel":2, "channel":2,
"newccu":[ "newccu":[
{ {
......
{ {
"productCode":"3012", "productCode":"3012",
"operateType":"1003", "operateType":"1006",
"channel":1, "channel":1,
"newccu":[ "newccu":[
{ {
......
{ {
"productCode":"3026", "productCode":"3026",
"operateType":"1003", "operateType":"1006",
"channel":1, "channel":1,
"newccu":[ "newccu":[
{ {
......
{ {
"productCode":"3027", "productCode":"3027",
"operateType":"1003", "operateType":"1006",
"channel":2, "channel":2,
"newccu":[ "newccu":[
{ {
......
...@@ -13,8 +13,8 @@ ...@@ -13,8 +13,8 @@
"valueRange":[0,1,2], "valueRange":[0,1,2],
"value": 2 "value": 2
},{ },{
"identifier":"motorPos", "identifier":"Position",
"opcodemap":"SWITCH", "opcodemap":"MOVE_TO_POS",
"dataType":"int", "dataType":"int",
"channel":"1", "channel":"1",
"valueRange":[], "valueRange":[],
...@@ -22,31 +22,31 @@ ...@@ -22,31 +22,31 @@
},{ },{
"identifier":"motorDir", "identifier":"motorDir",
"opcodemap":"SWITCH", "opcodemap":"SWITCH",
"dataType":"int", "dataType":"string",
"channel":"1", "channel":"1",
"valueRange":[], "valueRange":[],
"value": 0 "value": "0"
},{ },{
"identifier":"pullEnable", "identifier":"pullEnable",
"opcodemap":"SWITCH", "opcodemap":"SWITCH",
"dataType":"int", "dataType":"string",
"channel":"1", "channel":"1",
"valueRange":[], "valueRange":[],
"value": 0 "value": "0"
},{ },{
"identifier":"motorStatus", "identifier":"motorStatus",
"opcodemap":"SWITCH", "opcodemap":"SWITCH",
"dataType":"int", "dataType":"string",
"channel":"1", "channel":"1",
"valueRange":[], "valueRange":[],
"value": 0 "value": "0"
},{ },{
"identifier":"routeCfg", "identifier":"routeCfg",
"opcodemap":"SWITCH", "opcodemap":"SWITCH",
"dataType":"int", "dataType":"string",
"channel":"1", "channel":"1",
"valueRange":[], "valueRange":[],
"value": 0 "value": "0"
} }
], ],
"oldccu":[ "oldccu":[
...@@ -59,17 +59,17 @@ ...@@ -59,17 +59,17 @@
"syn":"switchStatus", "syn":"switchStatus",
"synType":"map" "synType":"map"
},{ },{
"opcode":"SWITCH", "opcode":"MOVE_TO_POS",
"identifiermap":"motorPos", "identifiermap":"Position",
"dataType":"int", "dataType":"string_int",
"channel":"1", "channel":"1",
"valueRange":[], "valueRange":[],
"syn":"motorPos", "syn":"motorPos",
"synType":"fit" "synType":"string"
},{ },{
"opcode":"SWITCH", "opcode":"SWITCH",
"identifiermap":"motorDir", "identifiermap":"motorDir",
"dataType":"int", "dataType":"string",
"channel":"1", "channel":"1",
"valueRange":[], "valueRange":[],
"syn":"motorDir", "syn":"motorDir",
...@@ -77,7 +77,7 @@ ...@@ -77,7 +77,7 @@
},{ },{
"opcode":"SWITCH", "opcode":"SWITCH",
"identifiermap":"pullEnable", "identifiermap":"pullEnable",
"dataType":"int", "dataType":"string",
"channel":"1", "channel":"1",
"valueRange":[], "valueRange":[],
"syn":"pullEnable", "syn":"pullEnable",
...@@ -85,7 +85,7 @@ ...@@ -85,7 +85,7 @@
},{ },{
"opcode":"SWITCH", "opcode":"SWITCH",
"identifiermap":"motorStatus", "identifiermap":"motorStatus",
"dataType":"int", "dataType":"string",
"channel":"1", "channel":"1",
"valueRange":[], "valueRange":[],
"syn":"motorStatus", "syn":"motorStatus",
...@@ -93,7 +93,7 @@ ...@@ -93,7 +93,7 @@
},{ },{
"opcode":"SWITCH", "opcode":"SWITCH",
"identifiermap":"routeCfg", "identifiermap":"routeCfg",
"dataType":"int", "dataType":"string",
"channel":"1", "channel":"1",
"valueRange":[], "valueRange":[],
"syn":"routeCfg", "syn":"routeCfg",
......
...@@ -2,6 +2,8 @@ ...@@ -2,6 +2,8 @@
"productCode":"3068", "productCode":"3068",
"operateType":"1003", "operateType":"1003",
"channel":1, "channel":1,
"syn_type":1,
"syn_opcode":"DOOYA_STATUS",
"newccu":[ "newccu":[
{ {
"identifier":"OperationMode", "identifier":"OperationMode",
...@@ -10,6 +12,41 @@ ...@@ -10,6 +12,41 @@
"channel":"1", "channel":"1",
"valueRange":[0,1,2], "valueRange":[0,1,2],
"value": 2 "value": 2
},{
"identifier":"Position",
"opcodemap":"MOVE_TO_POS",
"dataType":"int",
"channel":"1",
"valueRange":[],
"value": 0
},{
"identifier":"motorDir",
"opcodemap":"SWITCH",
"dataType":"string",
"channel":"1",
"valueRange":[],
"value": "0"
},{
"identifier":"pullEnable",
"opcodemap":"SWITCH",
"dataType":"string",
"channel":"1",
"valueRange":[],
"value": "0"
},{
"identifier":"motorStatus",
"opcodemap":"SWITCH",
"dataType":"string",
"channel":"1",
"valueRange":[],
"value": "0"
},{
"identifier":"routeCfg",
"opcodemap":"SWITCH",
"dataType":"string",
"channel":"1",
"valueRange":[],
"value": "0"
} }
], ],
"oldccu":[ "oldccu":[
...@@ -18,7 +55,49 @@ ...@@ -18,7 +55,49 @@
"identifiermap":"OperationMode", "identifiermap":"OperationMode",
"dataType":"map", "dataType":"map",
"channel":"1", "channel":"1",
"valueRange":["CLOSE","OPEN","STOP"] "valueRange":["CLOSE","OPEN","STOP"],
"syn":"switchStatus",
"synType":"map"
},{
"opcode":"MOVE_TO_POS",
"identifiermap":"Position",
"dataType":"string_int",
"channel":"1",
"valueRange":[],
"syn":"motorPos",
"synType":"string"
},{
"opcode":"SWITCH",
"identifiermap":"motorDir",
"dataType":"string",
"channel":"1",
"valueRange":[],
"syn":"motorDir",
"synType":"fit"
},{
"opcode":"SWITCH",
"identifiermap":"pullEnable",
"dataType":"string",
"channel":"1",
"valueRange":[],
"syn":"pullEnable",
"synType":"fit"
},{
"opcode":"SWITCH",
"identifiermap":"motorStatus",
"dataType":"string",
"channel":"1",
"valueRange":[],
"syn":"motorStatus",
"synType":"fit"
},{
"opcode":"SWITCH",
"identifiermap":"routeCfg",
"dataType":"string",
"channel":"1",
"valueRange":[],
"syn":"routeCfg",
"synType":"fit"
} }
] ]
......
{ {
"productCode":"3088", "productCode":"3088",
"operateType":"1003", "operateType":"1006",
"channel":1, "channel":1,
"newccu":[ "newccu":[
{ {
......
{ {
"productCode":"3089", "productCode":"3089",
"operateType":"1003", "operateType":"1006",
"channel":2, "channel":2,
"newccu":[ "newccu":[
{ {
......
{ {
"productCode":"3147", "productCode":"3147",
"operateType":"1003", "operateType":"1006",
"channel":1, "channel":1,
"newccu":[ "newccu":[
{ {
......
{ {
"productCode":"3148", "productCode":"3148",
"operateType":"1003", "operateType":"1006",
"channel":2, "channel":2,
"newccu":[ "newccu":[
{ {
......
{ {
"productCode":"3154", "productCode":"3154",
"operateType":"1003", "operateType":"1006",
"channel":1, "channel":1,
"newccu":[ "newccu":[
{ {
......
{ {
"productCode":"3155", "productCode":"3155",
"operateType":"1003", "operateType":"1006",
"channel":2, "channel":2,
"newccu":[ "newccu":[
{ {
......
...@@ -36,6 +36,49 @@ ...@@ -36,6 +36,49 @@
} }
}, },
"name": "亮度" "name": "亮度"
},
{
"identifier": "FadeTime",
"dataType": {
"type": "int",
"specs": {
"min": "10",
"max": "50",
"unit": "1/10s",
"unitName": "1/10秒",
"step": "10"
}
},
"name": "渐变时间"
},
{
"identifier": "LowBrightness",
"dataType": {
"type": "int",
"specs": {
"min": "10",
"max": "90",
"unit": "%",
"unitName": "百分比",
"step": "1"
}
},
"name": "最低亮度"
},
{
"identifier": "HighBrightness",
"dataType": {
"type": "int",
"specs": {
"min": "20",
"max": "100",
"unit": "%",
"unitName": "百分比",
"step": "1"
}
},
"name": "最高亮度"
} }
], ],
"method": "thing.service.property.set", "method": "thing.service.property.set",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment