Commit 6d145874 authored by 陈伟灿's avatar 陈伟灿

Merge branch 'cwc' into 'master'

【修改内容】1,增加场景对于LIGHT和CURTAIN设备类型的支持;2,增加CCU主机版本号定义;3,其他细节修改

See merge request chenweican/k-sdk!75
parents 524d27d1 965f71af
...@@ -50,6 +50,7 @@ static int mqtt_start(void) ...@@ -50,6 +50,7 @@ static int mqtt_start(void)
//INFO_PRINT("i am send now\n"); //INFO_PRINT("i am send now\n");
//KK_MQTT_SendMsg(TOPIC,"hello my world",2); //KK_MQTT_SendMsg(TOPIC,"hello my world",2);
} }
//INFO_PRINT(" %s \n",testStr);
} }
INFO_PRINT("MQTTAsync_destroy\n"); INFO_PRINT("MQTTAsync_destroy\n");
......
...@@ -264,6 +264,7 @@ int KK_MQTT_SendMsg(char *topicName,const char *payload) ...@@ -264,6 +264,7 @@ int KK_MQTT_SendMsg(char *topicName,const char *payload)
pubmsg.qos = QOS; pubmsg.qos = QOS;
pubmsg.retained = 0; pubmsg.retained = 0;
//cJSON_Minify(payload);
INFO_PRINT("mqtt send payload :%s.\n",payload); INFO_PRINT("mqtt send payload :%s.\n",payload);
if ((rc = MQTTAsync_sendMessage(s_Client, topicName, &pubmsg, &opts)) != MQTTASYNC_SUCCESS) if ((rc = MQTTAsync_sendMessage(s_Client, topicName, &pubmsg, &opts)) != MQTTASYNC_SUCCESS)
......
#ifndef _KK_CCU_VER_H_
#define _KK_CCU_VER_H_
#define KK_CCU_VERSION "1.1.0"
#endif
...@@ -27,7 +27,8 @@ typedef enum { ...@@ -27,7 +27,8 @@ typedef enum {
IPC_PLAT2MID, IPC_PLAT2MID,
IPC_UNDEF IPC_UNDEF
} ipc_type; } ipc_type;
#define MSG_COMMON_MSGID "msgId"
#define MSG_TYPE_STR "msgtype" #define MSG_TYPE_STR "msgtype"
#define MSG_PRODUCT_TYPE_STR "productType" #define MSG_PRODUCT_TYPE_STR "productType"
#define MSG_PRODUCT_CODE_STR "productCode" #define MSG_PRODUCT_CODE_STR "productCode"
......
This diff is collapsed.
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
#include <time.h> #include <time.h>
#include <signal.h> #include <signal.h>
#include "kk_product.h" #include "kk_product.h"
//#include "iot_import.h" #include "ccu_ver.h"
char g_product_type[PRODUCT_TYPE_LEN]={0}; char g_product_type[PRODUCT_TYPE_LEN]={0};
char g_product_code[PRODUCT_CODE_LEN]={0}; char g_product_code[PRODUCT_CODE_LEN]={0};
...@@ -295,10 +295,9 @@ int HAL_GetDevice_Code(_OU_ char *device_code) ...@@ -295,10 +295,9 @@ int HAL_GetDevice_Code(_OU_ char *device_code)
} }
int HAL_GetVersion(_OU_ char *version) int HAL_GetVersion(_OU_ char *version)
{ {
char *ver = "test-1.0.0"; int len = strlen(KK_CCU_VERSION);
int len = strlen(ver);
memset(version, 0x0, VERSION_MAXLEN); memset(version, 0x0, VERSION_MAXLEN);
strncpy(version, ver, len); strncpy(version, KK_CCU_VERSION, len);
version[len] = '\0'; version[len] = '\0';
return strlen(version); return strlen(version);
} }
......
...@@ -738,7 +738,7 @@ int dm_msg_thing_property_set_reply(char deviceCode[DEVICE_CODE_MAXLEN],char *pa ...@@ -738,7 +738,7 @@ int dm_msg_thing_property_set_reply(char deviceCode[DEVICE_CODE_MAXLEN],char *pa
dm_msg_response(&request, &response, "{}", strlen("{}"), NULL); dm_msg_response(&request, &response, "{}", strlen("{}"), NULL);
return SUCCESS_RETURN; return SUCCESS_RETURN;
} }
int dm_msg_thing_event_post(const char *deviceCode, const char *identifier) int dm_msg_thing_event_post(const char *deviceCode, const char *identifier,const char *msgId)
{ {
int res = 0; int res = 0;
int nums = 0; int nums = 0;
...@@ -774,7 +774,13 @@ int dm_msg_thing_event_post(const char *deviceCode, const char *identifier) ...@@ -774,7 +774,13 @@ int dm_msg_thing_event_post(const char *deviceCode, const char *identifier)
ERROR_PRINT("dm_msg_thing_event_post failed\n"); ERROR_PRINT("dm_msg_thing_event_post failed\n");
return FAIL_RETURN; return FAIL_RETURN;
} }
dm_mgr_upstream_thing_event_post(node->devid, identifier, strlen(identifier), method, payload, strlen(payload)); if(msgId != NULL){
dm_mgr_upstream_thing_event_post_ex(node->devid, identifier, strlen(identifier), method, payload, strlen(payload),msgId);
}else
{
dm_mgr_upstream_thing_event_post(node->devid, identifier, strlen(identifier), method, payload, strlen(payload));
}
free(method); free(method);
method = NULL; method = NULL;
free(payload); free(payload);
......
This diff is collapsed.
...@@ -573,76 +573,91 @@ int kk_subDev_set_action_by_productType(const char *productType,const char *scen ...@@ -573,76 +573,91 @@ int kk_subDev_set_action_by_productType(const char *productType,const char *scen
int idx = 0; int idx = 0;
int gw_support_scene = 0; int gw_support_scene = 0;
kk_tsl_data_t *property = NULL; kk_tsl_data_t *property = NULL;
int k = 0,count = 0;
char typeArray[10][32] = {0};
if(productType == NULL){ if(productType == NULL){
ERROR_PRINT("ERROR [%s][%d]\n",__FUNCTION__,__LINE__); ERROR_PRINT("ERROR [%s][%d]\n",__FUNCTION__,__LINE__);
return INVALID_PARAMETER; return INVALID_PARAMETER;
} }
INFO_PRINT("kk_subDev_set_action_by_productType called!!!\n");
sqlCmd = sqlite3_mprintf(searchCmd,productType); //switch jsut for test if(!strcmp(productType,"CURTAIN")){
sqlite3_prepare_v2(ctx->pDb, sqlCmd, strlen(sqlCmd), &stmt, NULL); memcpy(typeArray[0],"curtain",strlen("curtain"));
//INFO_PRINT("total_column = %d\n", sqlite3_column_count(stmt)); count = 1;
while(sqlite3_step(stmt) == SQLITE_ROW){ }
pDeviceCode = sqlite3_column_text(stmt, DB_DEVICECODE); else if(!strcmp(productType,"LIGHT")){
res = dm_mgr_get_device_by_devicecode(pDeviceCode,&node); memcpy(typeArray[0],"switch",strlen("switch"));
if (res != SUCCESS_RETURN) { memcpy(typeArray[1],"light",strlen("light"));
continue; count = 2;
} }
if(kk_subDev_check_scene_support(node->fatherDeviceCode) == 1){ else{
gw_support_scene = 1; INFO_PRINT("kk_subDev_set_action_by_productType wrong type!!!\n");
} }
else{ for(k = 0; k < count; k++){
gw_support_scene = 0; sqlCmd = sqlite3_mprintf(searchCmd,typeArray[k]); //curtain type
} sqlite3_prepare_v2(ctx->pDb, sqlCmd, strlen(sqlCmd), &stmt, NULL);
if(!strcmp(productType,"switch")){ //INFO_PRINT("total_column = %d\n", sqlite3_column_count(stmt));
while(sqlite3_step(stmt) == SQLITE_ROW){
for(idx = 0; idx < node->dev_shadow->property_number; idx++){ pDeviceCode = sqlite3_column_text(stmt, DB_DEVICECODE);
property = (kk_tsl_data_t *)(node->dev_shadow->properties + idx); res = dm_mgr_get_device_by_devicecode(pDeviceCode,&node);
if(property == NULL){ if (res != SUCCESS_RETURN) {
continue; continue;
} }
if(strstr(property->identifier,"PowerSwitch") != NULL){ if(kk_subDev_check_scene_support(node->fatherDeviceCode) == 1){
if(gw_support_scene){ gw_support_scene = 1;
kk_scene_action_detail_t info = {0}; }
memcpy(info.deviceCode,node->deviceCode,strlen(node->deviceCode)); else{
memcpy(info.propertyName,property->identifier,strlen(property->identifier)); gw_support_scene = 0;
memcpy(info.propertyValue,propertyValue,strlen(propertyValue)); }
info.epNum = 1; if(!strcmp(typeArray[k],"switch")){
info.delay = 0; for(idx = 0; idx < node->dev_shadow->property_number; idx++){
kk_scene_action_add(node->fatherDeviceCode,sceneId,info); property = (kk_tsl_data_t *)(node->dev_shadow->properties + idx);
if(property == NULL){
continue;
}
if(strstr(property->identifier,"PowerSwitch") != NULL){
if(gw_support_scene){
kk_scene_action_detail_t info = {0};
memcpy(info.deviceCode,node->deviceCode,strlen(node->deviceCode));
memcpy(info.propertyName,property->identifier,strlen(property->identifier));
memcpy(info.propertyValue,propertyValue,strlen(propertyValue));
info.epNum = 1;
info.delay = 0;
kk_scene_action_add(node->fatherDeviceCode,sceneId,info);
}
res = kk_scene_insert_scene_action(type,node->deviceCode,1,
property->identifier,propertyValue,0,sceneId,node->fatherDeviceCode);
if(res != SUCCESS_RETURN){
INFO_PRINT("kk_subDev_set_action_by_productType fail!!!\n");
//return res;
continue;
}
} }
res = kk_scene_insert_scene_action(type,node->deviceCode,1,
property->identifier,propertyValue,0,sceneId,node->fatherDeviceCode);
if(res != SUCCESS_RETURN){
INFO_PRINT("kk_subDev_set_action_by_productType fail!!!\n");
//return res;
continue;
}
} }
}
}
else{
if(gw_support_scene){
kk_scene_action_detail_t info = {0};
memcpy(info.deviceCode,node->deviceCode,strlen(node->deviceCode));
memcpy(info.propertyName,propertyName,strlen(propertyName));
memcpy(info.propertyValue,propertyValue,strlen(propertyValue));
info.epNum = 1;
info.delay = 0;
kk_scene_action_add(node->fatherDeviceCode,sceneId,info);
} }
res = kk_scene_insert_scene_action(type,node->deviceCode,1, else{
propertyName,propertyValue,0,sceneId,node->fatherDeviceCode); if(gw_support_scene){
if(res != SUCCESS_RETURN){ kk_scene_action_detail_t info = {0};
INFO_PRINT("kk_subDev_set_action_by_productType fail!!!\n"); memcpy(info.deviceCode,node->deviceCode,strlen(node->deviceCode));
//return res; memcpy(info.propertyName,propertyName,strlen(propertyName));
continue; memcpy(info.propertyValue,propertyValue,strlen(propertyValue));
} info.epNum = 1;
} info.delay = 0;
} kk_scene_action_add(node->fatherDeviceCode,sceneId,info);
sqlite3_finalize(stmt); }
sqlite3_free(sqlCmd); res = kk_scene_insert_scene_action(type,node->deviceCode,1,
propertyName,propertyValue,0,sceneId,node->fatherDeviceCode);
if(res != SUCCESS_RETURN){
INFO_PRINT("kk_subDev_set_action_by_productType fail!!!\n");
//return res;
continue;
}
}
}
sqlite3_finalize(stmt);
sqlite3_free(sqlCmd);
}
return SUCCESS_RETURN; return SUCCESS_RETURN;
} }
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
全局变量定义 全局变量定义
*************************************************************/ *************************************************************/
extern sqlite3 *g_kk_pDb; extern sqlite3 *g_kk_pDb;
#define KK_HISTORY_MAX_COUNT 200 #define KK_HISTORY_MAX_COUNT 100
/************************************************************* /*************************************************************
函数实现 函数实现
*************************************************************/ *************************************************************/
...@@ -138,6 +138,36 @@ int kk_history_delete_by_recordtime(const char *table,time_t time) ...@@ -138,6 +138,36 @@ int kk_history_delete_by_recordtime(const char *table,time_t time)
return SUCCESS_RETURN; return SUCCESS_RETURN;
} }
/*查找数据个数*/
int sqlite_find_count(void)
{
kk_history_ctx_t *ctx = _kk_history_get_ctx();
char *sql = "select count(recordtime) from SensorHistoryInfo;";
sqlite3_stmt *stmt = NULL;
/*将sql语句转换为sqlite3可识别的语句,返回指针到stmt*/
int res = sqlite3_prepare_v2(ctx->pDb, sql, strlen(sql), &stmt, NULL);
if (SQLITE_OK != res || NULL == stmt) {
goto err1;
}
/*执行准备好的sqlite3语句*/
res = sqlite3_step(stmt);
if (res != SQLITE_ROW) {
goto err2;
}
int count = sqlite3_column_int(stmt, 0);
if (count < 0) {
goto err2;
}
INFO_PRINT("count = %d\n", count);
sqlite3_finalize(stmt);
return count;
err2:
sqlite3_finalize(stmt);
err1:
return -1;
}
/************************************************************ /************************************************************
*功能描述: 插入传感器警告类信息到数据库 *功能描述: 插入传感器警告类信息到数据库
*输入参数: deviceCode:设备deviceCode *输入参数: deviceCode:设备deviceCode
...@@ -156,6 +186,7 @@ int kk_history_insert_sensor_info(const char* deviceCode,const char* identifier, ...@@ -156,6 +186,7 @@ int kk_history_insert_sensor_info(const char* deviceCode,const char* identifier,
char *zErrMsg = 0; char *zErrMsg = 0;
sqlite3_stmt *stmt; sqlite3_stmt *stmt;
time_t rtime = 0; time_t rtime = 0;
int count = 0;
const char *insertCmd = "insert into SensorHistoryInfo (deviceCode, identifier,value,recordtime) \ const char *insertCmd = "insert into SensorHistoryInfo (deviceCode, identifier,value,recordtime) \
values ('%s','%s','%s','%d');"; values ('%s','%s','%s','%d');";
...@@ -172,18 +203,21 @@ int kk_history_insert_sensor_info(const char* deviceCode,const char* identifier, ...@@ -172,18 +203,21 @@ int kk_history_insert_sensor_info(const char* deviceCode,const char* identifier,
return FAIL_RETURN; return FAIL_RETURN;
} }
sqlite3_free(sqlCmd); sqlite3_free(sqlCmd);
count = sqlite_find_count();
/*按时间删除超过最大数量的记录*/
const char *selectCmd = "select * from SensorHistoryInfo order by recordtime desc limit (select count(recordtime) from SensorHistoryInfo) offset %d";
sqlCmd = sqlite3_mprintf(selectCmd,KK_HISTORY_MAX_COUNT);
sqlite3_prepare_v2(ctx->pDb, sqlCmd, strlen(sqlCmd), &stmt, NULL);
while(sqlite3_step(stmt) == SQLITE_ROW){
rtime = sqlite3_column_int(stmt, DB_SENSOR_RECORDTIME);
kk_history_delete_by_recordtime("SensorHistoryInfo",rtime);
}
sqlite3_finalize(stmt);
sqlite3_free(sqlCmd);
if(count > KK_HISTORY_MAX_COUNT)
{
/*按时间删除超过最大数量的记录*/
const char *selectCmd = "select * from SensorHistoryInfo order by recordtime desc";
sqlite3_prepare_v2(ctx->pDb, selectCmd, strlen(selectCmd), &stmt, NULL);
while(sqlite3_step(stmt) == SQLITE_ROW){
rtime = sqlite3_column_int(stmt, DB_SENSOR_RECORDTIME);
kk_history_delete_by_recordtime("SensorHistoryInfo",rtime);
INFO_PRINT("delete rtime:%d\n",rtime);
break;
}
sqlite3_finalize(stmt);
}
_kk_history_unlock(); _kk_history_unlock();
return SUCCESS_RETURN; return SUCCESS_RETURN;
} }
...@@ -208,6 +242,7 @@ int kk_history_insert_Outlet_info(const char* deviceCode,const char* power,const ...@@ -208,6 +242,7 @@ int kk_history_insert_Outlet_info(const char* deviceCode,const char* power,const
char *zErrMsg = 0; char *zErrMsg = 0;
sqlite3_stmt *stmt; sqlite3_stmt *stmt;
time_t rtime = 0; time_t rtime = 0;
int count = 0;
const char *insertCmd = "insert into OutletHistoryInfo (deviceCode, power,metering,recordtime) \ const char *insertCmd = "insert into OutletHistoryInfo (deviceCode, power,metering,recordtime) \
values ('%s','%s','%s','%d');"; values ('%s','%s','%s','%d');";
...@@ -224,18 +259,19 @@ int kk_history_insert_Outlet_info(const char* deviceCode,const char* power,const ...@@ -224,18 +259,19 @@ int kk_history_insert_Outlet_info(const char* deviceCode,const char* power,const
return FAIL_RETURN; return FAIL_RETURN;
} }
sqlite3_free(sqlCmd); sqlite3_free(sqlCmd);
count = sqlite_find_count();
/*按时间删除超过最大数量的记录*/ if(count > KK_HISTORY_MAX_COUNT){
const char *selectCmd = "select * from OutletHistoryInfo order by recordtime desc limit (select count(recordtime) from OutletHistoryInfo) offset %d"; /*按时间删除超过最大数量的记录*/
sqlCmd = sqlite3_mprintf(selectCmd,KK_HISTORY_MAX_COUNT); //const char *selectCmd = "select * from OutletHistoryInfo order by recordtime desc limit (select count(recordtime) from OutletHistoryInfo) offset %d";
sqlite3_prepare_v2(ctx->pDb, sqlCmd, strlen(sqlCmd), &stmt, NULL); const char *selectCmd = "select * from OutletHistoryInfo order by recordtime desc";
while(sqlite3_step(stmt) == SQLITE_ROW){ sqlite3_prepare_v2(ctx->pDb, selectCmd, strlen(selectCmd), &stmt, NULL);
rtime = sqlite3_column_int(stmt, DB_OUTLET_RECORDTIME); while(sqlite3_step(stmt) == SQLITE_ROW){
kk_history_delete_by_recordtime("OutletHistoryInfo",rtime); rtime = sqlite3_column_int(stmt, DB_OUTLET_RECORDTIME);
} kk_history_delete_by_recordtime("OutletHistoryInfo",rtime);
sqlite3_finalize(stmt); break;
sqlite3_free(sqlCmd); }
sqlite3_finalize(stmt);
}
_kk_history_unlock(); _kk_history_unlock();
return SUCCESS_RETURN; return SUCCESS_RETURN;
} }
......
...@@ -428,7 +428,6 @@ void kk_platMsg_handle(void* data, char* chalMark){ ...@@ -428,7 +428,6 @@ void kk_platMsg_handle(void* data, char* chalMark){
ERROR_PRINT("info or payload params error\n"); ERROR_PRINT("info or payload params error\n");
goto error; goto error;
} }
msgType = cJSON_GetObjectItem(info, MSG_TYPE_STR); msgType = cJSON_GetObjectItem(info, MSG_TYPE_STR);
info_dcode = cJSON_GetObjectItem(info, MSG_DEVICE_CODE_STR); info_dcode = cJSON_GetObjectItem(info, MSG_DEVICE_CODE_STR);
if (msgType == NULL || info_dcode == NULL){ if (msgType == NULL || info_dcode == NULL){
...@@ -489,7 +488,10 @@ void kk_platMsg_handle(void* data, char* chalMark){ ...@@ -489,7 +488,10 @@ void kk_platMsg_handle(void* data, char* chalMark){
if(jsonPay == NULL) goto error; if(jsonPay == NULL) goto error;
char* outstr = cJSON_Print(payload); char* outstr = cJSON_Print(payload);
dm_mgr_dev_node_t *search_node = NULL; dm_mgr_dev_node_t *search_node = NULL;
dm_mgr_get_device_by_devicecode(info_dcode->valuestring,&search_node); res = dm_mgr_get_device_by_devicecode(info_dcode->valuestring,&search_node);
if (res < SUCCESS_RETURN) {
goto error;
}
if(search_node->isOffline){ if(search_node->isOffline){
/*如果是离线状态,上报在线给云端*/ /*如果是离线状态,上报在线给云端*/
dm_mgr_set_dev_onoffline(search_node,0); dm_mgr_set_dev_onoffline(search_node,0);
...@@ -606,7 +608,7 @@ void kk_platMsg_handle(void* data, char* chalMark){ ...@@ -606,7 +608,7 @@ void kk_platMsg_handle(void* data, char* chalMark){
kk_history_insert_sensor_info(info_dcode->valuestring,eventItem->identifier,valueBuf,HAL_GetTime()); kk_history_insert_sensor_info(info_dcode->valuestring,eventItem->identifier,valueBuf,HAL_GetTime());
} }
INFO_PRINT("kk_platMsg_handle data: event post\n"); INFO_PRINT("kk_platMsg_handle data: event post\n");
dm_msg_thing_event_post(info_dcode->valuestring,eventItem->identifier); dm_msg_thing_event_post(info_dcode->valuestring,eventItem->identifier,NULL);
kk_scene_iftt_check(info_dcode->valuestring,jsonPay); kk_scene_iftt_check(info_dcode->valuestring,jsonPay);
} }
...@@ -622,7 +624,7 @@ void kk_platMsg_handle(void* data, char* chalMark){ ...@@ -622,7 +624,7 @@ void kk_platMsg_handle(void* data, char* chalMark){
kk_history_insert_sensor_info(info_dcode->valuestring,eventItem->identifier,"",HAL_GetTime()); kk_history_insert_sensor_info(info_dcode->valuestring,eventItem->identifier,"",HAL_GetTime());
} }
//kk_tsl_set_value(kk_tsl_set_event_output_value,dev_shadow,eventItem->identifier,&itemStr->valueint,NULL); //kk_tsl_set_value(kk_tsl_set_event_output_value,dev_shadow,eventItem->identifier,&itemStr->valueint,NULL);
dm_msg_thing_event_post(info_dcode->valuestring,eventItem->identifier); dm_msg_thing_event_post(info_dcode->valuestring,eventItem->identifier,NULL);
} }
} }
......
...@@ -662,18 +662,50 @@ static int kk_scene_parse_repeatday(cJSON *repeatday) ...@@ -662,18 +662,50 @@ static int kk_scene_parse_repeatday(cJSON *repeatday)
if(repeatday == NULL){ if(repeatday == NULL){
return INVALID_PARAMETER; return INVALID_PARAMETER;
} }
int array_size = cJSON_GetArraySize (repeatday); if(repeatday->type == cJSON_Array){
INFO_PRINT("array_size:%d\n",array_size); int array_size = cJSON_GetArraySize (repeatday);
if(array_size == 0){ INFO_PRINT("array_size:%d\n",array_size);
weekflag = 0; if(array_size == 0){
}else{ weekflag = 0;
for(iCnt = 0; iCnt < array_size; iCnt++){ }else{
cJSON * pSub = cJSON_GetArrayItem(repeatday, iCnt); for(iCnt = 0; iCnt < array_size; iCnt++){
if(pSub != NULL){ cJSON * pSub = cJSON_GetArrayItem(repeatday, iCnt);
weekflag = weekflag|(1<<(pSub->valueint-1)); if(pSub != NULL){
weekflag = weekflag|(1<<(pSub->valueint-1));
}
} }
} }
} }
else if(repeatday->type == cJSON_String){
if(strlen(repeatday->valuestring) == 0){
weekflag = 0;
}
else{
if(strstr(repeatday->valuestring,",") == NULL){
weekflag = 1<<(atoi(repeatday->valuestring)-1);
}
else{
char *tmp = repeatday->valuestring;
char *ptmp = NULL;
char weekStr[4] = {0};
while(1){
memset(weekStr,0x0,sizeof(weekStr));
ptmp = strstr(tmp,",");
if(ptmp != NULL){
strncpy(weekStr,tmp,ptmp-tmp);
weekflag = weekflag|(1<<(atoi(weekStr)-1));
}
else{
strncpy(weekStr,tmp,1);
weekflag = weekflag|(1<<(atoi(weekStr)-1));
break;
}
tmp = ptmp + 1;
}
}
}
}
INFO_PRINT("kk_scene_parse_repeatday weekflag:%d!!!\n",weekflag); INFO_PRINT("kk_scene_parse_repeatday weekflag:%d!!!\n",weekflag);
return weekflag; return weekflag;
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
"cluster":"0x0500", "cluster":"0x0500",
"attribute":"0x0002", "attribute":"0x0002",
"iasStatusMask":"0x0001", "iasStatusMask":"0x0001",
"reportFunc":"kk_tsl_report_iasZoneStatus", "reportFunc":"",
"controlFunc":"" "controlFunc":""
},{ },{
"identity":"Battery", "identity":"Battery",
...@@ -17,14 +17,6 @@ ...@@ -17,14 +17,6 @@
"iasStatusMask":"0x0008", "iasStatusMask":"0x0008",
"reportFunc":"kk_tsl_report_battery", "reportFunc":"kk_tsl_report_battery",
"controlFunc":"" "controlFunc":""
},{
"identity":"motionAlarm",
"endpoint":1,
"cluster":"0x0500",
"attribute":"0x0002",
"iasStatusMask":"0x0001",
"reportFunc":"",
"controlFunc":""
},{ },{
"identity":"BatteryAlarm", "identity":"BatteryAlarm",
"endpoint":1, "endpoint":1,
......
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