Commit c53ed887 authored by chen.weican's avatar chen.weican

【修改内容】1,更新物模型;2,修改局域网协议场景过滤;3,彩灯接入

【提交人】陈伟灿
parent 02a01c2b
...@@ -21,6 +21,7 @@ typedef enum { ...@@ -21,6 +21,7 @@ typedef enum {
} kk_kcloud_error_code_t; } kk_kcloud_error_code_t;
#define KK_DEVICESECRET_PATH "/data/kk/kk_deviceSecret.txt" #define KK_DEVICESECRET_PATH "/data/kk/kk_deviceSecret.txt"
#define KK_TOKEN_PATH "/data/kk/kk_token.txt" #define KK_TOKEN_PATH "/data/kk/kk_token.txt"
#define HOST_NAME "dev.nj-ikonke.site"
#endif #endif
...@@ -198,6 +198,7 @@ char * g_filerToCloudTable[] = ...@@ -198,6 +198,7 @@ char * g_filerToCloudTable[] =
(char *){"/thing/service/historyAlarm_reply"}, (char *){"/thing/service/historyAlarm_reply"},
(char *){"/thing/service/delAlarm_reply"}, (char *){"/thing/service/delAlarm_reply"},
(char *){"/thing/service/syncinfo_reply"}, (char *){"/thing/service/syncinfo_reply"},
(char *){"/thing/service/syncinfopush_reply"},
}; };
/************************************************************ /************************************************************
*功能描述:过滤不需要下发给网关的消息 *功能描述:过滤不需要下发给网关的消息
......
...@@ -17,6 +17,13 @@ ...@@ -17,6 +17,13 @@
#include "kk_product.h" #include "kk_product.h"
#include "kcloud_config.h" #include "kcloud_config.h"
#include "infra_sha256.h" #include "infra_sha256.h"
#include <string.h>
#include <stdlib.h>
#include <netdb.h>
#include <arpa/inet.h>
#include <netinet/tcp.h>
#include <sys/stat.h>
#include <sys/socket.h>
#include "kk_log.h" #include "kk_log.h"
#define BUFSIZE 1024 #define BUFSIZE 1024
#define PRODUCTSECRET "123456" #define PRODUCTSECRET "123456"
...@@ -273,6 +280,7 @@ static char * kk_create_get_jwt_info() ...@@ -273,6 +280,7 @@ static char * kk_create_get_jwt_info()
INFO_PRINT("--------------------->kk_create_get_jwt_info:%s\n",out); INFO_PRINT("--------------------->kk_create_get_jwt_info:%s\n",out);
return out; return out;
} }
char s_ServerIp[16] = {0};
static int kk_send_register_info(int sockfd,const char * path,int type) static int kk_send_register_info(int sockfd,const char * path,int type)
{ {
char str1[1024], str2[1024],str[16] = {0}; char str1[1024], str2[1024],str[16] = {0};
...@@ -292,7 +300,7 @@ static int kk_send_register_info(int sockfd,const char * path,int type) ...@@ -292,7 +300,7 @@ static int kk_send_register_info(int sockfd,const char * path,int type)
sprintf(tmp, "POST %s HTTP/1.1\n", path); sprintf(tmp, "POST %s HTTP/1.1\n", path);
strcat(str1, tmp); strcat(str1, tmp);
memset(tmp, 0, sizeof(tmp)); memset(tmp, 0, sizeof(tmp));
sprintf(tmp, "Host: %s:%d\n",IPSTR, PORT); sprintf(tmp, "Host: %s:%d\n",s_ServerIp, PORT);
strcat(str1, tmp); strcat(str1, tmp);
strcat(str1, "Content-Type: application/json\n"); strcat(str1, "Content-Type: application/json\n");
strcat(str1, "Content-Length: "); strcat(str1, "Content-Length: ");
...@@ -304,6 +312,7 @@ static int kk_send_register_info(int sockfd,const char * path,int type) ...@@ -304,6 +312,7 @@ static int kk_send_register_info(int sockfd,const char * path,int type)
INFO_PRINT("%s\n",str1); INFO_PRINT("%s\n",str1);
return write(sockfd,str1,strlen(str1)); return write(sockfd,str1,strlen(str1));
} }
int kk_start_ccu_register(void) int kk_start_ccu_register(void)
{ {
int sockfd, ret, i, h; int sockfd, ret, i, h;
...@@ -319,7 +328,15 @@ int kk_start_ccu_register(void) ...@@ -319,7 +328,15 @@ int kk_start_ccu_register(void)
bzero(&servaddr, sizeof(servaddr)); bzero(&servaddr, sizeof(servaddr));
servaddr.sin_family = AF_INET; servaddr.sin_family = AF_INET;
servaddr.sin_port = htons(PORT); servaddr.sin_port = htons(PORT);
if (inet_pton(AF_INET, IPSTR, &servaddr.sin_addr) <= 0 ){ struct hostent *host = gethostbyname(HOST_NAME);
if(NULL == host)
{
INFO_PRINT("gethostbyname h_errno\n");
return -1;
}
memcpy(s_ServerIp,inet_ntoa(*(struct in_addr*)(host->h_addr_list[0])),strlen(inet_ntoa(*(struct in_addr*)(host->h_addr_list[0]))));
INFO_PRINT("---------------------------->s_ServerIp:%s\n",s_ServerIp);
if (inet_pton(AF_INET, s_ServerIp, &servaddr.sin_addr) <= 0 ){
INFO_PRINT("--inet_pton error!\n"); INFO_PRINT("--inet_pton error!\n");
close(sockfd); close(sockfd);
return -1; return -1;
......
...@@ -208,9 +208,11 @@ void KK_Get_MqttClient(MQTTAsync *pClient) ...@@ -208,9 +208,11 @@ void KK_Get_MqttClient(MQTTAsync *pClient)
} }
} }
extern char g_clientId[64]; extern char g_clientId[64];
extern char s_ServerIp[16];
MQTTAsync KK_MQTT_Connect(void) MQTTAsync KK_MQTT_Connect(void)
{ {
int rc = 0; int rc = 0;
int temp_address[128] = {0};
FILE *fp; FILE *fp;
MQTTAsync_createOptions opts = MQTTAsync_createOptions_initializer; MQTTAsync_createOptions opts = MQTTAsync_createOptions_initializer;
MQTTAsync_connectOptions conn_opts = MQTTAsync_connectOptions_initializer; MQTTAsync_connectOptions conn_opts = MQTTAsync_connectOptions_initializer;
...@@ -228,9 +230,11 @@ MQTTAsync KK_MQTT_Connect(void) ...@@ -228,9 +230,11 @@ MQTTAsync KK_MQTT_Connect(void)
char ccuid[32] = {0}; char ccuid[32] = {0};
KK_Get_ccuid(ccuid); KK_Get_ccuid(ccuid);
sprintf(usrname, "%s.%s", ccuid,KK_CCU_PRODUCTID); sprintf(usrname, "%s.%s", ccuid,KK_CCU_PRODUCTID);
printf("cliendid:%s,usrname:%s\n",g_clientId,usrname); INFO_PRINT("cliendid:%s,usrname:%s\n",g_clientId,usrname);
printf("------------>token:%s\n",token); INFO_PRINT("------------>token:%s\n",token);
if ((rc = MQTTAsync_createWithOptions(&s_Client, ADDRESS, g_clientId, MQTTCLIENT_PERSISTENCE_NONE, NULL,&opts)) != MQTTASYNC_SUCCESS) sprintf(temp_address,"tcp://%s:1983",s_ServerIp);
INFO_PRINT("------------>temp_address:%s\n",temp_address);
if ((rc = MQTTAsync_createWithOptions(&s_Client, temp_address, g_clientId, MQTTCLIENT_PERSISTENCE_NONE, NULL,&opts)) != MQTTASYNC_SUCCESS)
{ {
ERROR_PRINT("Failed to create client object, return code %d\n", rc); ERROR_PRINT("Failed to create client object, return code %d\n", rc);
return NULL; return NULL;
......
...@@ -410,8 +410,6 @@ static int kk_parse_syncinfo(cJSON *payload) ...@@ -410,8 +410,6 @@ static int kk_parse_syncinfo(cJSON *payload)
cJSON *valuejson; cJSON *valuejson;
int value; int value;
printf("[%s][%d]\n",__FUNCTION__,__LINE__);
kk_map_dev_deinit(); kk_map_dev_deinit();
...@@ -539,17 +537,21 @@ static alarmcontext_map_s alarmContext[] = { ...@@ -539,17 +537,21 @@ static alarmcontext_map_s alarmContext[] = {
{"3049","检测到有人 告警时间戳"}, {"3049","检测到有人 告警时间戳"},
{"3054","SOS 按钮触发报警 告警时间戳"}, {"3054","SOS 按钮触发报警 告警时间戳"},
{"3083","检测到浓雾 告警时间戳"}, {"3083","检测到浓雾 告警时间戳"},
{"3082","检测到燃气 告警时间戳"},
{"3051","检测到有开关门 告警时间戳"}, {"3051","检测到有开关门 告警时间戳"},
{"3055","检测到有水浸入 告警时间戳"},
}; };
static alarmcontext_map_s lowbatteryContext[] = { static alarmcontext_map_s lowbatteryContext[] = {
{"3049","人体感应设备电量低 告警时间戳"}, {"3049","人体感应设备电量低 告警时间戳"},
{"3054","SOS按钮电量低 告警时间戳"}, {"3054","SOS按钮电量低 告警时间戳"},
{"3083","烟感电量低 告警时间戳"}, {"3083","烟感电量低 告警时间戳"},
{"3082","气感电量低 告警时间戳"},
{"3051","门磁电量低 告警时间戳"}, {"3051","门磁电量低 告警时间戳"},
{"3055","水浸电量低 告警时间戳"},
}; };
static alarmcontext_map_s DismantleStateContext[] = { static alarmcontext_map_s DismantleStateContext[] = {
{"3083","烟感被拆除 告警时间戳"}, {"3083","烟感被拆除 告警时间戳"},
{"3082","气感被拆除 告警时间戳"},
}; };
int kk_get_alarmcontext_type_table_size(void) int kk_get_alarmcontext_type_table_size(void)
{ {
......
...@@ -147,7 +147,7 @@ cJSON *kk_scene_build(SYN_SCENE_ITEM **content) ...@@ -147,7 +147,7 @@ cJSON *kk_scene_build(SYN_SCENE_ITEM **content)
cJSON_AddStringToObject(scene, "pannel_id",(ptr->pannel_id==NULL)?"*":ptr->pannel_id); cJSON_AddStringToObject(scene, "pannel_id",(ptr->pannel_id==NULL)?"*":ptr->pannel_id);
cJSON_AddStringToObject(scene, "room_id",ptr->room_id); cJSON_AddStringToObject(scene, "room_id",ptr->room_id);
cJSON_AddStringToObject(scene, "scene_image",""); cJSON_AddStringToObject(scene, "scene_image","");
cJSON_AddStringToObject(scene, "scene_type","100"); cJSON_AddStringToObject(scene, "scene_type",ptr->scenetype);
if(ptr->time==NULL){ if(ptr->time==NULL){
cJSON_AddStringToObject(scene, "timer_enable","0"); cJSON_AddStringToObject(scene, "timer_enable","0");
...@@ -256,8 +256,26 @@ static int kk_sync_scene_condition(cJSON *condition,SYN_SCENE_ITEM **build) ...@@ -256,8 +256,26 @@ static int kk_sync_scene_condition(cJSON *condition,SYN_SCENE_ITEM **build)
} }
typedef struct{
char *name;
char *type;
}scenetype_map_s;
static scenetype_map_s sceneTypeMap[] = {
{"聚会模式","1"},
{"会议模式","2"},
{"家庭影院","3"},
{"回家模式","4"},
{"烛光模式","5"},
{"离家模式","6"},
{"早晨模式","7"},
{"睡觉模式","8"},
{"影院模式","9"},
{"娱乐模式","13"},
};
static int kk_get_sceneTypeMap_table_size(void)
{
return sizeof(sceneTypeMap)/sizeof(scenetype_map_s);
}
cJSON *kk_sync_scence_to_sdk(cJSON *root,cJSON *data) cJSON *kk_sync_scence_to_sdk(cJSON *root,cJSON *data)
{ {
cJSON *scenes = cJSON_GetObjectItem(data,SCENES_STR); cJSON *scenes = cJSON_GetObjectItem(data,SCENES_STR);
...@@ -265,6 +283,7 @@ cJSON *kk_sync_scence_to_sdk(cJSON *root,cJSON *data) ...@@ -265,6 +283,7 @@ cJSON *kk_sync_scence_to_sdk(cJSON *root,cJSON *data)
cJSON *actions,*enable,*name,*sceneId,*sceneType,*trigger,*condition; cJSON *actions,*enable,*name,*sceneId,*sceneType,*trigger,*condition;
int i,num = cJSON_GetArraySize(scenes); int i,num = cJSON_GetArraySize(scenes);
int k = 0,isMatch = 0;
SYN_SCENE_ITEM *build= (SYN_SCENE_ITEM *)malloc(sizeof(SYN_SCENE_ITEM)*num); SYN_SCENE_ITEM *build= (SYN_SCENE_ITEM *)malloc(sizeof(SYN_SCENE_ITEM)*num);
if(build == NULL){ if(build == NULL){
...@@ -288,11 +307,23 @@ cJSON *kk_sync_scence_to_sdk(cJSON *root,cJSON *data) ...@@ -288,11 +307,23 @@ cJSON *kk_sync_scence_to_sdk(cJSON *root,cJSON *data)
trigger= cJSON_GetObjectItem(item,SCENE_TRIGGER_STR); trigger= cJSON_GetObjectItem(item,SCENE_TRIGGER_STR);
condition= cJSON_GetObjectItem(item,CONDITION_STR); condition= cJSON_GetObjectItem(item,CONDITION_STR);
//todo /*过滤多控 iftt,定时相关场景*/
/* 时间段类型 if(sceneType == NULL||sceneType->type!=cJSON_Number||sceneType->valueint != 0){
if(strcmp(sceneType->valuestring,"")==){ continue;
}
}*/ int size = kk_get_sceneTypeMap_table_size();
for(k = 0; k < size; k++){
//printf("---------------------------->producTypeMap[k].type:%s\n",producTypeMap[k].type);
if(!strcmp(name->valuestring,sceneTypeMap[k].name)){
pScene->scenetype = sceneTypeMap[k].type;
isMatch = 1;
break;
}
}
if(isMatch == 0){
pScene->scenetype = "100";//自定义场景
}
pScene->act_num = kk_sync_actions(actions,&pScene->act,&pScene->room_id); pScene->act_num = kk_sync_actions(actions,&pScene->act,&pScene->room_id);
kk_sync_scene_condition(condition,&pScene); kk_sync_scene_condition(condition,&pScene);
......
...@@ -30,6 +30,7 @@ typedef struct{ ...@@ -30,6 +30,7 @@ typedef struct{
char *room_id; char *room_id;
char *time; char *time;
char *week; char *week;
char *scenetype;
SYN_SCENE_ACTION *act; SYN_SCENE_ACTION *act;
int act_num; int act_num;
}SYN_SCENE_ITEM; }SYN_SCENE_ITEM;
......
...@@ -180,8 +180,8 @@ void *TCPServer() ...@@ -180,8 +180,8 @@ void *TCPServer()
len = sizeof(Client); len = sizeof(Client);
bzero(&Client, len); bzero(&Client, len);
client_fd = accept(Listenfd, (struct sockaddr*)&Client,&len ); client_fd = accept(Listenfd, (struct sockaddr*)&Client,&len );
printf("addr:%s\n",inet_ntoa(Client.sin_addr)); INFO_PRINT("addr:%s\n",inet_ntoa(Client.sin_addr));
printf("[%s][%d]Connfd:%d\n",__FUNCTION__,__LINE__,client_fd); INFO_PRINT("[%s][%d]Connfd:%d\n",__FUNCTION__,__LINE__,client_fd);
//若有新的连接 //若有新的连接
if (client_fd != -1) if (client_fd != -1)
{ {
...@@ -220,21 +220,21 @@ void *TCPServer() ...@@ -220,21 +220,21 @@ void *TCPServer()
memset(Buf,0,sizeof(Buf)); memset(Buf,0,sizeof(Buf));
pthread_mutex_lock(&data_mutex); pthread_mutex_lock(&data_mutex);
ret = recv(s_ConnInfo[index].socketfd,Buf,sizeof(Buf), 0);//最后一个参数为0,表示默认阻塞接收,前面select解除了阻塞说明有数据可读 ret = recv(s_ConnInfo[i].socketfd,Buf,sizeof(Buf), 0);//最后一个参数为0,表示默认阻塞接收,前面select解除了阻塞说明有数据可读
pthread_mutex_unlock(&data_mutex); pthread_mutex_unlock(&data_mutex);
if(ret > 0) if(ret > 0)
{ {
printf("recv->buf:%s\n",Buf); INFO_PRINT("recv->buf:%s\n",Buf);
_kk_handle_data(Buf,s_ConnInfo[index].socketfd); _kk_handle_data(Buf,s_ConnInfo[i].socketfd);
} }
else else
{ {
printf("client disconnected\r\n"); INFO_PRINT("client disconnected\r\n");
pthread_mutex_lock(&data_mutex); pthread_mutex_lock(&data_mutex);
close(s_ConnInfo[index].socketfd); close(s_ConnInfo[i].socketfd);
s_ConnInfo[index].socketfd = -1; s_ConnInfo[i].socketfd = -1;
memset(s_ConnInfo[index].ip,0x0,sizeof(s_ConnInfo[index].ip)); memset(s_ConnInfo[i].ip,0x0,sizeof(s_ConnInfo[i].ip));
pthread_mutex_unlock(&data_mutex); pthread_mutex_unlock(&data_mutex);
} }
} }
......
This diff is collapsed.
...@@ -151,7 +151,7 @@ int kk_msg_execute_scene_action(const char* params,const char *fatherDeviceCode) ...@@ -151,7 +151,7 @@ int kk_msg_execute_scene_action(const char* params,const char *fatherDeviceCode)
int kk_msg_execute_scene_delete(const char* params,const char *fatherDeviceCode); int kk_msg_execute_scene_delete(const char* params,const char *fatherDeviceCode);
int dm_msg_thing_syncinfo_reply(void); int dm_msg_thing_syncinfo_reply(void);
int dm_msg_thing_syncinfopush_reply(void); int dm_msg_thing_syncinfopush_reply(void);
void kk_split(char *src,const char *separator,char **dest,int *num);
//const char DM_URI_SYS_PREFIX[] DM_READ_ONLY = "/sys/%s/%s/"; //const char DM_URI_SYS_PREFIX[] DM_READ_ONLY = "/sys/%s/%s/";
......
...@@ -905,6 +905,44 @@ static int kk_service_getCCUVersion_handle(cJSON *param,cJSON *msgId) ...@@ -905,6 +905,44 @@ static int kk_service_getCCUVersion_handle(cJSON *param,cJSON *msgId)
cJSON_Delete(info); cJSON_Delete(info);
return res; return res;
} }
static int kk_service_common_reply(cJSON *param,cJSON *msgId,char *msgType)
{
int res = 0;
int i = 0,num = 0;
SensorType_t *pList = NULL;
char version[VERSION_MAXLEN] = {0};
if(param == NULL || msgId == NULL){
return INVALID_PARAMETER;
}
cJSON *deviceCode = cJSON_GetObjectItem(param, MSG_DEVICE_CODE_STR);
if(deviceCode == NULL){
return FAIL_RETURN;
}
cJSON *productCode = cJSON_GetObjectItem(param, MSG_PRODUCT_CODE_STR);
if(productCode == NULL){
return FAIL_RETURN;
}
cJSON *info = cJSON_CreateObject();
cJSON_AddStringToObject(info, MSG_TYPE_STR, msgType);
cJSON_AddStringToObject(info, MSG_DEVICE_CODE_STR, deviceCode->valuestring);
cJSON_AddStringToObject(info, MSG_PRODUCT_CODE_STR, productCode->valuestring);
char *infff=cJSON_Print(info);
cJSON *payload = cJSON_CreateObject();
cJSON_AddStringToObject(payload, "desc", "success");
cJSON_AddStringToObject(payload, "version", "1.0");
cJSON_AddStringToObject(payload, "code", "0");
cJSON_AddStringToObject(payload, "msgId", msgId->valuestring);
cJSON *Item = cJSON_CreateObject();
cJSON_AddItemToObject(payload, "params", Item);
char *payload11=cJSON_Print(payload);
kk_sendData2app(infff,payload11,0);
free(payload11);
free(infff);
cJSON_Delete(payload);
cJSON_Delete(info);
return res;
}
/************************************************************ /************************************************************
*功能描述:获取主机版本信息 *功能描述:获取主机版本信息
*输入参数:params:云端下发数据,包含场景Id等 *输入参数:params:云端下发数据,包含场景Id等
...@@ -1371,6 +1409,8 @@ static void _iotx_linkkit_event_callback(iotx_dm_event_types_t type, char *data) ...@@ -1371,6 +1409,8 @@ static void _iotx_linkkit_event_callback(iotx_dm_event_types_t type, char *data)
cJSON *paramStr = cJSON_GetObjectItem(payload, MSG_PARAMS_STR); cJSON *paramStr = cJSON_GetObjectItem(payload, MSG_PARAMS_STR);
if(paramStr != NULL){ if(paramStr != NULL){
kk_service_bindScene_handle(paramStr,deviceCode->valuestring); kk_service_bindScene_handle(paramStr,deviceCode->valuestring);
cJSON *msgId = cJSON_GetObjectItem(payload, MSG_COMMON_MSGID);
kk_service_common_reply(info_root,msgId,"/thing/service/bindScene_reply");
} }
} }
else if(strcmp(typeJson->valuestring,KK_THING_SERVICE_UNBINDSBUTTTON) == 0){ else if(strcmp(typeJson->valuestring,KK_THING_SERVICE_UNBINDSBUTTTON) == 0){
...@@ -1385,6 +1425,8 @@ static void _iotx_linkkit_event_callback(iotx_dm_event_types_t type, char *data) ...@@ -1385,6 +1425,8 @@ static void _iotx_linkkit_event_callback(iotx_dm_event_types_t type, char *data)
} }
sprintf(btnId,"%d",buttonId->valueint); sprintf(btnId,"%d",buttonId->valueint);
kk_scene_delete_panel_scene_info(btnId,deviceCode->valuestring); kk_scene_delete_panel_scene_info(btnId,deviceCode->valuestring);
cJSON *msgId = cJSON_GetObjectItem(payload, MSG_COMMON_MSGID);
kk_service_common_reply(info_root,msgId,"/thing/service/unbindButton_reply");
} }
} }
else if(strcmp(typeJson->valuestring,KK_THING_SERVICE_ACTIVEBUTTON) == 0){ else if(strcmp(typeJson->valuestring,KK_THING_SERVICE_ACTIVEBUTTON) == 0){
...@@ -1399,6 +1441,8 @@ static void _iotx_linkkit_event_callback(iotx_dm_event_types_t type, char *data) ...@@ -1399,6 +1441,8 @@ static void _iotx_linkkit_event_callback(iotx_dm_event_types_t type, char *data)
} }
sprintf(btnId,"%d",buttonId->valueint); sprintf(btnId,"%d",buttonId->valueint);
kk_scene_execute_quickpanel(btnId,deviceCode->valuestring); kk_scene_execute_quickpanel(btnId,deviceCode->valuestring);
cJSON *msgId = cJSON_GetObjectItem(payload, MSG_COMMON_MSGID);
kk_service_common_reply(info_root,msgId,"/thing/service/activeButton_reply");
} }
} }
else if(strcmp(typeJson->valuestring,KK_THING_SERVICE_GETCCUVERSION) == 0){ else if(strcmp(typeJson->valuestring,KK_THING_SERVICE_GETCCUVERSION) == 0){
......
...@@ -590,9 +590,9 @@ static productype_map_s producTypeMap[] = { ...@@ -590,9 +590,9 @@ static productype_map_s producTypeMap[] = {
{"LIGHT_STRIP","colorDimmableLight"}, {"LIGHT_STRIP","colorDimmableLight"},
{"LIGHT_DIMMER","lightPanel"}, {"LIGHT_DIMMER","lightPanel"},
{"SOCKET","outlet"}, {"SOCKET","outlet"},
{"AC_IndoorUnit","air"}, {"AC_IndoorUnit","airConditioning"},
{"FLOOR_HEATING","floorHeating"}, {"FLOOR_HEATING","floorHeating"},
{"FRESH_AIR","airConditioning"}, {"FRESH_AIR","freshAir"},
{"AIR_SWITCH","airSwitch"}, {"AIR_SWITCH","airSwitch"},
}; };
int kk_get_product_type_table_size(void) int kk_get_product_type_table_size(void)
......
...@@ -334,8 +334,6 @@ static cJSON *kk_get_properties_info(char *deviceCode,int devType) ...@@ -334,8 +334,6 @@ static cJSON *kk_get_properties_info(char *deviceCode,int devType)
propertyStr = (char*)sqlite3_column_text(stmt, DB_IDENTIFITER); propertyStr = (char*)sqlite3_column_text(stmt, DB_IDENTIFITER);
valueType = sqlite3_column_int(stmt, DB_VALUETYPE); valueType = sqlite3_column_int(stmt, DB_VALUETYPE);
valueStr = (char*)sqlite3_column_text(stmt, DB_VALUE); valueStr = (char*)sqlite3_column_text(stmt, DB_VALUE);
printf("[%s][%d]\n",__FUNCTION__,__LINE__);
char *propertiesbuf[64] = {0}; char *propertiesbuf[64] = {0};
int num = 0; int num = 0;
...@@ -420,6 +418,9 @@ static cJSON *kk_get_indoor_properties_info(char *deviceCode) ...@@ -420,6 +418,9 @@ static cJSON *kk_get_indoor_properties_info(char *deviceCode)
static int kk_get_properties_info_obj(char *deviceCode) static int kk_get_properties_info_obj(char *deviceCode)
{ {
char *sqlCmd = NULL; char *sqlCmd = NULL;
int num = 0;
cJSON *subObj = NULL;
char pFinal[DEVICE_PROPERTY_NAME_MAX] = {0};
//char *zErrMsg = 0; //char *zErrMsg = 0;
sqlite3_stmt *stmt; sqlite3_stmt *stmt;
char *propertyStr = NULL; char *propertyStr = NULL;
...@@ -439,6 +440,34 @@ static int kk_get_properties_info_obj(char *deviceCode) ...@@ -439,6 +440,34 @@ static int kk_get_properties_info_obj(char *deviceCode)
propertyStr = (char*)sqlite3_column_text(stmt, DB_IDENTIFITER); propertyStr = (char*)sqlite3_column_text(stmt, DB_IDENTIFITER);
valueType = sqlite3_column_int(stmt, DB_VALUETYPE); valueType = sqlite3_column_int(stmt, DB_VALUETYPE);
valueStr = (char*)sqlite3_column_text(stmt, DB_VALUE); valueStr = (char*)sqlite3_column_text(stmt, DB_VALUE);
if(strstr(propertyStr,".") != NULL){
printf("[%s][%d]\n",__FUNCTION__,__LINE__);
char *propertiesbuf[DEVICE_PROPERTY_NAME_MAX] = {0};
kk_split(propertyStr,".",propertiesbuf,&num);
if(num == 2){
if(strcmp(propertiesbuf[0],pFinal) != 0){
printf("[%s][%d]\n",__FUNCTION__,__LINE__);
memcpy(pFinal,propertiesbuf[0],strlen(propertiesbuf[0]));
subObj = cJSON_CreateObject();
}
printf("[%s][%d]\n",__FUNCTION__,__LINE__);
if(strlen(pFinal) > 0 && subObj != NULL){
if(valueType == KK_TSL_DATA_TYPE_TEXT){
cJSON_AddStringToObject(subObj, propertiesbuf[1], valueStr);
}else if(valueType == KK_TSL_DATA_TYPE_INT||
valueType == KK_TSL_DATA_TYPE_ENUM||
valueType == KK_TSL_DATA_TYPE_BOOL){
cJSON_AddNumberToObject(subObj, propertiesbuf[1], atoi(valueStr));
}else if(valueType == KK_TSL_DATA_TYPE_DOUBLE){
cJSON_AddNumberToObject(subObj, propertiesbuf[1], atof(valueStr));
}
}
}
//printf("---------------------------------------->pFinal:%s,num:%d\n",pFinal,epNumInt);
}
else{
printf("[%s][%d]\n",__FUNCTION__,__LINE__);
if(valueType == KK_TSL_DATA_TYPE_TEXT){ if(valueType == KK_TSL_DATA_TYPE_TEXT){
cJSON_AddStringToObject(obj, propertyStr, valueStr); cJSON_AddStringToObject(obj, propertyStr, valueStr);
}else if(valueType == KK_TSL_DATA_TYPE_INT|| }else if(valueType == KK_TSL_DATA_TYPE_INT||
...@@ -449,6 +478,11 @@ static int kk_get_properties_info_obj(char *deviceCode) ...@@ -449,6 +478,11 @@ static int kk_get_properties_info_obj(char *deviceCode)
cJSON_AddNumberToObject(obj, propertyStr, atof(valueStr)); cJSON_AddNumberToObject(obj, propertyStr, atof(valueStr));
} }
} }
}
if(subObj != NULL){
cJSON_AddItemToObject(obj, pFinal, subObj);
}
//printf("[%s][%d]\n",__FUNCTION__,__LINE__);
sqlite3_free(sqlCmd); sqlite3_free(sqlCmd);
sqlite3_finalize(stmt); sqlite3_finalize(stmt);
return obj; return obj;
......
...@@ -581,10 +581,20 @@ static int kk_alarm_notify_handle(dm_mgr_dev_node_t *node,char *identifier,char ...@@ -581,10 +581,20 @@ static int kk_alarm_notify_handle(dm_mgr_dev_node_t *node,char *identifier,char
}else if(strcmp(identifier,"SmokeSensorState") == 0 && atoi(valueBuf) == 1){ }else if(strcmp(identifier,"SmokeSensorState") == 0 && atoi(valueBuf) == 1){
cJSON_AddStringToObject(param, "CommonAlarmState", "1"); cJSON_AddStringToObject(param, "CommonAlarmState", "1");
needSave = 1; needSave = 1;
}else if(strcmp(identifier,"GasSensorState") == 0 && atoi(valueBuf) == 1){
cJSON_AddStringToObject(param, "CommonAlarmState", "1");
needSave = 1;
}else if(strcmp(identifier,"WaterSensorState") == 0 && atoi(valueBuf) == 1){
cJSON_AddStringToObject(param, "CommonAlarmState", "1");
needSave = 1;
}else if(strcmp(identifier,"DismantleState") == 0 && atoi(valueBuf) == 0){ }else if(strcmp(identifier,"DismantleState") == 0 && atoi(valueBuf) == 0){
} }
else if(strcmp(identifier,"SmokeSensorState") == 0 && atoi(valueBuf) == 0){ else if(strcmp(identifier,"SmokeSensorState") == 0 && atoi(valueBuf) == 0){
} }
else if(strcmp(identifier,"GasSensorState") == 0 && atoi(valueBuf) == 0){
}
else if(strcmp(identifier,"WaterSensorState") == 0 && atoi(valueBuf) == 0){
}
else{ else{
cJSON_AddStringToObject(param, "CommonAlarmState", "1"); cJSON_AddStringToObject(param, "CommonAlarmState", "1");
needSave = 1; needSave = 1;
...@@ -912,18 +922,18 @@ void kk_platMsg_handle(void* data, char* chalMark){ ...@@ -912,18 +922,18 @@ void kk_platMsg_handle(void* data, char* chalMark){
itemData->data_value.type == KK_TSL_DATA_TYPE_ENUM|| itemData->data_value.type == KK_TSL_DATA_TYPE_ENUM||
itemData->data_value.type == KK_TSL_DATA_TYPE_BOOL){ itemData->data_value.type == KK_TSL_DATA_TYPE_BOOL){
sprintf(valueBuf,"%d",itemDataIdentifier->valueint); sprintf(valueBuf,"%d",itemDataIdentifier->valueint);
kk_tsl_set_value(kk_tsl_set_event_output_value,node->dev_shadow,tmpStr,&itemDataIdentifier->valueint,NULL); //kk_tsl_set_value(kk_tsl_set_event_output_value,node->dev_shadow,tmpStr,&itemDataIdentifier->valueint,NULL);
} }
else if(itemData->data_value.type == KK_TSL_DATA_TYPE_FLOAT || else if(itemData->data_value.type == KK_TSL_DATA_TYPE_FLOAT ||
itemData->data_value.type == KK_TSL_DATA_TYPE_DOUBLE){ itemData->data_value.type == KK_TSL_DATA_TYPE_DOUBLE){
sprintf(valueBuf,"%f",itemDataIdentifier->valuedouble); sprintf(valueBuf,"%f",itemDataIdentifier->valuedouble);
kk_tsl_set_value(kk_tsl_set_event_output_value,node->dev_shadow,tmpStr,&itemDataIdentifier->valuedouble,NULL); //kk_tsl_set_value(kk_tsl_set_event_output_value,node->dev_shadow,tmpStr,&itemDataIdentifier->valuedouble,NULL);
} }
else if(itemData->data_value.type == KK_TSL_DATA_TYPE_TEXT || else if(itemData->data_value.type == KK_TSL_DATA_TYPE_TEXT ||
itemData->data_value.type == KK_TSL_DATA_TYPE_DATE){ itemData->data_value.type == KK_TSL_DATA_TYPE_DATE){
sprintf(valueBuf,"%s",itemDataIdentifier->valuestring); sprintf(valueBuf,"%s",itemDataIdentifier->valuestring);
kk_tsl_set_value(kk_tsl_set_event_output_value,node->dev_shadow,tmpStr,NULL,itemDataIdentifier->valuestring); //kk_tsl_set_value(kk_tsl_set_event_output_value,node->dev_shadow,tmpStr,NULL,itemDataIdentifier->valuestring);
} }
if(sensorDev){ if(sensorDev){
kk_alarm_notify_handle(node,itemData->identifier,valueBuf);//告警信息处理 kk_alarm_notify_handle(node,itemData->identifier,valueBuf);//告警信息处理
......
...@@ -1087,7 +1087,10 @@ int kk_scene_parse_addscene(const cJSON* args,char *sceneId,int isUpdate,const c ...@@ -1087,7 +1087,10 @@ int kk_scene_parse_addscene(const cJSON* args,char *sceneId,int isUpdate,const c
return INVALID_PARAMETER; return INVALID_PARAMETER;
} }
cJSON *room_id = cJSON_GetObjectItem(args,MSG_SCENE_ROOM_ID); cJSON *room_id = cJSON_GetObjectItem(args,MSG_SCENE_ROOM_ID);
if(room_id == NULL) return FAIL_RETURN; if(room_id == NULL)
{
INFO_PRINT("NOT Contain the room info\n");
}
cJSON *name = cJSON_GetObjectItem(args,MSG_SCENE_SCENE_NAME); cJSON *name = cJSON_GetObjectItem(args,MSG_SCENE_SCENE_NAME);
if(name == NULL) return FAIL_RETURN; if(name == NULL) return FAIL_RETURN;
cJSON *sceneType = cJSON_GetObjectItem(args,MSG_SCENE_SCENCTYPE); cJSON *sceneType = cJSON_GetObjectItem(args,MSG_SCENE_SCENCTYPE);
...@@ -1104,9 +1107,14 @@ int kk_scene_parse_addscene(const cJSON* args,char *sceneId,int isUpdate,const c ...@@ -1104,9 +1107,14 @@ int kk_scene_parse_addscene(const cJSON* args,char *sceneId,int isUpdate,const c
} }
} }
//多合一面板绑定的时候可能不带roomid
if(room_id != NULL){
char roomIdStr[32] = {0}; char roomIdStr[32] = {0};
snprintf(roomIdStr,32,"%d",room_id->valueint); snprintf(roomIdStr,32,"%d",room_id->valueint);
res = kk_scene_insert_scene_info(roomIdStr,name->valuestring,sceneType->valueint,enable->valueint,sceneId); res = kk_scene_insert_scene_info(roomIdStr,name->valuestring,sceneType->valueint,enable->valueint,sceneId);
}else{
res = kk_scene_insert_scene_info("-1",name->valuestring,sceneType->valueint,enable->valueint,sceneId);
}
/*多控直接下发给网关处理*/ /*多控直接下发给网关处理*/
if(enable->valueint == 1 && sceneType->valueint == DB_SCENETYPE_MUTICONTROL){ if(enable->valueint == 1 && sceneType->valueint == DB_SCENETYPE_MUTICONTROL){
kk_scene_parse_scene_muticontrol(args,sceneId,isUpdate); kk_scene_parse_scene_muticontrol(args,sceneId,isUpdate);
......
This diff is collapsed.
{
"productCode":"3073",
"operateType":"505",
"channel":1,
"syn_type":1,
"syn_opcode":"DIMMABLE_LIGHT_STATUS",
"newccu":[
{
"identifier":"PowerSwitch",
"opcodemap":"SWITCH",
"dataType":"int",
"channel":"1",
"valueRange":[0,1],
"value": 0
},{
"identifier":"Brightness",
"opcodemap":"ADJUST_LUMINANCE",
"dataType":"int",
"channel":"1",
"valueRange":[],
"value": 0
},{
"identifier":"WhiteBrightness",
"opcodemap":"ADJUST_WHITE_LUMINANCE",
"dataType":"int",
"channel":"1",
"valueRange":[],
"value": 0
}
],
"oldccu":[
{
"opcode":"SWITCH",
"identifiermap":"PowerSwitch",
"dataType":"map",
"channel":"1",
"valueRange":["OFF","ON"],
"syn":"on",
"synType":"bool"
},{
"opcode":"ADJUST_LUMINANCE",
"identifiermap":"Brightness",
"dataType":"int",
"channel":"1",
"valueRange":[],
"syn":"bri",
"synType":"int"
},{
"opcode":"ADJUST_WHITE_LUMINANCE",
"identifiermap":"WhiteBrightness",
"dataType":"int",
"channel":"1",
"valueRange":[],
"syn":"white_bri",
"synType":"int"
}
]
}
\ No newline at end of file
{
"productCode":"3102",
"operateType":"502",
"channel":1,
"syn_type":1,
"syn_opcode":"DIMMABLE_LIGHT_STATUS",
"newccu":[
{
"identifier":"PowerSwitch",
"opcodemap":"SWITCH",
"dataType":"int",
"channel":"1",
"valueRange":[0,1],
"value": 0
},{
"identifier":"Brightness",
"opcodemap":"ADJUST_LUMINANCE",
"dataType":"int",
"channel":"1",
"valueRange":[],
"value": 0
}
],
"oldccu":[
{
"opcode":"SWITCH",
"identifiermap":"PowerSwitch",
"dataType":"map",
"channel":"1",
"valueRange":["OFF","ON"],
"syn":"on",
"synType":"bool"
},{
"opcode":"ADJUST_LUMINANCE",
"identifiermap":"Brightness",
"dataType":"int",
"channel":"1",
"valueRange":[],
"syn":"bri",
"synType":"int"
}
]
}
\ No newline at end of file
#!/bin/sh #!/bin/sh
#判断进程是否存在,如果不存在就启动它 #判断进程是否存在,如果不存在就启动它
ccuApps="/app/ccuApps"
restart_process()
{
$ccuApps/killall.sh
$ccuApps/onboot.sh
}
PIDS=`ps|grep kk_midware |grep -v grep | awk '{print $1}'` PIDS=`ps|grep kk_midware |grep -v grep | awk '{print $1}'`
if [ "$PIDS" != "" ]; then if [ "$PIDS" != "" ]; then
echo "kk_midware is runing!" echo "kk_midware is runing!"
else else
export LD_LIBRARY_PATH=/app/ccuApps/lib restart_process;
/app/ccuApps/bin/kk_midware &
#运行进程 #运行进程
fi fi
sleep 3 sleep 3
...@@ -14,8 +20,7 @@ if [ "$PIDS" != "" ]; then ...@@ -14,8 +20,7 @@ if [ "$PIDS" != "" ]; then
echo "kk_cloud is runing!" echo "kk_cloud is runing!"
else else
echo "kk_cloud is not running ,now restart kk_midware and kk_cloud" echo "kk_cloud is not running ,now restart kk_midware and kk_cloud"
export LD_LIBRARY_PATH=/app/ccuApps/lib restart_process;
/app/ccuApps/bin/kk_cloud &
fi fi
sleep 1 sleep 1
PIDS=`ps|grep smarthome_z3gw_nx5 |grep -v grep | awk '{print $1}'` PIDS=`ps|grep smarthome_z3gw_nx5 |grep -v grep | awk '{print $1}'`
...@@ -23,8 +28,7 @@ if [ "$PIDS" != "" ]; then ...@@ -23,8 +28,7 @@ if [ "$PIDS" != "" ]; then
echo "smarthome_z3gw_nx5 is runing!" echo "smarthome_z3gw_nx5 is runing!"
else else
echo "smarthome_z3gw_nx5 is not running ,now restart smarthome_z3gw_nx5" echo "smarthome_z3gw_nx5 is not running ,now restart smarthome_z3gw_nx5"
export LD_LIBRARY_PATH=/app/ccuApps/lib restart_process;
/app/ccuApps/bin/smarthome_z3gw_nx5 -r0 -l3 --device-def=/app/ccuApps/kk_device_def.json --db=/data/kk/kk_z3gw.db --uart=/dev/ttyS1&
fi fi
sleep 1 sleep 1
PIDS=`ps|grep kk_lan |grep -v grep | awk '{print $1}'` PIDS=`ps|grep kk_lan |grep -v grep | awk '{print $1}'`
...@@ -32,6 +36,5 @@ if [ "$PIDS" != "" ]; then ...@@ -32,6 +36,5 @@ if [ "$PIDS" != "" ]; then
echo "kk_lan is runing!" echo "kk_lan is runing!"
else else
echo "kk_lan is not running ,now restart kk_lan" echo "kk_lan is not running ,now restart kk_lan"
export LD_LIBRARY_PATH=/app/ccuApps/lib restart_process;
/app/ccuApps/bin/kk_lan &
fi fi
...@@ -122,8 +122,9 @@ ...@@ -122,8 +122,9 @@
"identifier": "BatteryAlarm", "identifier": "BatteryAlarm",
"method": "thing.event.BatteryAlarm.post", "method": "thing.event.BatteryAlarm.post",
"name": "BatteryAlarm", "name": "BatteryAlarm",
"type": "alarm", "type": "alert",
"required": true, "required": true,
"alarmbit":3,
"desc": "低电量告警" "desc": "低电量告警"
} }
] ]
......
...@@ -109,8 +109,9 @@ ...@@ -109,8 +109,9 @@
"identifier": "BatteryAlarm", "identifier": "BatteryAlarm",
"method": "thing.event.BatteryAlarm.post", "method": "thing.event.BatteryAlarm.post",
"name": "BatteryAlarm", "name": "BatteryAlarm",
"type": "alarm", "type": "alert",
"required": true, "required": true,
"alarmbit":3,
"desc": "低电量告警" "desc": "低电量告警"
} }
] ]
......
{ {
"schema": "https://iot-ap.ikonke.com/model/product_3018.json", "schema": "https://iot-ap.ikonke.com/model/product_3018.json",
"productType": "lightPanel", "productType": "lightPanel",
"version": "1.0", "version": "1.1",
"profile": { "profile": {
"heartbeat": "300", "heartbeat": "300",
"productCode": "3018", "productCode": "3018",
......
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
"schema": "https://iot-ap.ikonke.com/model/product_3037.json", "schema": "https://iot-ap.ikonke.com/model/product_3037.json",
"productType": "outlet", "productType": "outlet",
"version": "1.0", "version": "1.0",
"version": "1",
"profile": { "profile": {
"heartbeat": "300", "heartbeat": "300",
"productCode": "3037", "productCode": "3037",
......
...@@ -172,8 +172,9 @@ ...@@ -172,8 +172,9 @@
"identifier": "BatteryAlarm", "identifier": "BatteryAlarm",
"method": "thing.event.BatteryAlarm.post", "method": "thing.event.BatteryAlarm.post",
"name": "BatteryAlarm", "name": "BatteryAlarm",
"type": "alarm", "type": "alert",
"required": true, "required": true,
"alarmbit":3,
"desc": "低电量告警" "desc": "低电量告警"
} }
] ]
......
...@@ -244,8 +244,9 @@ ...@@ -244,8 +244,9 @@
"identifier": "BatteryAlarm", "identifier": "BatteryAlarm",
"method": "thing.event.BatteryAlarm.post", "method": "thing.event.BatteryAlarm.post",
"name": "BatteryAlarm", "name": "BatteryAlarm",
"type": "alarm", "type": "alert",
"required": true, "required": true,
"alarmbit":3,
"desc": "低电量告警" "desc": "低电量告警"
}, },
{ {
...@@ -254,6 +255,7 @@ ...@@ -254,6 +255,7 @@
"type": "alert", "type": "alert",
"required": true, "required": true,
"method": "thing.event.TamperAlarm.post", "method": "thing.event.TamperAlarm.post",
"alarmbit":2,
"outputData": [ "outputData": [
{ {
"identifier": "DismantleState", "identifier": "DismantleState",
...@@ -274,6 +276,7 @@ ...@@ -274,6 +276,7 @@
"type": "alert", "type": "alert",
"required": true, "required": true,
"method": "thing.event.sensorAlarm.post", "method": "thing.event.sensorAlarm.post",
"alarmbit":6,
"outputData": [ "outputData": [
{ {
"identifier": "SensorState", "identifier": "SensorState",
......
...@@ -172,8 +172,9 @@ ...@@ -172,8 +172,9 @@
"identifier": "BatteryAlarm", "identifier": "BatteryAlarm",
"method": "thing.event.BatteryAlarm.post", "method": "thing.event.BatteryAlarm.post",
"name": "BatteryAlarm", "name": "BatteryAlarm",
"type": "alarm", "type": "alert",
"required": true, "required": true,
"alarmbit":3,
"desc": "低电量告警" "desc": "低电量告警"
} }
] ]
......
...@@ -172,8 +172,9 @@ ...@@ -172,8 +172,9 @@
"identifier": "BatteryAlarm", "identifier": "BatteryAlarm",
"method": "thing.event.BatteryAlarm.post", "method": "thing.event.BatteryAlarm.post",
"name": "BatteryAlarm", "name": "BatteryAlarm",
"type": "alarm", "type": "alert",
"required": true, "required": true,
"alarmbit":3,
"desc": "低电量告警" "desc": "低电量告警"
} }
] ]
......
...@@ -286,8 +286,9 @@ ...@@ -286,8 +286,9 @@
"identifier": "BatteryAlarm", "identifier": "BatteryAlarm",
"method": "thing.event.BatteryAlarm.post", "method": "thing.event.BatteryAlarm.post",
"name": "BatteryAlarm", "name": "BatteryAlarm",
"type": "alarm", "type": "alert",
"required": true, "required": true,
"alarmbit":3,
"desc": "低电量告警" "desc": "低电量告警"
} }
] ]
......
...@@ -172,8 +172,9 @@ ...@@ -172,8 +172,9 @@
"identifier": "BatteryAlarm", "identifier": "BatteryAlarm",
"method": "thing.event.BatteryAlarm.post", "method": "thing.event.BatteryAlarm.post",
"name": "BatteryAlarm", "name": "BatteryAlarm",
"type": "alarm", "type": "alert",
"required": true, "required": true,
"alarmbit":3,
"desc": "低电量告警" "desc": "低电量告警"
} }
] ]
......
...@@ -122,8 +122,9 @@ ...@@ -122,8 +122,9 @@
"identifier": "BatteryAlarm", "identifier": "BatteryAlarm",
"method": "thing.event.BatteryAlarm.post", "method": "thing.event.BatteryAlarm.post",
"name": "BatteryAlarm", "name": "BatteryAlarm",
"type": "alarm", "type": "alert",
"required": true, "required": true,
"alarmbit":3,
"desc": "低电量告警" "desc": "低电量告警"
} }
] ]
......
...@@ -190,8 +190,9 @@ ...@@ -190,8 +190,9 @@
"identifier": "BatteryAlarm", "identifier": "BatteryAlarm",
"method": "thing.event.BatteryAlarm.post", "method": "thing.event.BatteryAlarm.post",
"name": "BatteryAlarm", "name": "BatteryAlarm",
"type": "alarm", "type": "alert",
"required": true, "required": true,
"alarmbit":3,
"desc": "低电量告警" "desc": "低电量告警"
} }
] ]
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
"heartbeat": "7200", "heartbeat": "7200",
"productCode": "3049", "productCode": "3049",
"productName": "Kit Pro人体感应传感器", "productName": "Kit Pro人体感应传感器",
"sleepTime": "30000" "sleepTime": "7200"
}, },
"services": [ "services": [
{ {
...@@ -172,8 +172,9 @@ ...@@ -172,8 +172,9 @@
"identifier": "BatteryAlarm", "identifier": "BatteryAlarm",
"method": "thing.event.BatteryAlarm.post", "method": "thing.event.BatteryAlarm.post",
"name": "BatteryAlarm", "name": "BatteryAlarm",
"type": "alarm", "type": "alert",
"required": true, "required": true,
"alarmbit":3,
"desc": "低电量告警" "desc": "低电量告警"
} }
] ]
......
...@@ -172,7 +172,7 @@ ...@@ -172,7 +172,7 @@
"identifier": "BatteryAlarm", "identifier": "BatteryAlarm",
"method": "thing.event.BatteryAlarm.post", "method": "thing.event.BatteryAlarm.post",
"name": "BatteryAlarm", "name": "BatteryAlarm",
"type": "alarm", "type": "alert",
"required": true, "required": true,
"desc": "低电量告警" "desc": "低电量告警"
} }
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
"heartbeat": "1200", "heartbeat": "1200",
"productCode": "3051", "productCode": "3051",
"productName": "邦德系列.门窗传感器(KONKE)", "productName": "邦德系列.门窗传感器(KONKE)",
"sleepTime": "30000" "sleepTime": "7200"
}, },
"services": [ "services": [
{ {
...@@ -150,7 +150,8 @@ ...@@ -150,7 +150,8 @@
"name": "contactAlarm", "name": "contactAlarm",
"type": "alarm", "type": "alarm",
"required": true, "required": true,
"desc": "门磁告警" "desc": "门磁告警",
"alarm_bit": 1
}, },
{ {
"outputData": [ "outputData": [
...@@ -172,8 +173,9 @@ ...@@ -172,8 +173,9 @@
"identifier": "BatteryAlarm", "identifier": "BatteryAlarm",
"method": "thing.event.BatteryAlarm.post", "method": "thing.event.BatteryAlarm.post",
"name": "BatteryAlarm", "name": "BatteryAlarm",
"type": "alarm", "type": "alert",
"required": true, "required": true,
"alarmbit":3,
"desc": "低电量告警" "desc": "低电量告警"
} }
] ]
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
"heartbeat": "1200", "heartbeat": "1200",
"productCode": "3052", "productCode": "3052",
"productName": "邦德系列.环境传感器(KONKE)", "productName": "邦德系列.环境传感器(KONKE)",
"sleepTime": "30000" "sleepTime": "1200"
}, },
"services": [ "services": [
{ {
...@@ -295,8 +295,9 @@ ...@@ -295,8 +295,9 @@
"identifier": "BatteryAlarm", "identifier": "BatteryAlarm",
"method": "thing.event.BatteryAlarm.post", "method": "thing.event.BatteryAlarm.post",
"name": "BatteryAlarm", "name": "BatteryAlarm",
"type": "alarm", "type": "alert",
"required": true, "required": true,
"alarmbit":3,
"desc": "低电量告警" "desc": "低电量告警"
} }
] ]
......
...@@ -172,8 +172,9 @@ ...@@ -172,8 +172,9 @@
"identifier": "BatteryAlarm", "identifier": "BatteryAlarm",
"method": "thing.event.BatteryAlarm.post", "method": "thing.event.BatteryAlarm.post",
"name": "BatteryAlarm", "name": "BatteryAlarm",
"type": "alarm", "type": "alert",
"required": true, "required": true,
"alarmbit":3,
"desc": "低电量告警" "desc": "低电量告警"
} }
] ]
......
...@@ -160,8 +160,9 @@ ...@@ -160,8 +160,9 @@
"identifier": "BatteryAlarm", "identifier": "BatteryAlarm",
"method": "thing.event.BatteryAlarm.post", "method": "thing.event.BatteryAlarm.post",
"name": "BatteryAlarm", "name": "BatteryAlarm",
"type": "alarm", "type": "alert",
"required": true, "required": true,
"alarmbit":3,
"desc": "低电量告警" "desc": "低电量告警"
} }
] ]
......
...@@ -172,8 +172,9 @@ ...@@ -172,8 +172,9 @@
"identifier": "BatteryAlarm", "identifier": "BatteryAlarm",
"method": "thing.event.BatteryAlarm.post", "method": "thing.event.BatteryAlarm.post",
"name": "BatteryAlarm", "name": "BatteryAlarm",
"type": "alarm", "type": "alert",
"required": true, "required": true,
"alarmbit":3,
"desc": "低电量告警" "desc": "低电量告警"
} }
] ]
......
...@@ -123,8 +123,9 @@ ...@@ -123,8 +123,9 @@
"identifier": "BatteryAlarm", "identifier": "BatteryAlarm",
"method": "thing.event.BatteryAlarm.post", "method": "thing.event.BatteryAlarm.post",
"name": "BatteryAlarm", "name": "BatteryAlarm",
"type": "alarm", "type": "alert",
"required": true, "required": true,
"alarmbit":3,
"desc": "低电量告警" "desc": "低电量告警"
} }
] ]
......
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
"name": "告警时间" "name": "告警时间"
}, },
{ {
"identifier": "SirenState", "identifier": "AlarmState",
"name": "声光告警状态", "name": "声光告警状态",
"dataType": { "dataType": {
"type": "enum", "type": "enum",
...@@ -159,7 +159,7 @@ ...@@ -159,7 +159,7 @@
"name": "告警时间" "name": "告警时间"
}, },
{ {
"identifier": "SirenState", "identifier": "AlarmState",
"accessMode": "rw", "accessMode": "rw",
"required": true, "required": true,
"name": "声光告警状态", "name": "声光告警状态",
...@@ -234,7 +234,7 @@ ...@@ -234,7 +234,7 @@
"name": "告警时间" "name": "告警时间"
}, },
{ {
"identifier": "SirenState", "identifier": "AlarmState",
"name": "声光告警状态", "name": "声光告警状态",
"dataType": { "dataType": {
"type": "enum", "type": "enum",
...@@ -286,8 +286,9 @@ ...@@ -286,8 +286,9 @@
"identifier": "BatteryAlarm", "identifier": "BatteryAlarm",
"method": "thing.event.BatteryAlarm.post", "method": "thing.event.BatteryAlarm.post",
"name": "BatteryAlarm", "name": "BatteryAlarm",
"type": "alarm", "type": "alert",
"required": true, "required": true,
"alarmbit":3,
"desc": "低电量告警" "desc": "低电量告警"
} }
] ]
......
{ {
"schema": "https://iot-ap.ikonke.com/model/product_3064.json", "schema": "https://iot-ap.ikonke.com/model/product_3064.json",
"productType": "sensor", "productType": "Doorlock",
"version": "1", "version": "1",
"profile": { "profile": {
"heartbeat": "1200", "heartbeat": "1200",
...@@ -341,7 +341,8 @@ ...@@ -341,7 +341,8 @@
"name": "TamperAlarm", "name": "TamperAlarm",
"type": "alert", "type": "alert",
"required": true, "required": true,
"desc": "防拆告警" "desc": "防拆告警",
"alarmbit":2
}, },
{ {
"outputData": [ "outputData": [
...@@ -363,8 +364,9 @@ ...@@ -363,8 +364,9 @@
"identifier": "BatteryAlarm", "identifier": "BatteryAlarm",
"method": "thing.event.BatteryAlarm.post", "method": "thing.event.BatteryAlarm.post",
"name": "BatteryAlarm", "name": "BatteryAlarm",
"type": "alarm", "type": "alert",
"required": true, "required": true,
"alarmbit":3,
"desc": "低电量告警" "desc": "低电量告警"
} }
] ]
......
{ {
"schema": "https://iot-ap.ikonke.com/model/product_3073.json", "schema": "https://iot-ap.ikonke.com/model/product_3073.json",
"productType": "colorDimmableLight", "productType": "colorDimmableLight",
"version": "1.0", "version": "1.1",
"profile": { "profile": {
"heartbeat": "300", "heartbeat": "300",
"productCode": "3073", "productCode": "3073",
...@@ -71,6 +71,20 @@ ...@@ -71,6 +71,20 @@
}, },
"name": "RGB调色" "name": "RGB调色"
}, },
{
"identifier": "Brightness",
"dataType": {
"type": "int",
"specs": {
"min": "1",
"max": "100",
"unit": "%",
"unitName": "百分比",
"step": "1"
}
},
"name": "彩灯亮度"
},
{ {
"identifier": "WhiteBrightness", "identifier": "WhiteBrightness",
"dataType": { "dataType": {
...@@ -84,6 +98,28 @@ ...@@ -84,6 +98,28 @@
} }
}, },
"name": "白光亮度" "name": "白光亮度"
},
{
"identifier":"Mode",
"dataType":{
"type":"enum",
"specs":{
"0":"模式0",
"1":"模式1",
"2":"模式2",
"3":"模式3",
"4":"模式4",
"5":"模式5",
"6":"模式6",
"7":"模式7",
"8":"模式8",
"9":"模式9",
"10":"模式10",
"11":"模式11",
"12":"模式12"
}
},
"name":"模式"
} }
], ],
"method": "thing.service.property.set", "method": "thing.service.property.set",
...@@ -153,6 +189,20 @@ ...@@ -153,6 +189,20 @@
}, },
"name": "RGB调色" "name": "RGB调色"
}, },
{
"identifier": "Brightness",
"dataType": {
"type": "int",
"specs": {
"min": "1",
"max": "100",
"unit": "%",
"unitName": "百分比",
"step": "1"
}
},
"name": "彩灯亮度"
},
{ {
"identifier": "WhiteBrightness", "identifier": "WhiteBrightness",
"dataType": { "dataType": {
...@@ -166,13 +216,36 @@ ...@@ -166,13 +216,36 @@
} }
}, },
"name": "白光亮度" "name": "白光亮度"
},
{
"identifier":"Mode",
"dataType":{
"type":"enum",
"specs":{
"0":"模式0",
"1":"模式1",
"2":"模式2",
"3":"模式3",
"4":"模式4",
"5":"模式5",
"6":"模式6",
"7":"模式7",
"8":"模式8",
"9":"模式9",
"10":"模式10",
"11":"模式11",
"12":"模式12"
}
},
"name":"模式"
} }
], ],
"identifier": "get", "identifier": "get",
"inputData": [ "inputData": [
"PowerSwitch", "PowerSwitch",
"RGBColor", "RGBColor",
"WhiteBrightness" "WhiteBrightness",
"Brightness"
], ],
"method": "thing.service.property.get", "method": "thing.service.property.get",
"name": "get", "name": "get",
...@@ -294,6 +367,20 @@ ...@@ -294,6 +367,20 @@
"accessMode": "rw", "accessMode": "rw",
"required": true "required": true
}, },
{
"identifier": "Brightness",
"dataType": {
"type": "int",
"specs": {
"min": "1",
"max": "100",
"unit": "%",
"unitName": "百分比",
"step": "1"
}
},
"name": "彩灯亮度"
},
{ {
"identifier": "WhiteBrightness", "identifier": "WhiteBrightness",
"name": "白光亮度", "name": "白光亮度",
...@@ -309,6 +396,28 @@ ...@@ -309,6 +396,28 @@
"step": "1" "step": "1"
} }
} }
},
{
"identifier":"Mode",
"dataType":{
"type":"enum",
"specs":{
"0":"模式0",
"1":"模式1",
"2":"模式2",
"3":"模式3",
"4":"模式4",
"5":"模式5",
"6":"模式6",
"7":"模式7",
"8":"模式8",
"9":"模式9",
"10":"模式10",
"11":"模式11",
"12":"模式12"
}
},
"name":"模式"
} }
], ],
"events": [ "events": [
...@@ -373,6 +482,20 @@ ...@@ -373,6 +482,20 @@
}, },
"name": "RGB调色" "name": "RGB调色"
}, },
{
"identifier": "Brightness",
"dataType": {
"type": "int",
"specs": {
"min": "1",
"max": "100",
"unit": "%",
"unitName": "百分比",
"step": "1"
}
},
"name": "彩灯亮度"
},
{ {
"identifier": "WhiteBrightness", "identifier": "WhiteBrightness",
"dataType": { "dataType": {
...@@ -386,6 +509,28 @@ ...@@ -386,6 +509,28 @@
} }
}, },
"name": "白光亮度" "name": "白光亮度"
},
{
"identifier":"Mode",
"dataType":{
"type":"enum",
"specs":{
"0":"模式0",
"1":"模式1",
"2":"模式2",
"3":"模式3",
"4":"模式4",
"5":"模式5",
"6":"模式6",
"7":"模式7",
"8":"模式8",
"9":"模式9",
"10":"模式10",
"11":"模式11",
"12":"模式12"
}
},
"name":"模式"
} }
], ],
"identifier": "property", "identifier": "property",
......
{ {
"schema": "https://iot-ap.ikonke.com/model/product_3076.json", "schema": "https://iot-ap.ikonke.com/model/product_3076.json",
"productType": "sensor", "productType": "sensor",
"version": "1", "version": "1.0",
"profile": { "profile": {
"heartbeat": "300", "heartbeat": "300",
"productCode": "3076", "productCode": "3076",
......
...@@ -178,7 +178,8 @@ ...@@ -178,7 +178,8 @@
}, },
"name":"电源开关", "name":"电源开关",
"accessMode":"rw", "accessMode":"rw",
"required":true "required":true,
"epNum":1
}, },
{ {
"identifier":"PowerSwitch_2", "identifier":"PowerSwitch_2",
...@@ -191,7 +192,8 @@ ...@@ -191,7 +192,8 @@
}, },
"name":"电源开关", "name":"电源开关",
"accessMode":"rw", "accessMode":"rw",
"required":true "required":true,
"epNum":2
}, },
{ {
"identifier":"PowerSwitch_3", "identifier":"PowerSwitch_3",
...@@ -204,7 +206,8 @@ ...@@ -204,7 +206,8 @@
}, },
"name":"电源开关", "name":"电源开关",
"accessMode":"rw", "accessMode":"rw",
"required":true "required":true,
"epNum":3
}, },
{ {
"identifier":"PowerSwitch_4", "identifier":"PowerSwitch_4",
...@@ -217,7 +220,8 @@ ...@@ -217,7 +220,8 @@
}, },
"name":"电源开关", "name":"电源开关",
"accessMode":"rw", "accessMode":"rw",
"required":true "required":true,
"epNum":4
}, },
{ {
"identifier":"NoDisturbMode", "identifier":"NoDisturbMode",
...@@ -230,7 +234,8 @@ ...@@ -230,7 +234,8 @@
}, },
"name":"勿扰模式开关", "name":"勿扰模式开关",
"accessMode":"rw", "accessMode":"rw",
"required":true "required":true,
"epNum":1
} }
], ],
"events":[ "events":[
......
...@@ -147,6 +147,7 @@ ...@@ -147,6 +147,7 @@
"name": "传感器故障告警", "name": "传感器故障告警",
"type": "alert", "type": "alert",
"required": true, "required": true,
"alarmbit":6,
"method": "thing.event.sensorAlarm.post", "method": "thing.event.sensorAlarm.post",
"outputData": [ "outputData": [
{ {
......
...@@ -244,8 +244,9 @@ ...@@ -244,8 +244,9 @@
"identifier": "BatteryAlarm", "identifier": "BatteryAlarm",
"method": "thing.event.BatteryAlarm.post", "method": "thing.event.BatteryAlarm.post",
"name": "BatteryAlarm", "name": "BatteryAlarm",
"type": "alarm", "type": "alert",
"required": true, "required": true,
"alarmbit":3,
"desc": "低电量告警" "desc": "低电量告警"
}, },
{ {
...@@ -254,6 +255,7 @@ ...@@ -254,6 +255,7 @@
"type": "alert", "type": "alert",
"required": true, "required": true,
"method": "thing.event.TamperAlarm.post", "method": "thing.event.TamperAlarm.post",
"alarmbit":2,
"outputData": [ "outputData": [
{ {
"identifier": "DismantleState", "identifier": "DismantleState",
...@@ -273,6 +275,7 @@ ...@@ -273,6 +275,7 @@
"name": "传感器故障告警", "name": "传感器故障告警",
"type": "alert", "type": "alert",
"required": true, "required": true,
"alarmbit":6,
"method": "thing.event.sensorAlarm.post", "method": "thing.event.sensorAlarm.post",
"outputData": [ "outputData": [
{ {
......
...@@ -147,6 +147,7 @@ ...@@ -147,6 +147,7 @@
"name": "传感器故障告警", "name": "传感器故障告警",
"type": "alert", "type": "alert",
"required": true, "required": true,
"alarmbit":6,
"method": "thing.event.sensorAlarm.post", "method": "thing.event.sensorAlarm.post",
"outputData": [ "outputData": [
{ {
......
...@@ -244,8 +244,9 @@ ...@@ -244,8 +244,9 @@
"identifier": "BatteryAlarm", "identifier": "BatteryAlarm",
"method": "thing.event.BatteryAlarm.post", "method": "thing.event.BatteryAlarm.post",
"name": "BatteryAlarm", "name": "BatteryAlarm",
"type": "alarm", "type": "alert",
"required": true, "required": true,
"alarmbit":3,
"desc": "低电量告警" "desc": "低电量告警"
}, },
{ {
...@@ -254,6 +255,7 @@ ...@@ -254,6 +255,7 @@
"type": "alert", "type": "alert",
"required": true, "required": true,
"method": "thing.event.TamperAlarm.post", "method": "thing.event.TamperAlarm.post",
"alarmbit":2,
"outputData": [ "outputData": [
{ {
"identifier": "DismantleState", "identifier": "DismantleState",
...@@ -273,6 +275,7 @@ ...@@ -273,6 +275,7 @@
"name": "传感器故障告警", "name": "传感器故障告警",
"type": "alert", "type": "alert",
"required": true, "required": true,
"alarmbit":6,
"method": "thing.event.sensorAlarm.post", "method": "thing.event.sensorAlarm.post",
"outputData": [ "outputData": [
{ {
......
{ {
"schema": "https://iot-ap.ikonke.com/model/product_3084.json", "schema": "https://iot-ap.ikonke.com/model/product_3084.json",
"productType": "sensor", "productType": "sensor",
"version": "1", "version": "1.0",
"profile": { "profile": {
"heartbeat": "300", "heartbeat": "300",
"productCode": "3084", "productCode": "3084",
......
{ {
"schema": "https://iot-ap.ikonke.com/model/product_3091.json", "schema": "https://iot-ap.ikonke.com/model/product_3091.json",
"productType": "lightPanel", "productType": "lightPanel",
"version": "1.0", "version": "1.1",
"profile": { "profile": {
"heartbeat": "300", "heartbeat": "300",
"productCode": "3091", "productCode": "3091",
......
{ {
"schema": "https://iot-ap.ikonke.com/model/product_3092.json", "schema": "https://iot-ap.ikonke.com/model/product_3092.json",
"productType": "lightPanel", "productType": "lightPanel",
"version": "1.0", "version": "1.1",
"profile": { "profile": {
"heartbeat": "300", "heartbeat": "300",
"productCode": "3092", "productCode": "3092",
......
{ {
"schema": "https://iot-ap.ikonke.com/model/product_3093.json", "schema": "https://iot-ap.ikonke.com/model/product_3093.json",
"productType": "lightPanel", "productType": "lightPanel",
"version": "1.0", "version": "1.1",
"profile": { "profile": {
"heartbeat": "300", "heartbeat": "300",
"productCode": "3093", "productCode": "3093",
......
{
"schema": "https://iot-ap.ikonke.com/model/product_3094.json",
"productType": "lightPanel",
"version": "1.1",
"profile": {
"heartbeat": "300",
"productCode": "3094",
"productName": "单路智能调光模块(KONKE)"
},
"services": [
{
"outputData": [],
"identifier": "set",
"inputData": [
{
"identifier": "PowerSwitch",
"dataType": {
"specs": {
"0": "关闭",
"1": "打开"
},
"type": "bool"
},
"name": "电源开关"
},
{
"identifier": "Brightness",
"dataType": {
"type": "int",
"specs": {
"min": "1",
"max": "100",
"unit": "%",
"unitName": "百分比",
"step": "1"
}
},
"name": "亮度"
},
{
"identifier": "ColorTemperature",
"dataType": {
"type": "int",
"specs": {
"min": "0",
"max": "100",
"unit": "K",
"unitName": "开尔文",
"step": "1"
}
},
"name": "色温"
},
{
"identifier": "FadeTime",
"dataType": {
"type": "int",
"specs": {
"min": "0",
"max": "254",
"unit": "s",
"unitName": "秒",
"step": "1"
}
},
"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",
"name": "set",
"required": true,
"callType": "async",
"desc": "属性设置"
},
{
"outputData": [
{
"identifier": "PowerSwitch",
"dataType": {
"specs": {
"0": "关闭",
"1": "打开"
},
"type": "bool"
},
"name": "电源开关"
},
{
"identifier": "Brightness",
"dataType": {
"type": "int",
"specs": {
"min": "1",
"max": "100",
"unit": "%",
"unitName": "百分比",
"step": "1"
}
},
"name": "亮度"
},
{
"identifier": "ColorTemperature",
"dataType": {
"type": "int",
"specs": {
"min": "0",
"max": "100",
"unit": "K",
"unitName": "开尔文",
"step": "1"
}
},
"name": "色温"
},
{
"identifier": "FadeTime",
"dataType": {
"type": "int",
"specs": {
"min": "0",
"max": "254",
"unit": "s",
"unitName": "秒",
"step": "1"
}
},
"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": "最高亮度"
}
],
"identifier": "get",
"inputData": [
"PowerSwitch",
"Brightness",
"ColorTemperature",
"FadeTime",
"LowBrightness",
"HighBrightness"
],
"method": "thing.service.property.get",
"name": "get",
"required": true,
"callType": "async",
"desc": "属性获取"
},
{
"outputData":[
],
"identifier":"negativeProperty",
"inputData":[
"PowerSwitch"
],
"method":"thing.service.negativeProperty",
"name":"negativeProperty",
"required":true,
"callType":"async",
"desc":"属性值取反"
}
],
"properties": [
{
"identifier": "PowerSwitch",
"dataType": {
"specs": {
"0": "关闭",
"1": "打开"
},
"type": "bool"
},
"name": "电源开关",
"accessMode": "rw",
"required": true
},
{
"identifier": "Brightness",
"name": "亮度",
"accessMode": "rw",
"required": false,
"dataType": {
"type": "int",
"specs": {
"min": "1",
"max": "100",
"unit": "%",
"unitName": "百分比",
"step": "1"
}
}
},
{
"identifier": "ColorTemperature",
"accessMode": "rw",
"required": false,
"dataType": {
"type": "int",
"specs": {
"min": "0",
"max": "100",
"unit": "K",
"unitName": "开尔文",
"step": "1"
}
},
"name": "色温"
},
{
"identifier": "FadeTime",
"accessMode": "rw",
"required": false,
"dataType": {
"type": "int",
"specs": {
"min": "0",
"max": "254",
"unit": "s",
"unitName": "秒",
"step": "1"
}
},
"name": "渐变时间"
},
{
"identifier": "LowBrightness",
"accessMode": "rw",
"required": false,
"dataType": {
"type": "int",
"specs": {
"min": "10",
"max": "90",
"unit": "%",
"unitName": "百分比",
"step": "1"
}
},
"name": "最低亮度"
},
{
"identifier": "HighBrightness",
"accessMode": "rw",
"required": false,
"dataType": {
"type": "int",
"specs": {
"min": "20",
"max": "100",
"unit": "%",
"unitName": "百分比",
"step": "1"
}
},
"name": "最高亮度"
}
],
"events": [
{
"outputData": [
{
"identifier": "PowerSwitch",
"dataType": {
"specs": {
"0": "关闭",
"1": "打开"
},
"type": "bool"
},
"name": "电源开关"
},
{
"identifier": "Brightness",
"dataType": {
"type": "int",
"specs": {
"min": "1",
"max": "100",
"unit": "%",
"unitName": "百分比",
"step": "1"
}
},
"name": "亮度"
},
{
"identifier": "ColorTemperature",
"dataType": {
"type": "int",
"specs": {
"min": "0",
"max": "100",
"unit": "K",
"unitName": "开尔文",
"step": "1"
}
},
"name": "色温"
},
{
"identifier": "FadeTime",
"dataType": {
"type": "int",
"specs": {
"min": "0",
"max": "254",
"unit": "s",
"unitName": "秒",
"step": "1"
}
},
"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": "最高亮度"
}
],
"identifier": "property",
"method": "thing.event.property.post",
"name": "property",
"type": "info",
"required": true,
"desc": "属性上报"
}
]
}
{ {
"schema": "https://iot-ap.ikonke.com/model/product_3095.json", "schema": "https://iot-ap.ikonke.com/model/product_3095.json",
"productType": "air condition", "productType": "airConditioning",
"version": "1.0", "version": "1.0",
"profile": { "profile": {
"heartbeat": "3000", "heartbeat": "3000",
......
1.1.0 1.1.1
\ No newline at end of file \ No newline at end of file
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