Commit 18bfccf5 authored by chen.weican's avatar chen.weican

【修改内容】增加调光灯系列相关配置

【提交人】陈伟灿
parent 89883e6e
1.4.1 1.4.2
\ No newline at end of file \ No newline at end of file
...@@ -943,6 +943,8 @@ void KK_Data_FromMid(void* str,int len, char* chalMark) ...@@ -943,6 +943,8 @@ void KK_Data_FromMid(void* str,int len, char* chalMark)
sleep(3); sleep(3);
INFO_PRINT("addDeviceToRoom_reply handle!!!"); INFO_PRINT("addDeviceToRoom_reply handle!!!");
device_add_sync(payload); device_add_sync(payload);
}else if(strstr(msgtype->valuestring,"/thing/service/removeDeviceFromRoom_reply")!= NULL){
kk_handle_sync_push_info();
}else if(strstr(msgtype->valuestring,"/thing/event/alarmNotify")!= NULL){ }else if(strstr(msgtype->valuestring,"/thing/event/alarmNotify")!= NULL){
INFO_PRINT("alarmNotify handle!!!"); INFO_PRINT("alarmNotify handle!!!");
cJSON * msgId = cJSON_GetObjectItem(payload, "msgId"); cJSON * msgId = cJSON_GetObjectItem(payload, "msgId");
......
...@@ -138,9 +138,9 @@ cJSON *kk_scene_build(SYN_SCENE_ITEM **content) ...@@ -138,9 +138,9 @@ cJSON *kk_scene_build(SYN_SCENE_ITEM **content)
if(content==NULL ||*content==NULL){ if(content==NULL ||*content==NULL){
return scene; return scene;
} }
//printf("--------------------------->[%s][%d]\n",__FUNCTION__,__LINE__);
cJSON *actions = kk_scene_actions_build(ptr->act,ptr->act_num); cJSON *actions = kk_scene_actions_build(ptr->act,ptr->act_num);
//printf("--------------------------->[%s][%d]\n",__FUNCTION__,__LINE__);
cJSON_AddItemToObject(scene, "actions",actions); cJSON_AddItemToObject(scene, "actions",actions);
cJSON_AddStringToObject(scene, "id",ptr->scene_id); cJSON_AddStringToObject(scene, "id",ptr->scene_id);
cJSON_AddStringToObject(scene, "name",ptr->name); cJSON_AddStringToObject(scene, "name",ptr->name);
...@@ -313,6 +313,7 @@ cJSON *kk_sync_scence_to_sdk(cJSON *root,cJSON *data) ...@@ -313,6 +313,7 @@ cJSON *kk_sync_scence_to_sdk(cJSON *root,cJSON *data)
} }
int size = kk_get_sceneTypeMap_table_size(); int size = kk_get_sceneTypeMap_table_size();
isMatch = 0;
for(k = 0; k < size; k++){ for(k = 0; k < size; k++){
//printf("---------------------------->producTypeMap[k].type:%s\n",producTypeMap[k].type); //printf("---------------------------->producTypeMap[k].type:%s\n",producTypeMap[k].type);
if(!strcmp(name->valuestring,sceneTypeMap[k].name)){ if(!strcmp(name->valuestring,sceneTypeMap[k].name)){
......
File mode changed from 100755 to 100644
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
#include "kk_utils.h" #include "kk_utils.h"
#include "kk_sync_data.h" #include "kk_sync_data.h"
int HAL_Get_ccuid(_OU_ char *device_code); int HAL_Get_ccuid(_OU_ char *device_code);
const char DM_MSG_REQUEST[] DM_READ_ONLY = "{\"msgId\":\"%s\",\"version\":\"%s\",\"params\":%s,\"time\":\"%lu\",\"method\":\"%s\"}"; const char DM_MSG_REQUEST[] DM_READ_ONLY = "{\"msgId\":\"%s\",\"version\":\"%s\",\"params\":%s,\"time\":\"%lld\",\"method\":\"%s\"}";
const char DM_MSG_INFO[] DM_READ_ONLY = "{\"msgtype\":\"%s\",\"productCode\":\"%s\",\"deviceCode\":\"%s\"}"; const char DM_MSG_INFO[] DM_READ_ONLY = "{\"msgtype\":\"%s\",\"productCode\":\"%s\",\"deviceCode\":\"%s\"}";
extern void kk_sendData2gw(void* data, int len, char* chalMark); extern void kk_sendData2gw(void* data, int len, char* chalMark);
void kk_sendData2app(void *info, void *payload,int isAsync){ void kk_sendData2app(void *info, void *payload,int isAsync){
...@@ -347,7 +347,7 @@ int dm_msg_status_online(_IN_ char productCode[PRODUCT_CODE_MAXLEN], ...@@ -347,7 +347,7 @@ int dm_msg_status_online(_IN_ char productCode[PRODUCT_CODE_MAXLEN],
} }
/* TimeStamp */ /* TimeStamp */
HAL_Snprintf(timestamp, DM_UTILS_UINT64_STRLEN, "%d", HAL_GetTime()); HAL_Snprintf(timestamp, DM_UTILS_UINT64_STRLEN, "%lld", HAL_GetTime_ms());
/* dm_log_debug("Time Stamp: %s", timestamp); */ /* dm_log_debug("Time Stamp: %s", timestamp); */
HAL_Get_ccuid(ccuid); HAL_Get_ccuid(ccuid);
...@@ -389,7 +389,7 @@ int dm_msg_status_offline(_IN_ char productCode[PRODUCT_CODE_MAXLEN], ...@@ -389,7 +389,7 @@ int dm_msg_status_offline(_IN_ char productCode[PRODUCT_CODE_MAXLEN],
} }
/* TimeStamp */ /* TimeStamp */
HAL_Snprintf(timestamp, DM_UTILS_UINT64_STRLEN, "%d", HAL_GetTime()); HAL_Snprintf(timestamp, DM_UTILS_UINT64_STRLEN, "%lld", HAL_GetTime_ms());
/* dm_log_debug("Time Stamp: %s", timestamp); */ /* dm_log_debug("Time Stamp: %s", timestamp); */
HAL_Get_ccuid(ccuid); HAL_Get_ccuid(ccuid);
...@@ -436,7 +436,7 @@ int dm_msg_combine_login(_IN_ char productCode[PRODUCT_CODE_MAXLEN], ...@@ -436,7 +436,7 @@ int dm_msg_combine_login(_IN_ char productCode[PRODUCT_CODE_MAXLEN],
} }
/* TimeStamp */ /* TimeStamp */
HAL_Snprintf(timestamp, DM_UTILS_UINT64_STRLEN, "%d", HAL_GetTime()); HAL_Snprintf(timestamp, DM_UTILS_UINT64_STRLEN, "%lld", HAL_GetTime_ms());
/* dm_log_debug("Time Stamp: %s", timestamp); */ /* dm_log_debug("Time Stamp: %s", timestamp); */
/* Client ID */ /* Client ID */
...@@ -572,7 +572,7 @@ int dm_msg_request (_IN_ dm_msg_request_t *request,_IN_ int isAsync) ...@@ -572,7 +572,7 @@ int dm_msg_request (_IN_ dm_msg_request_t *request,_IN_ int isAsync)
} }
memset(payload, 0, payload_len); memset(payload, 0, payload_len);
snprintf(payload, payload_len, DM_MSG_REQUEST, request->msgid, snprintf(payload, payload_len, DM_MSG_REQUEST, request->msgid,
DM_MSG_VERSION, request->params,HAL_GetTime(), request->method); DM_MSG_VERSION, request->params,HAL_GetTime_ms(), request->method);
req_info_len = strlen(DM_MSG_INFO)+10+strlen(request->productCode)+strlen(request->deviceCode)+strlen(request->msgTypeStr)+1; req_info_len = strlen(DM_MSG_INFO)+10+strlen(request->productCode)+strlen(request->deviceCode)+strlen(request->msgTypeStr)+1;
req_info = malloc(req_info_len); req_info = malloc(req_info_len);
...@@ -1272,7 +1272,7 @@ int kk_msg_cloud_status_notify(char *deviceCode,const char *productCode) ...@@ -1272,7 +1272,7 @@ int kk_msg_cloud_status_notify(char *deviceCode,const char *productCode)
iotx_report_id(msgId); iotx_report_id(msgId);
//sprintf(msgId,"%d",iotx_report_id()); //sprintf(msgId,"%d",iotx_report_id());
snprintf(payload, payload_len, DM_MSG_REQUEST, msgId, snprintf(payload, payload_len, DM_MSG_REQUEST, msgId,
DM_MSG_VERSION, paramStr,HAL_GetTime(), method); DM_MSG_VERSION, paramStr,HAL_GetTime_ms(), method);
cJSON *root=cJSON_CreateObject(); cJSON *root=cJSON_CreateObject();
cJSON* infoObj = cJSON_Parse(req_info); cJSON* infoObj = cJSON_Parse(req_info);
...@@ -1314,7 +1314,7 @@ int kk_msg_execute_property_set(const char *productCode,const char *deviceCode,c ...@@ -1314,7 +1314,7 @@ int kk_msg_execute_property_set(const char *productCode,const char *deviceCode,c
iotx_report_id(msgId); iotx_report_id(msgId);
//sprintf(msgId,"%d",iotx_report_id()); //sprintf(msgId,"%d",iotx_report_id());
snprintf(payload, payload_len, DM_MSG_REQUEST, msgId, snprintf(payload, payload_len, DM_MSG_REQUEST, msgId,
DM_MSG_VERSION, params,HAL_GetTime(), method); DM_MSG_VERSION, params,HAL_GetTime_ms(), method);
cJSON *root=cJSON_CreateObject(); cJSON *root=cJSON_CreateObject();
cJSON* infoObj = cJSON_Parse(req_info); cJSON* infoObj = cJSON_Parse(req_info);
...@@ -1391,7 +1391,7 @@ int kk_msg_execute_property_get(dm_mgr_dev_node_t *node) ...@@ -1391,7 +1391,7 @@ int kk_msg_execute_property_get(dm_mgr_dev_node_t *node)
iotx_report_id(msgId); iotx_report_id(msgId);
//sprintf(msgId,"%d",iotx_report_id()); //sprintf(msgId,"%d",iotx_report_id());
snprintf(payload, payload_len, DM_MSG_REQUEST, msgId, snprintf(payload, payload_len, DM_MSG_REQUEST, msgId,
DM_MSG_VERSION, paramS,HAL_GetTime(), method); DM_MSG_VERSION, paramS,HAL_GetTime_ms(), method);
cJSON *root=cJSON_CreateObject(); cJSON *root=cJSON_CreateObject();
cJSON* infoObj = cJSON_Parse(req_info); cJSON* infoObj = cJSON_Parse(req_info);
cJSON* payloadObj = cJSON_Parse(payload); cJSON* payloadObj = cJSON_Parse(payload);
...@@ -1472,7 +1472,7 @@ int kk_msg_execute_scene_set(const char* params,const char *fatherDeviceCode,int ...@@ -1472,7 +1472,7 @@ int kk_msg_execute_scene_set(const char* params,const char *fatherDeviceCode,int
iotx_report_id(msgId); iotx_report_id(msgId);
//sprintf(msgId,"%d",iotx_report_id()); //sprintf(msgId,"%d",iotx_report_id());
snprintf(payload, payload_len, DM_MSG_REQUEST, msgId, snprintf(payload, payload_len, DM_MSG_REQUEST, msgId,
DM_MSG_VERSION, params,HAL_GetTime(), method); DM_MSG_VERSION, params,HAL_GetTime_ms(), method);
cJSON *root=cJSON_CreateObject(); cJSON *root=cJSON_CreateObject();
cJSON* infoObj = cJSON_Parse(req_info); cJSON* infoObj = cJSON_Parse(req_info);
...@@ -1523,7 +1523,7 @@ int kk_msg_execute_scene_action(const char* params,const char *fatherDeviceCode) ...@@ -1523,7 +1523,7 @@ int kk_msg_execute_scene_action(const char* params,const char *fatherDeviceCode)
iotx_report_id(msgId); iotx_report_id(msgId);
//sprintf(msgId,"%d",iotx_report_id()); //sprintf(msgId,"%d",iotx_report_id());
snprintf(payload, payload_len, DM_MSG_REQUEST, msgId, snprintf(payload, payload_len, DM_MSG_REQUEST, msgId,
DM_MSG_VERSION, params,HAL_GetTime(), method); DM_MSG_VERSION, params,HAL_GetTime_ms(), method);
cJSON *root=cJSON_CreateObject(); cJSON *root=cJSON_CreateObject();
cJSON* infoObj = cJSON_Parse(req_info); cJSON* infoObj = cJSON_Parse(req_info);
...@@ -1574,7 +1574,7 @@ int kk_msg_execute_scene_delete(const char* params,const char *fatherDeviceCode) ...@@ -1574,7 +1574,7 @@ int kk_msg_execute_scene_delete(const char* params,const char *fatherDeviceCode)
//sprintf(msgId,"%d",iotx_report_id()); //sprintf(msgId,"%d",iotx_report_id());
//sprintf(msgId,"%d",iotx_report_id()); //sprintf(msgId,"%d",iotx_report_id());
snprintf(payload, payload_len, DM_MSG_REQUEST, msgId, snprintf(payload, payload_len, DM_MSG_REQUEST, msgId,
DM_MSG_VERSION, params,HAL_GetTime(), method); DM_MSG_VERSION, params,HAL_GetTime_ms(), method);
cJSON *root=cJSON_CreateObject(); cJSON *root=cJSON_CreateObject();
cJSON* infoObj = cJSON_Parse(req_info); cJSON* infoObj = cJSON_Parse(req_info);
......
...@@ -611,7 +611,7 @@ static productype_map_s producTypeMap[] = { ...@@ -611,7 +611,7 @@ static productype_map_s producTypeMap[] = {
{"AC_IndoorUnit","air conditioning gateway"}, {"AC_IndoorUnit","air conditioning gateway"},
{"FLOOR_HEATING","floorHeating"}, {"FLOOR_HEATING","floorHeating"},
{"FRESH_AIR","freshAir"}, {"FRESH_AIR","freshAir"},
{"AIR_SWITCH","airSwitch"}, {"AIR_SWITCH","airswitch gateway"},
}; };
int kk_get_product_type_table_size(void) int kk_get_product_type_table_size(void)
{ {
...@@ -670,6 +670,45 @@ static int _kk_indoor_air_handle(char* deviceCode, char *sceneId, char *property ...@@ -670,6 +670,45 @@ static int _kk_indoor_air_handle(char* deviceCode, char *sceneId, char *property
} }
return 0; return 0;
} }
static int _kk_air_switch_handle(char* deviceCode, char *sceneId, char *propertyName, char *propertyValue, char *type,int delay, char*gwDeviceCode)
{
int eplist[64] = {0};
char data[32] = {0};
int res = 0;
int i = 0;
int count = kk_subAirSwitch_query_epnums(deviceCode,eplist);
for(i = 0; i < count; i++){
if(strcmp(propertyName,"CustomAction") == 0){
#if 0
cJSON* json = cJSON_Parse(propertyValue);
if (json == NULL) {
return -1;
}
cJSON* Temperature = cJSON_GetObjectItem(json, "Temperature");
if(Temperature == NULL) { cJSON_Delete(json);return -1;}
memset(data,0x0,sizeof(data));
sprintf(data,"%f",Temperature->valuedouble);
_kk_indoor_air_info_handle(deviceCode,"Temperature",data,eplist[i],delay,gwDeviceCode,sceneId,type);
cJSON* WindSpeed = cJSON_GetObjectItem(json, "WindSpeed");
if(WindSpeed == NULL) { cJSON_Delete(json);return -1;}
memset(data,0x0,sizeof(data));
sprintf(data,"%d",WindSpeed->valueint);
_kk_indoor_air_info_handle(deviceCode,"WindSpeed",data,eplist[i],delay,gwDeviceCode,sceneId,type);
cJSON* WorkMode = cJSON_GetObjectItem(json, "WorkMode");
if(WorkMode == NULL){ cJSON_Delete(json);return -1;}
memset(data,0x0,sizeof(data));
sprintf(data,"%d",WorkMode->valueint);
_kk_indoor_air_info_handle(deviceCode,"WorkMode",data,eplist[i],delay,gwDeviceCode,sceneId,type);
cJSON_Delete(json);
#endif
}else{
_kk_indoor_air_info_handle(deviceCode,propertyName,propertyValue,eplist[i],delay,gwDeviceCode,sceneId,type);
}
}
return 0;
}
int kk_subDev_set_action_by_productType(const char *productType,const char *roomId,const char *sceneId,const char *propertyName,const char *propertyValue,const char *type,int delay) int kk_subDev_set_action_by_productType(const char *productType,const char *roomId,const char *sceneId,const char *propertyName,const char *propertyValue,const char *type,int delay)
{ {
int res = 0; int res = 0;
...@@ -715,10 +754,13 @@ int kk_subDev_set_action_by_productType(const char *productType,const char *room ...@@ -715,10 +754,13 @@ int kk_subDev_set_action_by_productType(const char *productType,const char *room
if (res != SUCCESS_RETURN) { if (res != SUCCESS_RETURN) {
continue; continue;
} }
if(strcmp(typeArray[k],"air conditioning gateway") == 0){ if(strcmp(typeArray[k],KK_DM_AIR_GATEWAY_TYPE) == 0){
_kk_indoor_air_handle(pDeviceCode,(char*)sceneId,(char*)propertyName,(char*)propertyValue,(char*)type,delay,node->fatherDeviceCode); _kk_indoor_air_handle(pDeviceCode,(char*)sceneId,(char*)propertyName,(char*)propertyValue,(char*)type,delay,node->fatherDeviceCode);
continue; continue;
} }else if(strcmp(typeArray[k],KK_DM_AIR_SWITCH_GATEWAY_TYPE) == 0){
_kk_air_switch_handle(pDeviceCode,(char*)sceneId,(char*)propertyName,(char*)propertyValue,(char*)type,delay,node->fatherDeviceCode);
continue;
}
for(idx = 0; idx < node->dev_shadow->property_number; idx++){ for(idx = 0; idx < node->dev_shadow->property_number; idx++){
property = (kk_tsl_data_t *)(node->dev_shadow->properties + idx); property = (kk_tsl_data_t *)(node->dev_shadow->properties + idx);
if(property == NULL){ if(property == NULL){
...@@ -758,7 +800,9 @@ int kk_subDev_set_action_by_productType(const char *productType,const char *room ...@@ -758,7 +800,9 @@ int kk_subDev_set_action_by_productType(const char *productType,const char *room
else if(strcmp(node->productCode,"3099") == 0 && info.epNum != 3){//新风多合一只处理第三路 else if(strcmp(node->productCode,"3099") == 0 && info.epNum != 3){//新风多合一只处理第三路
continue; continue;
} }
else if(strcmp(node->productCode,"3095") == 0 && info.epNum != 1){//线控器多合一只处理第一路
continue;
}
info.delay = delay; info.delay = delay;
kk_scene_action_add(node->fatherDeviceCode,sceneId,info); kk_scene_action_add(node->fatherDeviceCode,sceneId,info);
res = kk_scene_insert_scene_action(type,node->deviceCode,info.epNum, res = kk_scene_insert_scene_action(type,node->deviceCode,info.epNum,
......
...@@ -85,6 +85,10 @@ static cJSON * kk_get_room_devices(const char *roomId) ...@@ -85,6 +85,10 @@ static cJSON * kk_get_room_devices(const char *roomId)
dm_mgr_dev_node_t *node = NULL; dm_mgr_dev_node_t *node = NULL;
const char *selectCmd = "select * from AreaDevInfo WHERE roomId = '%s';"; const char *selectCmd = "select * from AreaDevInfo WHERE roomId = '%s';";
int res = 0; int res = 0;
cJSON *dev = NULL;
int airGw = 0;
int airSwitchGw = 0;
int airFreshGw = 0;
char *sqlCmd = NULL; char *sqlCmd = NULL;
sqlite3_stmt *stmt; sqlite3_stmt *stmt;
char *deviceCode = NULL; char *deviceCode = NULL;
...@@ -95,7 +99,7 @@ static cJSON * kk_get_room_devices(const char *roomId) ...@@ -95,7 +99,7 @@ static cJSON * kk_get_room_devices(const char *roomId)
sqlCmd = sqlite3_mprintf(selectCmd,roomId); sqlCmd = sqlite3_mprintf(selectCmd,roomId);
sqlite3_prepare_v2(ctx->pDb, sqlCmd, strlen(sqlCmd), &stmt, NULL); sqlite3_prepare_v2(ctx->pDb, sqlCmd, strlen(sqlCmd), &stmt, NULL);
while(sqlite3_step(stmt) == SQLITE_ROW){ while(sqlite3_step(stmt) == SQLITE_ROW){
cJSON *dev = cJSON_CreateObject();
char devName[64] = {0}; char devName[64] = {0};
deviceCode = (char*)sqlite3_column_text(stmt, DB_DEV_DEVICECODE); deviceCode = (char*)sqlite3_column_text(stmt, DB_DEV_DEVICECODE);
...@@ -106,9 +110,34 @@ static cJSON * kk_get_room_devices(const char *roomId) ...@@ -106,9 +110,34 @@ static cJSON * kk_get_room_devices(const char *roomId)
return NULL; return NULL;
} }
if(kk_check_multi_ep_num(deviceCode)){ if(kk_check_multi_ep_num(deviceCode)){
dev = cJSON_CreateObject();
cJSON_AddStringToObject(dev,KK_SYNC_SCENE_EPNUM_STR,epNum); cJSON_AddStringToObject(dev,KK_SYNC_SCENE_EPNUM_STR,epNum);
}else if(strcmp(node->productType,KK_DM_AIR_GATEWAY_TYPE) == 0 || strcmp(node->productType,KK_DM_FRESHAIR_GATEWAY_TYPE) == 0){ }else if(strcmp(node->productType,KK_DM_AIR_GATEWAY_TYPE) == 0){//空调网关只add网关本身
cJSON_AddStringToObject(dev,KK_SYNC_SCENE_EPNUM_STR,epNum); if(airGw == 0){
dev = cJSON_CreateObject();
cJSON_AddStringToObject(dev,KK_SYNC_SCENE_EPNUM_STR,"1");
airGw = 1;
}else{
continue;
}
}else if(strcmp(node->productType,KK_DM_FRESHAIR_GATEWAY_TYPE) == 0){
if(airFreshGw == 0){
dev = cJSON_CreateObject();
cJSON_AddStringToObject(dev,KK_SYNC_SCENE_EPNUM_STR,"1");
airFreshGw = 1;
}else{
continue;
}
}else if(strcmp(node->productType,KK_DM_AIR_SWITCH_GATEWAY_TYPE) == 0){
if(airSwitchGw == 0){
dev = cJSON_CreateObject();
cJSON_AddStringToObject(dev,KK_SYNC_SCENE_EPNUM_STR,"1");
airSwitchGw = 1;
}else{
continue;
}
}else{
dev = cJSON_CreateObject();
} }
cJSON_AddStringToObject(dev,KK_SYNC_DEVICECODE_STR,deviceCode); cJSON_AddStringToObject(dev,KK_SYNC_DEVICECODE_STR,deviceCode);
//cJSON_AddStringToObject(dev,KK_SYNC_SCENE_EPNUM_STR,epNum); //cJSON_AddStringToObject(dev,KK_SYNC_SCENE_EPNUM_STR,epNum);
...@@ -508,6 +537,53 @@ static cJSON *kk_get_subfreshair_properties_info(char *deviceCode) ...@@ -508,6 +537,53 @@ static cJSON *kk_get_subfreshair_properties_info(char *deviceCode)
sqlite3_finalize(stmt); sqlite3_finalize(stmt);
return obj; return obj;
} }
static cJSON *kk_get_subAirSwitch_properties_info(char *deviceCode)
{
char *sqlCmd = NULL;
//char *zErrMsg = 0;
sqlite3_stmt *stmt;
char *propertyStr = NULL;
char *valueStr = NULL;
int valueType = 0;
int eplist[65] = {0};
int count = 0,i = 0;
char *ptr = NULL;
kk_sync_ctx_t *ctx = _kk_sync_get_ctx();
if(deviceCode == NULL){
return NULL;
}
cJSON *obj = cJSON_CreateObject();
cJSON *eps = cJSON_CreateArray();
count = kk_subAirSwitch_query_epnums(deviceCode,eplist);
for(i = 0; i < count; i++){
sqlCmd = sqlite3_mprintf("select * from subAirSwitchProperties WHERE deviceCode = '%s' and epNum=%d;",deviceCode,eplist[i]);
sqlite3_prepare_v2(ctx->pDb, sqlCmd, strlen(sqlCmd), &stmt, NULL);
cJSON *propertyItem = cJSON_CreateObject();
cJSON_AddNumberToObject(propertyItem, "epNum",eplist[i]);
while(sqlite3_step(stmt) == SQLITE_ROW){
propertyStr = (char*)sqlite3_column_text(stmt, DB_SUBAIRSWITCH_IDENTIFITER);
valueType = sqlite3_column_int(stmt, DB_SUBAIRSWITCH_VALUETYPE);
valueStr = (char*)sqlite3_column_text(stmt, DB_SUBAIRSWITCH_VALUE);
if(valueType == KK_TSL_DATA_TYPE_TEXT){
cJSON_AddStringToObject(propertyItem, propertyStr, valueStr);
}else if(valueType == KK_TSL_DATA_TYPE_INT||
valueType == KK_TSL_DATA_TYPE_ENUM||
valueType == KK_TSL_DATA_TYPE_BOOL){
cJSON_AddNumberToObject(propertyItem, propertyStr, atoi(valueStr));
}else if(valueType == KK_TSL_DATA_TYPE_DOUBLE){
cJSON_AddNumberToObject(propertyItem, propertyStr, atof(valueStr));
}
}
cJSON_AddItemToArray(eps,propertyItem);
}
cJSON_AddItemToObject(obj, "eps", eps);
cJSON_AddNumberToObject(obj, "EpTotal", count);
cJSON_AddNumberToObject(obj, "CombineDeviceFlag", 1);
sqlite3_free(sqlCmd);
sqlite3_finalize(stmt);
return obj;
}
static cJSON * kk_get_properties_info_obj(char *deviceCode) static cJSON * kk_get_properties_info_obj(char *deviceCode)
{ {
char *sqlCmd = NULL; char *sqlCmd = NULL;
...@@ -714,6 +790,8 @@ static int kk_get_sub_devices_info(cJSON *gwdevicesItem,char *deviceCode) ...@@ -714,6 +790,8 @@ static int kk_get_sub_devices_info(cJSON *gwdevicesItem,char *deviceCode)
properties=kk_get_indoor_properties_info(subDeviceCode); properties=kk_get_indoor_properties_info(subDeviceCode);
}else if(strcmp(subproductType,KK_DM_FRESHAIR_GATEWAY_TYPE) == 0){ }else if(strcmp(subproductType,KK_DM_FRESHAIR_GATEWAY_TYPE) == 0){
properties=kk_get_subfreshair_properties_info(subDeviceCode); properties=kk_get_subfreshair_properties_info(subDeviceCode);
}else if(strcmp(subproductType,KK_DM_AIR_SWITCH_GATEWAY_TYPE) == 0){
properties=kk_get_subAirSwitch_properties_info(subDeviceCode);
}else{ }else{
properties=kk_get_properties_info_obj(subDeviceCode); properties=kk_get_properties_info_obj(subDeviceCode);
} }
...@@ -1099,7 +1177,7 @@ static int kk_get_scenes_trigger_info(cJSON *triggerObj,char *sceneId) ...@@ -1099,7 +1177,7 @@ static int kk_get_scenes_trigger_info(cJSON *triggerObj,char *sceneId)
cJSON *triggerAry; cJSON *triggerAry;
char *type = NULL; char *type = NULL;
int epNum = 0; int epNum = 0;
int isAnd = 0;
int week; int week;
int time; int time;
...@@ -1135,20 +1213,24 @@ static int kk_get_scenes_trigger_info(cJSON *triggerObj,char *sceneId) ...@@ -1135,20 +1213,24 @@ static int kk_get_scenes_trigger_info(cJSON *triggerObj,char *sceneId)
sqlCmd = sqlite3_mprintf("select * from SceneTriggerInfo where sceneId = %s",sceneId); sqlCmd = sqlite3_mprintf("select * from SceneTriggerInfo where sceneId = %s",sceneId);
sqlite3_prepare_v2(ctx->pDb, sqlCmd, strlen(sqlCmd), &stmt, NULL); sqlite3_prepare_v2(ctx->pDb, sqlCmd, strlen(sqlCmd), &stmt, NULL);
while(sqlite3_step(stmt) == SQLITE_ROW){ while(sqlite3_step(stmt) == SQLITE_ROW){
cJSON *triggerItem = cJSON_CreateObject();
deviceCode = (char*)sqlite3_column_text(stmt, DB_SCENETRIGGER_DEVICECODE); isAnd = sqlite3_column_int(stmt, DB_SCENETRIGGER_ISAND);
epNum = sqlite3_column_int(stmt, DB_SCENETRIGGER_EPNUM); if(isAnd == 0){
propertyName = (char*)sqlite3_column_text(stmt, DB_SCENETRIGGER_PROPERTYNAME); cJSON *triggerItem = cJSON_CreateObject();
compareType = (char*)sqlite3_column_text(stmt, DB_SCENETRIGGER_COMPARETYPE); deviceCode = (char*)sqlite3_column_text(stmt, DB_SCENETRIGGER_DEVICECODE);
compareValue = (char*)sqlite3_column_text(stmt, DB_SCENETRIGGER_COMPAREVALUE); epNum = sqlite3_column_int(stmt, DB_SCENETRIGGER_EPNUM);
type = (char*)sqlite3_column_text(stmt, DB_SCENETRIGGER_TYPE); propertyName = (char*)sqlite3_column_text(stmt, DB_SCENETRIGGER_PROPERTYNAME);
cJSON_AddStringToObject(triggerItem, "type", type); compareType = (char*)sqlite3_column_text(stmt, DB_SCENETRIGGER_COMPARETYPE);
cJSON_AddStringToObject(triggerItem, KK_SYNC_DEVICECODE_STR, (char*)deviceCode); compareValue = (char*)sqlite3_column_text(stmt, DB_SCENETRIGGER_COMPAREVALUE);
cJSON_AddNumberToObject(triggerItem, KK_SYNC_SCENE_EPNUM_STR, epNum); type = (char*)sqlite3_column_text(stmt, DB_SCENETRIGGER_TYPE);
cJSON_AddStringToObject(triggerItem, KK_SYNC_SCENE_PROPERTYNAME_STR, (char*)propertyName); cJSON_AddStringToObject(triggerItem, "type", type);
cJSON_AddStringToObject(triggerItem, KK_SYNC_SCENE_COMPARETYPE_STR, (char*)compareType); cJSON_AddStringToObject(triggerItem, KK_SYNC_DEVICECODE_STR, (char*)deviceCode);
cJSON_AddStringToObject(triggerItem, KK_SYNC_SCENE_COMPAREValue_STR, (char*)compareValue); cJSON_AddNumberToObject(triggerItem, KK_SYNC_SCENE_EPNUM_STR, epNum);
cJSON_AddItemToArray(triggerAry, triggerItem); cJSON_AddStringToObject(triggerItem, KK_SYNC_SCENE_PROPERTYNAME_STR, (char*)propertyName);
cJSON_AddStringToObject(triggerItem, KK_SYNC_SCENE_COMPARETYPE_STR, (char*)compareType);
cJSON_AddStringToObject(triggerItem, KK_SYNC_SCENE_COMPAREValue_STR, (char*)compareValue);
cJSON_AddItemToArray(triggerAry, triggerItem);
}
} }
......
...@@ -9,7 +9,7 @@ CFLAGS += -I$(TOP_DIR)/common/ev/include ...@@ -9,7 +9,7 @@ CFLAGS += -I$(TOP_DIR)/common/ev/include
CFLAGS += -I$(TOP_DIR)/common/api CFLAGS += -I$(TOP_DIR)/common/api
CFLAGS += -I$(TOP_DIR)/common/sqlite CFLAGS += -I$(TOP_DIR)/common/sqlite
CFLAGS += -I$(TOP_DIR)/src/tsl/tsl_handle CFLAGS += -I$(TOP_DIR)/src/tsl/tsl_handle
LDFLAGS += -lrt -Wl,-Bdynamic -lapi_com -liot_cjson -lkk_tsl LDFLAGS += -Wl,-Bdynamic -lapi_com -liot_cjson -lkk_tsl
LDFLAGS += -lm -lkk_hal LDFLAGS += -lm -lkk_hal
LDFLAGS += -lsqlite -ldl LDFLAGS += -lsqlite -ldl
......
...@@ -653,30 +653,40 @@ static int kk_alarm_notify_handle(dm_mgr_dev_node_t *node,char *identifier,char ...@@ -653,30 +653,40 @@ static int kk_alarm_notify_handle(dm_mgr_dev_node_t *node,char *identifier,char
cJSON *param = cJSON_CreateObject(); cJSON *param = cJSON_CreateObject();
if(strcmp(identifier,"BatteryAlarm") == 0){ if(strcmp(identifier,"BatteryAlarm") == 0){
cJSON_AddStringToObject(param, "LowBatteryState", "1"); cJSON_AddStringToObject(param, "LowBatteryState", "1");
needSave = 1; //needSave = 1;
}else if(strcmp(identifier,"DismantleState") == 0 && atoi(valueBuf) == 1){ }else if(strcmp(identifier,"DismantleState") == 0 && atoi(valueBuf) == 1){
cJSON_AddStringToObject(param, "DismantleState", "1"); cJSON_AddStringToObject(param, "DismantleState", "1");
needSave = 1; //needSave = 1;
}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){ }else if(strcmp(identifier,"GasSensorState") == 0 && atoi(valueBuf) == 1){
cJSON_AddStringToObject(param, "CommonAlarmState", "1"); cJSON_AddStringToObject(param, "CommonAlarmState", "1");
needSave = 1; //needSave = 1;
}else if(strcmp(identifier,"WaterSensorState") == 0 && atoi(valueBuf) == 1){ }else if(strcmp(identifier,"WaterSensorState") == 0 && atoi(valueBuf) == 1){
cJSON_AddStringToObject(param, "CommonAlarmState", "1"); cJSON_AddStringToObject(param, "CommonAlarmState", "1");
needSave = 1; //needSave = 1;
}else if(strcmp(identifier,"SosState") == 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){
cJSON_AddStringToObject(param, "DismantleState", "0");
} }
else if(strcmp(identifier,"SmokeSensorState") == 0 && atoi(valueBuf) == 0){ else if(strcmp(identifier,"SmokeSensorState") == 0 && atoi(valueBuf) == 0){
cJSON_AddStringToObject(param, "CommonAlarmState", "0");
} }
else if(strcmp(identifier,"GasSensorState") == 0 && atoi(valueBuf) == 0){ else if(strcmp(identifier,"GasSensorState") == 0 && atoi(valueBuf) == 0){
cJSON_AddStringToObject(param, "CommonAlarmState", "0");
} }
else if(strcmp(identifier,"WaterSensorState") == 0 && atoi(valueBuf) == 0){ else if(strcmp(identifier,"WaterSensorState") == 0 && atoi(valueBuf) == 0){
cJSON_AddStringToObject(param, "CommonAlarmState", "0");
}
else if(strcmp(identifier,"SosState") == 0 && atoi(valueBuf) == 0){
cJSON_AddStringToObject(param, "CommonAlarmState", "0");
} }
else{ else{
cJSON_AddStringToObject(param, "CommonAlarmState", "1"); cJSON_AddStringToObject(param, "CommonAlarmState", "1");
needSave = 1; //needSave = 1;
} }
cJSON_AddItemToObject(payload, "params", param); cJSON_AddItemToObject(payload, "params", param);
char *payload11=cJSON_Print(payload); char *payload11=cJSON_Print(payload);
......
...@@ -179,7 +179,29 @@ int kk_scene_db_init(void) ...@@ -179,7 +179,29 @@ int kk_scene_db_init(void)
_kk_scene_unlock(); _kk_scene_unlock();
return FAIL_RETURN; return FAIL_RETURN;
} }
#if 0
printf("-------------------------------eee-----------------------akdkkkkkkkkkkkkkkkkkkkk---\n");
sqlite3_stmt *stmt;
const char *pAlterPanelScene = "select * from sqlite_master WHERE name = 'QuickPanelScene' and sql like '%TTTEST%'";
sqlite3_prepare_v2(ctx->pDb, pAlterPanelScene, strlen(pAlterPanelScene), &stmt, NULL);
while(sqlite3_step(stmt) == SQLITE_ROW){
int count = sqlite3_column_count(stmt);
char* pSceneId = (char*)sqlite3_column_text(stmt, 4);
printf("pSceneId:%s\n",pSceneId);
}
printf("------------------------------------------------------akdkkkkkkkkkkkkkkkkkkkk---\n");
//const char *pAlterPanelScene = "ALTER TABLE QuickPanelScene ADD TTTEST varchar(255)";
if (sqlite3_exec(ctx->pDb, pAlterPanelScene, NULL, NULL, &pcErr) != SQLITE_OK)
{
ERROR_PRINT("Error creating table (%s)\n", pcErr);
sqlite3_free(pcErr);
//eUtils_LockUnlock(&sLock);
_kk_scene_unlock();
return FAIL_RETURN;
}
printf("-----------------------------------------111-------------akdkkkkkkkkkkkkkkkkkkkk---\n");
#endif
_kk_scene_unlock(); _kk_scene_unlock();
return SUCCESS_RETURN; return SUCCESS_RETURN;
} }
......
...@@ -680,12 +680,9 @@ int bodySensor_load(void) ...@@ -680,12 +680,9 @@ int bodySensor_load(void)
int sceneType = 0,isEnable = 0; int sceneType = 0,isEnable = 0;
sqlite3_stmt *stmt; sqlite3_stmt *stmt;
kk_scene_ctx_t *ctx = _kk_scene_get_ctx(); kk_scene_ctx_t *ctx = _kk_scene_get_ctx();
printf("-------2222222---------------->\n");
sqlCmd = sqlite3_mprintf("select * from SceneTriggerInfo WHERE propertyName='%s'","BodySensorNoActive"); sqlCmd = sqlite3_mprintf("select * from SceneTriggerInfo WHERE propertyName='%s'","BodySensorNoActive");
sqlite3_prepare_v2(ctx->pDb, sqlCmd, strlen(sqlCmd), &stmt, NULL); sqlite3_prepare_v2(ctx->pDb, sqlCmd, strlen(sqlCmd), &stmt, NULL);
while(sqlite3_step(stmt) == SQLITE_ROW){ while(sqlite3_step(stmt) == SQLITE_ROW){
printf("-------333333---------------->\n");
sceneId = (char*)sqlite3_column_text(stmt, DB_SCENETRIGGER_SCENEID); sceneId = (char*)sqlite3_column_text(stmt, DB_SCENETRIGGER_SCENEID);
deviceCode = (char*)sqlite3_column_text(stmt, DB_SCENETRIGGER_DEVICECODE); deviceCode = (char*)sqlite3_column_text(stmt, DB_SCENETRIGGER_DEVICECODE);
epNum = sqlite3_column_int(stmt, DB_SCENETRIGGER_EPNUM); epNum = sqlite3_column_int(stmt, DB_SCENETRIGGER_EPNUM);
...@@ -806,7 +803,9 @@ static int kk_scene_parse_trigger_detail(const char *type,const cJSON *item,cons ...@@ -806,7 +803,9 @@ static int kk_scene_parse_trigger_detail(const char *type,const cJSON *item,cons
cJSON *deviceCode,*epNum; cJSON *deviceCode,*epNum;
cJSON *propertyName,*compareType; cJSON *propertyName,*compareType;
cJSON *compareValue; cJSON *compareValue;
char propertyNameBuf[64] = {0};
int ep; int ep;
dm_mgr_dev_node_t *node = NULL;
if(type == NULL || item == NULL || sceneId == NULL){ if(type == NULL || item == NULL || sceneId == NULL){
return INVALID_PARAMETER; return INVALID_PARAMETER;
} }
...@@ -830,7 +829,6 @@ static int kk_scene_parse_trigger_detail(const char *type,const cJSON *item,cons ...@@ -830,7 +829,6 @@ static int kk_scene_parse_trigger_detail(const char *type,const cJSON *item,cons
compareValue = cJSON_GetObjectItem(item,MSG_SCENE_COMPAREVALUE); compareValue = cJSON_GetObjectItem(item,MSG_SCENE_COMPAREVALUE);
if(compareValue == NULL) return FAIL_RETURN; if(compareValue == NULL) return FAIL_RETURN;
if(!strcmp(propertyName->valuestring,"BodySensorNoActive")){ if(!strcmp(propertyName->valuestring,"BodySensorNoActive")){
if(!strcmp(compareValue->valuestring,"0")){ if(!strcmp(compareValue->valuestring,"0")){
res = kk_scene_insert_scene_trigger(type,deviceCode->valuestring,ep, res = kk_scene_insert_scene_trigger(type,deviceCode->valuestring,ep,
...@@ -841,8 +839,44 @@ static int kk_scene_parse_trigger_detail(const char *type,const cJSON *item,cons ...@@ -841,8 +839,44 @@ static int kk_scene_parse_trigger_detail(const char *type,const cJSON *item,cons
propertyName->valuestring,compareType->valuestring,compareValue->valuestring,sceneId,isAnd); propertyName->valuestring,compareType->valuestring,compareValue->valuestring,sceneId,isAnd);
} }
}else{ }else{
res = dm_mgr_get_device_by_devicecode(deviceCode->valuestring,&node);
if (res != SUCCESS_RETURN) {
ERROR_PRINT("kk_scene_parse_scene_trigger fail!!!\n");
return res;
}
if(strcmp(node->productCode,"3098") == 0){//风机盘管多合一默认处理第一路
if(strstr(propertyName->valuestring,"_") == NULL){
sprintf(propertyNameBuf,"%s_%d",propertyName->valuestring,1);
ep = 1;
}else{
memcpy(propertyNameBuf,propertyName->valuestring,strlen(propertyName->valuestring));
}
}else if(strcmp(node->productCode,"3097") == 0){//地暖多合一默认处理第二路
if(strstr(propertyName->valuestring,"_") == NULL){
sprintf(propertyNameBuf,"%s_%d",propertyName->valuestring,2);
ep = 2;
}else{
memcpy(propertyNameBuf,propertyName->valuestring,strlen(propertyName->valuestring));
}
}else if(strcmp(node->productCode,"3099") == 0){//新风多合一默认处理第三路
if(strstr(propertyName->valuestring,"_") == NULL){
sprintf(propertyNameBuf,"%s_%d",propertyName->valuestring,3);
ep = 3;
}else{
memcpy(propertyNameBuf,propertyName->valuestring,strlen(propertyName->valuestring));
}
}else if(strcmp(node->productCode,"3095") == 0){//线控器多合一默认处理第一路
if(strstr(propertyName->valuestring,"_") == NULL){
sprintf(propertyNameBuf,"%s_%d",propertyName->valuestring,1);
ep = 1;
}else{
memcpy(propertyNameBuf,propertyName->valuestring,strlen(propertyName->valuestring));
}
}else{
memcpy(propertyNameBuf,propertyName->valuestring,strlen(propertyName->valuestring));
}
res = kk_scene_insert_scene_trigger(type,deviceCode->valuestring,ep, res = kk_scene_insert_scene_trigger(type,deviceCode->valuestring,ep,
propertyName->valuestring,compareType->valuestring,compareValue->valuestring,sceneId,isAnd); propertyNameBuf,compareType->valuestring,compareValue->valuestring,sceneId,isAnd);
} }
if(res != SUCCESS_RETURN){ if(res != SUCCESS_RETURN){
...@@ -1208,9 +1242,20 @@ int kk_scene_parse_scene_action(const cJSON* str,const char *sceneId,int isUpdat ...@@ -1208,9 +1242,20 @@ int kk_scene_parse_scene_action(const cJSON* str,const char *sceneId,int isUpdat
memset(propertyValueStr,0x0,sizeof(propertyValueStr)); memset(propertyValueStr,0x0,sizeof(propertyValueStr));
if(propertyValue->type==cJSON_Number){ if(propertyValue->type==cJSON_Number){
snprintf(propertyValueStr,sizeof(propertyValueStr),"%d",propertyValue->valueint); snprintf(propertyValueStr,sizeof(propertyValueStr),"%d",propertyValue->valueint);
}else{ }else if(propertyValue->type==cJSON_Object){
if(strcmp(propertyName->valuestring,"LightStripSpecialAction") == 0){
cJSON * Brightness = cJSON_GetObjectItem(propertyValue,"Brightness");
if(Brightness != NULL && Brightness->type==cJSON_Number){
snprintf(propertyValueStr,sizeof(propertyValueStr),"%d",Brightness->valueint);
}
}else{
char *str = cJSON_PrintUnformatted(propertyValue);
snprintf(propertyValueStr,sizeof(propertyValueStr),"%s",str);
free(str);
}
}else if(propertyValue->type==cJSON_String){
memcpy(propertyValueStr,propertyValue->valuestring,strlen(propertyValue->valuestring)); memcpy(propertyValueStr,propertyValue->valuestring,strlen(propertyValue->valuestring));
} }
if(strcmp(propertyName->valuestring,"ArmingState") == 0){ if(strcmp(propertyName->valuestring,"ArmingState") == 0){
ArmingStateFlag = 1; ArmingStateFlag = 1;
} }
...@@ -1235,14 +1280,12 @@ int kk_scene_parse_scene_action(const cJSON* str,const char *sceneId,int isUpdat ...@@ -1235,14 +1280,12 @@ int kk_scene_parse_scene_action(const cJSON* str,const char *sceneId,int isUpdat
item = item->next; item = item->next;
continue; continue;
} }
if(kk_subDev_check_scene_support(node->fatherDeviceCode) == 1 && ArmingStateFlag == 0){ if(kk_subDev_check_scene_support(node->fatherDeviceCode) == 1 && ArmingStateFlag == 0){
kk_scene_action_detail_t info = {0}; kk_scene_action_detail_t info = {0};
memset(propertyValueStr,0,sizeof(propertyValueStr));
memcpy(info.deviceCode,node->deviceCode,strlen(node->deviceCode)); memcpy(info.deviceCode,node->deviceCode,strlen(node->deviceCode));
//多合一面板需要根据epnum重新设置propertyName //多合一面板需要根据epnum重新设置propertyName
if(strcmp(node->productCode,"3098") == 0 || strcmp(node->productCode,"3099") == 0 || if(strcmp(node->productCode,"3098") == 0 || strcmp(node->productCode,"3099") == 0 ||
strcmp(node->productCode,"3097") == 0){ strcmp(node->productCode,"3097") == 0 ||strcmp(node->productCode,"3095") == 0 ){
sprintf(info.propertyName,"%s_%d",propertyName->valuestring,iepnum); sprintf(info.propertyName,"%s_%d",propertyName->valuestring,iepnum);
}else if(strcmp(node->productCode,"5004") == 0){ }else if(strcmp(node->productCode,"5004") == 0){
if(strstr(propertyName->valuestring,"_") == NULL){ if(strstr(propertyName->valuestring,"_") == NULL){
...@@ -1251,16 +1294,11 @@ int kk_scene_parse_scene_action(const cJSON* str,const char *sceneId,int isUpdat ...@@ -1251,16 +1294,11 @@ int kk_scene_parse_scene_action(const cJSON* str,const char *sceneId,int isUpdat
memcpy(info.propertyName,propertyName->valuestring,strlen(propertyName->valuestring)); memcpy(info.propertyName,propertyName->valuestring,strlen(propertyName->valuestring));
} }
}else{ }else{
memcpy(info.propertyName,propertyName->valuestring,strlen(propertyName->valuestring)); if(strcmp(propertyName->valuestring,"LightStripSpecialAction") == 0){
} memcpy(info.propertyName,"Brightness",strlen("Brightness"));
if(propertyValue->type==cJSON_Number){ }else{
snprintf(propertyValueStr,sizeof(propertyValueStr),"%d",propertyValue->valueint); memcpy(info.propertyName,propertyName->valuestring,strlen(propertyName->valuestring));
}else if(propertyValue->type==cJSON_String){ }
snprintf(propertyValueStr,sizeof(propertyValueStr),"%s",propertyValue->valuestring);
}else{
char *str = cJSON_PrintUnformatted(propertyValue);
snprintf(propertyValueStr,sizeof(propertyValueStr),"%s",str);
free(str);
} }
memcpy(info.propertyValue,propertyValueStr,strlen(propertyValueStr)); memcpy(info.propertyValue,propertyValueStr,strlen(propertyValueStr));
info.epNum = iepnum; info.epNum = iepnum;
......
...@@ -1278,7 +1278,7 @@ ...@@ -1278,7 +1278,7 @@
"type": "ZR", "type": "ZR",
"ota": true, "ota": true,
"b_pid": 3073, "b_pid": 3073,
"productType": "lightPanel", "productType": "colorDimmableLight",
"eps": [ "eps": [
{ {
...@@ -2684,7 +2684,7 @@ ...@@ -2684,7 +2684,7 @@
"type": "ZR", "type": "ZR",
"ota": true, "ota": true,
"b_pid": 3177, "b_pid": 3177,
"productType": "lightPanel", "productType": "colorDimmableLight",
"eps": [ "eps": [
{ {
......
{
"productCode":"3018",
"operateType":"506",
"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
{
"productCode":"3028",
"operateType":"507",
"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
{
"productCode":"3068",
"operateType":"1003",
"channel":1,
"newccu":[
{
"identifier":"OperationMode",
"opcodemap":"SWITCH",
"dataType":"int",
"channel":"1",
"valueRange":[0,1,2],
"value": 2
}
],
"oldccu":[
{
"opcode":"SWITCH",
"identifiermap":"OperationMode",
"dataType":"map",
"channel":"1",
"valueRange":["CLOSE","OPEN","STOP"]
}
]
}
\ No newline at end of file
{
"productCode":"3166",
"operateType":"507",
"channel":4,
"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":"PowerSwitch",
"opcodemap":"SWITCH",
"dataType":"int",
"channel":"2",
"valueRange":[0,1],
"value": 0
},{
"identifier":"Brightness",
"opcodemap":"ADJUST_LUMINANCE",
"dataType":"int",
"channel":"2",
"valueRange":[],
"value": 0
},{
"identifier":"PowerSwitch",
"opcodemap":"SWITCH",
"dataType":"int",
"channel":"3",
"valueRange":[0,1],
"value": 0
},{
"identifier":"Brightness",
"opcodemap":"ADJUST_LUMINANCE",
"dataType":"int",
"channel":"3",
"valueRange":[],
"value": 0
},{
"identifier":"PowerSwitch",
"opcodemap":"SWITCH",
"dataType":"int",
"channel":"4",
"valueRange":[0,1],
"value": 0
},{
"identifier":"Brightness",
"opcodemap":"ADJUST_LUMINANCE",
"dataType":"int",
"channel":"4",
"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":"SWITCH",
"identifiermap":"PowerSwitch",
"dataType":"map",
"channel":"2",
"valueRange":["OFF","ON"],
"syn":"on",
"synType":"bool"
},{
"opcode":"ADJUST_LUMINANCE",
"identifiermap":"Brightness",
"dataType":"int",
"channel":"2",
"valueRange":[],
"syn":"bri",
"synType":"int"
},{
"opcode":"SWITCH",
"identifiermap":"PowerSwitch",
"dataType":"map",
"channel":"3",
"valueRange":["OFF","ON"],
"syn":"on",
"synType":"bool"
},{
"opcode":"ADJUST_LUMINANCE",
"identifiermap":"Brightness",
"dataType":"int",
"channel":"3",
"valueRange":[],
"syn":"bri",
"synType":"int"
},{
"opcode":"SWITCH",
"identifiermap":"PowerSwitch",
"dataType":"map",
"channel":"4",
"valueRange":["OFF","ON"],
"syn":"on",
"synType":"bool"
},{
"opcode":"ADJUST_LUMINANCE",
"identifiermap":"Brightness",
"dataType":"int",
"channel":"4",
"valueRange":[],
"syn":"bri",
"synType":"int"
}
]
}
\ No newline at end of file
{
"productCode":"3167",
"operateType":"515",
"channel":4,
"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":"ColorTemperature",
"opcodemap":"ADJUST_COLOUR_TEMPERATURE",
"dataType":"int",
"channel":"1",
"valueRange":[],
"value": 0
},{
"identifier":"PowerSwitch",
"opcodemap":"SWITCH",
"dataType":"int",
"channel":"2",
"valueRange":[0,1],
"value": 0
},{
"identifier":"Brightness",
"opcodemap":"ADJUST_LUMINANCE",
"dataType":"int",
"channel":"2",
"valueRange":[],
"value": 0
},{
"identifier":"ColorTemperature",
"opcodemap":"ADJUST_COLOUR_TEMPERATURE",
"dataType":"int",
"channel":"2",
"valueRange":[],
"value": 0
},{
"identifier":"PowerSwitch",
"opcodemap":"SWITCH",
"dataType":"int",
"channel":"3",
"valueRange":[0,1],
"value": 0
},{
"identifier":"Brightness",
"opcodemap":"ADJUST_LUMINANCE",
"dataType":"int",
"channel":"3",
"valueRange":[],
"value": 0
},{
"identifier":"ColorTemperature",
"opcodemap":"ADJUST_COLOUR_TEMPERATURE",
"dataType":"int",
"channel":"3",
"valueRange":[],
"value": 0
},{
"identifier":"PowerSwitch",
"opcodemap":"SWITCH",
"dataType":"int",
"channel":"4",
"valueRange":[0,1],
"value": 0
},{
"identifier":"Brightness",
"opcodemap":"ADJUST_LUMINANCE",
"dataType":"int",
"channel":"4",
"valueRange":[],
"value": 0
},{
"identifier":"ColorTemperature",
"opcodemap":"ADJUST_COLOUR_TEMPERATURE",
"dataType":"int",
"channel":"4",
"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_COLOUR_TEMPERATURE",
"identifiermap":"ColorTemperature",
"dataType":"int",
"channel":"1",
"valueRange":[],
"syn":"colour_temperature",
"synType":"int"
},{
"opcode":"SWITCH",
"identifiermap":"PowerSwitch",
"dataType":"map",
"channel":"2",
"valueRange":["OFF","ON"],
"syn":"on",
"synType":"bool"
},{
"opcode":"ADJUST_LUMINANCE",
"identifiermap":"Brightness",
"dataType":"int",
"channel":"2",
"valueRange":[],
"syn":"bri",
"synType":"int"
},{
"opcode":"ADJUST_COLOUR_TEMPERATURE",
"identifiermap":"ColorTemperature",
"dataType":"int",
"channel":"2",
"valueRange":[],
"syn":"colour_temperature",
"synType":"int"
},{
"opcode":"SWITCH",
"identifiermap":"PowerSwitch",
"dataType":"map",
"channel":"3",
"valueRange":["OFF","ON"],
"syn":"on",
"synType":"bool"
},{
"opcode":"ADJUST_LUMINANCE",
"identifiermap":"Brightness",
"dataType":"int",
"channel":"3",
"valueRange":[],
"syn":"bri",
"synType":"int"
},{
"opcode":"ADJUST_COLOUR_TEMPERATURE",
"identifiermap":"ColorTemperature",
"dataType":"int",
"channel":"3",
"valueRange":[],
"syn":"colour_temperature",
"synType":"int"
},{
"opcode":"SWITCH",
"identifiermap":"PowerSwitch",
"dataType":"map",
"channel":"4",
"valueRange":["OFF","ON"],
"syn":"on",
"synType":"bool"
},{
"opcode":"ADJUST_LUMINANCE",
"identifiermap":"Brightness",
"dataType":"int",
"channel":"4",
"valueRange":[],
"syn":"bri",
"synType":"int"
},{
"opcode":"ADJUST_COLOUR_TEMPERATURE",
"identifiermap":"ColorTemperature",
"dataType":"int",
"channel":"4",
"valueRange":[],
"syn":"colour_temperature",
"synType":"int"
}
]
}
\ No newline at end of file
{
"productCode":"3168",
"operateType":"507",
"channel":4,
"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":"PowerSwitch",
"opcodemap":"SWITCH",
"dataType":"int",
"channel":"2",
"valueRange":[0,1],
"value": 0
},{
"identifier":"Brightness",
"opcodemap":"ADJUST_LUMINANCE",
"dataType":"int",
"channel":"2",
"valueRange":[],
"value": 0
},{
"identifier":"PowerSwitch",
"opcodemap":"SWITCH",
"dataType":"int",
"channel":"3",
"valueRange":[0,1],
"value": 0
},{
"identifier":"Brightness",
"opcodemap":"ADJUST_LUMINANCE",
"dataType":"int",
"channel":"3",
"valueRange":[],
"value": 0
},{
"identifier":"PowerSwitch",
"opcodemap":"SWITCH",
"dataType":"int",
"channel":"4",
"valueRange":[0,1],
"value": 0
},{
"identifier":"Brightness",
"opcodemap":"ADJUST_LUMINANCE",
"dataType":"int",
"channel":"4",
"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":"SWITCH",
"identifiermap":"PowerSwitch",
"dataType":"map",
"channel":"2",
"valueRange":["OFF","ON"],
"syn":"on",
"synType":"bool"
},{
"opcode":"ADJUST_LUMINANCE",
"identifiermap":"Brightness",
"dataType":"int",
"channel":"2",
"valueRange":[],
"syn":"bri",
"synType":"int"
},{
"opcode":"SWITCH",
"identifiermap":"PowerSwitch",
"dataType":"map",
"channel":"3",
"valueRange":["OFF","ON"],
"syn":"on",
"synType":"bool"
},{
"opcode":"ADJUST_LUMINANCE",
"identifiermap":"Brightness",
"dataType":"int",
"channel":"3",
"valueRange":[],
"syn":"bri",
"synType":"int"
},{
"opcode":"SWITCH",
"identifiermap":"PowerSwitch",
"dataType":"map",
"channel":"4",
"valueRange":["OFF","ON"],
"syn":"on",
"synType":"bool"
},{
"opcode":"ADJUST_LUMINANCE",
"identifiermap":"Brightness",
"dataType":"int",
"channel":"4",
"valueRange":[],
"syn":"bri",
"synType":"int"
}
]
}
\ No newline at end of file
{
"productCode":"3169",
"operateType":"515",
"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":"ColorTemperature",
"opcodemap":"ADJUST_COLOUR_TEMPERATURE",
"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_COLOUR_TEMPERATURE",
"identifiermap":"ColorTemperature",
"dataType":"int",
"channel":"1",
"valueRange":[],
"syn":"colour_temperature",
"synType":"int"
}
]
}
\ No newline at end of file
{
"productCode":"3170",
"operateType":"507",
"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
{
"productCode":"3171",
"operateType":"515",
"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":"ColorTemperature",
"opcodemap":"ADJUST_COLOUR_TEMPERATURE",
"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_COLOUR_TEMPERATURE",
"identifiermap":"ColorTemperature",
"dataType":"int",
"channel":"1",
"valueRange":[],
"syn":"colour_temperature",
"synType":"int"
}
]
}
\ No newline at end of file
{
"productCode":"3172",
"operateType":"507",
"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
{
"productCode":"3173",
"operateType":"515",
"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":"ColorTemperature",
"opcodemap":"ADJUST_COLOUR_TEMPERATURE",
"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_COLOUR_TEMPERATURE",
"identifiermap":"ColorTemperature",
"dataType":"int",
"channel":"1",
"valueRange":[],
"syn":"colour_temperature",
"synType":"int"
}
]
}
\ No newline at end of file
{
"productCode":"3174",
"operateType":"507",
"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
{
"productCode":"3175",
"operateType":"515",
"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":"ColorTemperature",
"opcodemap":"ADJUST_COLOUR_TEMPERATURE",
"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_COLOUR_TEMPERATURE",
"identifiermap":"ColorTemperature",
"dataType":"int",
"channel":"1",
"valueRange":[],
"syn":"colour_temperature",
"synType":"int"
}
]
}
\ No newline at end of file
{
"productCode":"3176",
"operateType":"507",
"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
{
"productCode":"3177",
"operateType":"516",
"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":"ColorTemperature",
"opcodemap":"ADJUST_COLOUR_TEMPERATURE",
"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_COLOUR_TEMPERATURE",
"identifiermap":"ColorTemperature",
"dataType":"int",
"channel":"1",
"valueRange":[],
"syn":"colour_temperature",
"synType":"int"
}
]
}
\ No newline at end of file
{
"productCode":"3178",
"operateType":"514",
"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":"ColorTemperature",
"opcodemap":"ADJUST_COLOUR_TEMPERATURE",
"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_COLOUR_TEMPERATURE",
"identifiermap":"ColorTemperature",
"dataType":"int",
"channel":"1",
"valueRange":[],
"syn":"colour_temperature",
"synType":"int"
}
]
}
\ No newline at end of file
{
"productCode":"3191",
"operateType":"515",
"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":"ColorTemperature",
"opcodemap":"ADJUST_COLOUR_TEMPERATURE",
"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_COLOUR_TEMPERATURE",
"identifiermap":"ColorTemperature",
"dataType":"int",
"channel":"1",
"valueRange":[],
"syn":"colour_temperature",
"synType":"int"
}
]
}
\ No newline at end of file
{ {
"schema": "https://iot-ap.ikonke.com/model/gateway_2.json", "schema": "https://iot-ap.ikonke.com/model/gateway_2.json",
"productType":"gw", "productType": "gw",
"profile":{ "profile":
"heartbeat": "300", {
"productCode": "2", "heartbeat": "3000",
"productName": "网关" "productCode": "2",
"productName": "网关"
}, },
"properties":[ "properties":
[
{ {
"identifier":"NetChannelState", "identifier": "NetChannelState",
"dataType":{ "dataType":
"specs":{ {
"0":"关闭", "specs":
"1":"打开" {
}, "0": "关闭",
"type":"bool" "1": "打开"
},
"name":"组网通道状态",
"accessMode":"rw",
"required":true
},
{
"identifier":"WhiteListState",
"dataType":{
"specs":{
"0":"关闭",
"1":"打开"
},
"type":"bool"
},
"name":"白名单状态",
"accessMode":"rw",
"required":false
},
{
"identifier":"OnlineDetectionState",
"dataType":{
"specs":{
"0":"关闭",
"1":"打开"
},
"type":"bool"
},
"name":"在线侦测开关状态",
"accessMode":"rw",
"required":false
},
{
"identifier":"SN",
"dataType":{
"specs":{
"length":"50"
},
"type":"text"
},
"name":"设备SN",
"accessMode":"r",
"required":false
},
{
"identifier":"IPAddress",
"dataType":{
"specs":{
"length":"255"
}, },
"type":"text" "type": "bool"
}, },
"name":"IP地址", "name": "组网通道状态",
"accessMode":"r", "accessMode": "rw",
"required":false "required": true
}, },
{ {
"identifier":"MACAddress", "identifier": "sn",
"dataType":{ "dataType":
"specs":{ {
"length":"128" "specs":
{
"length": "50"
}, },
"type":"text" "type": "text"
}, },
"name":"MAC地址", "name": "设备sn",
"accessMode":"r", "accessMode": "r",
"required":false "required": false
}, },
{ {
"identifier":"Port", "identifier": "mac",
"dataType":{ "dataType":
"specs":{ {
"min":"0", "specs":
"max":"65535", {
"step":"1" "length": "128"
}, },
"type":"int" "type": "text"
}, },
"name":"网关通信端口号", "name": "mac地址",
"accessMode":"r", "accessMode": "r",
"required":false "required": false
}, },
{ {
"identifier":"Version", "identifier": "version",
"dataType":{ "dataType":
"specs":{ {
"length":"255" "specs":
},
"type":"text"
},
"name":"版本",
"accessMode":"r",
"required":false
}],
"services":[
{
"outputData":[
],
"identifier":"set",
"inputData":[
{ {
"identifier":"NetChannelState", "length": "255"
"dataType":{
"specs":{
"0":"关闭",
"1":"打开"
},
"type":"bool"
},
"name":"组网通道状态"
}, },
{ "type": "text"
"identifier":"WhiteListState", },
"dataType":{ "name": "版本",
"specs":{ "accessMode": "r",
"0":"关闭", "required": false
"1":"打开"
},
"type":"bool"
},
"name":"白名单状态"
},
{
"identifier":"OnlineDetectionState",
"dataType":{
"specs":{
"0":"关闭",
"1":"打开"
},
"type":"bool"
},
"name":"在线侦测开关状态"
}],
"method":"thing.service.property.set",
"name":"set",
"required":true,
"callType":"async",
"desc":"属性设置"
}, },
{ {
"outputData":[ "identifier": "name",
{ "dataType":
"identifier":"NetChannelState", {
"dataType":{ "specs":
"specs":{
"0":"关闭",
"1":"打开"
},
"type":"bool"
},
"name":"组网通道状态"
},
{
"identifier":"WhiteListState",
"dataType":{
"specs":{
"0":"关闭",
"1":"打开"
},
"type":"bool"
},
"name":"白名单状态"
},
{
"identifier":"OnlineDetectionState",
"dataType":{
"specs":{
"0":"关闭",
"1":"打开"
},
"type":"bool"
},
"name":"在线侦测开关状态"
},
{
"identifier":"SN",
"dataType":{
"specs":{
"length":"50"
},
"type":"text"
},
"name":"设备SN"
},
{
"identifier":"IPAddress",
"dataType":{
"specs":{
"length":"255"
},
"type":"text"
},
"name":"IP地址"
},
{ {
"identifier":"MACAddress", "length": "255"
"dataType":{
"specs":{
"length":"128"
},
"type":"text"
},
"name":"MAC地址"
}, },
{ "type": "text"
"identifier":"Port", },
"dataType":{ "name": "网关名称",
"specs":{ "accessMode": "rw",
"min":"0", "required": false
"max":"65535", }
"step":"1" ],
}, "services":
"type":"int" [
}, {
"name":"网关通信端口号" "outputData":
}, [],
{ "identifier": "set",
"identifier":"Version", "inputData":
"dataType":{ [
"specs":{ {
"length":"255" "identifier": "NetChannelState",
}, "dataType":
"type":"text" {
}, "specs":
"name":"版本", {
"accessMode":"r" "0": "关闭",
}], "1": "打开"
"identifier":"get", },
"inputData":[ "type": "bool"
"NetChannelState", },
"WhiteListState", "name": "组网通道状态"
"OnlineDetectionState", },
"SN", {
"IPAddress", "identifier": "name",
"MACAddress", "dataType":
"Port", {
"Version"], "specs":
"method":"thing.service.property.get", {
"name":"get", "length": "255"
"required":true, },
"callType":"async", "type": "text"
"desc":"属性获取" },
}, "name": "网关名称"
{ }
"outputData":[
],
"identifier":"restoreFactory",
"inputData":[
],
"method":"thing.service.restoreFactory",
"name":"restoreFactory",
"required":false,
"callType":"async",
"desc":"恢复出厂设置"
},
{
"outputData":[
],
"identifier":"addWhiteList",
"inputData":[
{
"identifier":"Devices",
"dataType":{
"specs":{
"item":{
"specs":[
{
"identifier":"MACAddress",
"dataType":{
"specs":{
"length":"128"
},
"type":"text"
},
"name":"MAC地址"
},
{
"identifier":"ProductId",
"dataType":{
"specs":{
"length":"2048"
},
"type":"text"
},
"name":"产品id"
}],
"type":"struct"
},
"size":"512"
},
"type":"array"
},
"name":"设备列表"
}],
"method":"thing.service.addWhiteList",
"name":"添加设备白名单",
"required":false,
"callType":"async"
},
{
"outputData":[
], ],
"identifier":"deleteWhiteList", "method": "thing.service.property.set",
"inputData":[ "name": "set",
{ "required": true,
"identifier":"Devices", "callType": "async",
"dataType":{ "desc": "属性设置"
"specs":{
"item":{
"specs":[
{
"identifier":"MACAddress",
"dataType":{
"specs":{
"length":"128"
},
"type":"text"
},
"name":"MAC地址"
}],
"type":"struct"
},
"size":"512"
},
"type":"array"
},
"name":"设备列表"
}],
"method":"thing.service.deleteWhiteList",
"name":"删除白名单",
"required":false,
"callType":"async"
}, },
{ {
"outputData":[ "outputData":
], [],
"inputData":[ "identifier": "get",
], "inputData":
"identifier":"getWhiteList", [],
"method":"thing.service.getWhiteList", "method": "thing.service.property.get",
"name":"获取白名单列表", "name": "get",
"required":false, "required": true,
"callType":"async" "callType": "async",
}], "desc": "属性获取"
"events":[ }
],
"events":
[
{ {
"outputData":[ "outputData":
[
{ {
"identifier":"NetChannelState", "identifier": "NetChannelState",
"dataType":{ "dataType":
"specs":{ {
"0":"关闭", "specs":
"1":"打开" {
"0": "关闭",
"1": "打开"
}, },
"type":"bool" "type": "bool"
}, },
"name":"组网通道状态" "name": "组网通道状态"
}, },
{ {
"identifier":"WhiteListState", "identifier": "sn",
"dataType":{ "dataType":
"specs":{ {
"0":"关闭", "specs":
"1":"打开" {
"length": "50"
}, },
"type":"bool" "type": "text"
}, },
"name":"白名单状态" "name": "设备sn"
}, },
{ {
"identifier":"OnlineDetectionState", "identifier": "mac",
"dataType":{ "dataType":
"specs":{ {
"0":"关闭", "specs":
"1":"打开" {
"length": "128"
}, },
"type":"bool" "type": "text"
}, },
"name":"在线侦测开关状态" "name": "mac地址"
}, },
{ {
"identifier":"SN", "identifier": "version",
"dataType":{ "dataType":
"specs":{ {
"length":"50" "specs":
{
"length": "255"
}, },
"type":"text" "type": "text"
}, },
"name":"设备SN" "name": "版本"
}, },
{ {
"identifier":"IPAddress", "identifier": "name",
"dataType":{ "dataType":
"specs":{ {
"length":"255" "specs":
{
"length": "255"
}, },
"type":"text" "type": "text"
}, },
"name":"IP地址" "name": "网关名称"
}, }
{
"identifier":"MACAddress",
"dataType":{
"specs":{
"length":"128"
},
"type":"text"
},
"name":"MAC地址"
},
{
"identifier":"Port",
"dataType":{
"specs":{
"min":"0",
"max":"65535",
"step":"1"
},
"type":"int"
},
"name":"网关通信端口号"
}],
"identifier":"property",
"method":"thing.event.property.post",
"name":"property",
"type":"info",
"required":true,
"desc":"属性上报"
},
{
"outputData":[
],
"identifier":"whiteListAddedNotification",
"method":"thing.event.whiteListAddedNotification.post",
"name":"添加设备白名单通知",
"type":"info",
"required":false
},
{
"outputData":[
], ],
"identifier":"whiteListDeletedNotification", "identifier": "property",
"method":"thing.event.whiteListDeletedNotification.post", "method": "thing.event.property.post",
"name":"删除设备白名单通知", "name": "property",
"type":"info", "type": "info",
"required":false "required": true,
}, "desc": "属性上报"
{ }
"outputData":[ ]
{ }
"identifier":"Devices", \ No newline at end of file
"dataType":{
"specs":{
"item":{
"specs":[
{
"identifier":"SN",
"dataType":{
"specs":{
"length":"50"
},
"type":"text"
},
"name":"设备sn"
},
{
"identifier":"deviceId",
"dataType":{
"specs":{
"length":"128"
},
"type":"text"
},
"name":"设备ID"
},
{
"identifier":"MACAddress",
"dataType":{
"specs":{
"length":"128"
},
"type":"text"
},
"name":"MAC地址"
},
{
"identifier":"ProductId",
"dataType":{
"specs":{
"length":"2048"
},
"type":"text"
},
"name":"产品id"
}],
"type":"struct"
},
"size":"512"
},
"type":"array"
},
"name":"设备列表"
}],
"identifier":"getWhiteListNotification",
"method":"thing.event.getWhiteList.post",
"name":"getWhiteList",
"type":"info",
"required":false,
"desc":"获取白名单通知消息"
},
{
"outputData":[
],
"identifier":"restoreFactoryNotification",
"method":"thing.event.restoreFactoryNotification.post",
"name":"恢复出厂通知消息",
"type":"info",
"required":false
},
{
"outputData":[
{
"identifier":"ErrorCode",
"dataType":{
"specs":{
"0":"正常"
},
"type":"enum"
},
"name":"故障代码"
}],
"identifier":"error",
"method":"thing.event.error.post",
"name":"故障上报",
"type":"error",
"required":false
}]
}
...@@ -75,7 +75,21 @@ ...@@ -75,7 +75,21 @@
], ],
"events": [ "events": [
{ {
"outputData": [], "outputData": [
{
"identifier": "SosState",
"name": "紧急按钮告警状态",
"accessMode": "r",
"required": true,
"dataType": {
"type": "enum",
"specs": {
"0": "没有报警",
"1": "报警"
}
}
}
],
"identifier": "sosAlarm", "identifier": "sosAlarm",
"method": "thing.event.sosAlarm.post", "method": "thing.event.sosAlarm.post",
"name": "sosAlarm", "name": "sosAlarm",
......
...@@ -120,7 +120,21 @@ ...@@ -120,7 +120,21 @@
"desc": "属性上报" "desc": "属性上报"
}, },
{ {
"outputData": [], "outputData": [
{
"identifier": "SosState",
"name": "紧急按钮告警状态",
"accessMode": "r",
"required": true,
"dataType": {
"type": "enum",
"specs": {
"0": "没有报警",
"1": "报警"
}
}
}
],
"identifier": "sosAlarm", "identifier": "sosAlarm",
"method": "thing.event.sosAlarm.post", "method": "thing.event.sosAlarm.post",
"name": "sosAlarm", "name": "sosAlarm",
......
...@@ -75,7 +75,21 @@ ...@@ -75,7 +75,21 @@
], ],
"events": [ "events": [
{ {
"outputData": [], "outputData": [
{
"identifier": "SosState",
"name": "紧急按钮告警状态",
"accessMode": "r",
"required": true,
"dataType": {
"type": "enum",
"specs": {
"0": "没有报警",
"1": "报警"
}
}
}
],
"identifier": "sosAlarm", "identifier": "sosAlarm",
"method": "thing.event.sosAlarm.post", "method": "thing.event.sosAlarm.post",
"name": "sosAlarm", "name": "sosAlarm",
......
{
"schema": "https://iot-ap.ikonke.com/model/product_3169.json",
"productType": "lightPanel",
"version": "1.1",
"profile": {
"heartbeat": "300",
"productCode": "3169",
"productName": "耀夜系列.12W智能单路双色温磁吸驱动器(ColorTemp)"
},
"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": "%",
"unitName": "百分比",
"step": "1"
}
},
"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",
"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": "%",
"unitName": "百分比",
"step": "1"
}
},
"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": "最高亮度"
}
],
"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": "%",
"unitName": "百分比",
"step": "1"
}
},
"name": "色温"
},
{
"identifier": "FadeTime",
"accessMode": "rw",
"required": false,
"dataType": {
"type": "int",
"specs": {
"min": "10",
"max": "50",
"unit": "1/10s",
"unitName": "1/10秒",
"step": "10"
}
},
"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": "%",
"unitName": "百分比",
"step": "1"
}
},
"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": "最高亮度"
}
],
"identifier": "property",
"method": "thing.event.property.post",
"name": "property",
"type": "info",
"required": true,
"desc": "属性上报"
}
]
}
{
"schema": "https://iot-ap.ikonke.com/model/product_3170.json",
"productType": "lightPanel",
"version": "1.1",
"profile": {
"heartbeat": "300",
"productCode": "3170",
"productName": "耀夜系列.12w智能单路双色温磁吸驱动器(Level)"
},
"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": "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",
"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": "FadeTime",
"dataType": {
"type": "int",
"specs": {
"min": "10",
"max": "50",
"unit": "1/10s",
"unitName": "1/10秒",
"step": "1/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": "最高亮度"
}
],
"identifier": "get",
"inputData": [
"PowerSwitch",
"Brightness",
"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": "FadeTime",
"accessMode": "rw",
"required": false,
"dataType": {
"type": "int",
"specs": {
"min": "10",
"max": "50",
"unit": "1/10s",
"unitName": "1/10秒",
"step": "10"
}
},
"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": "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": "最高亮度"
}
],
"identifier": "property",
"method": "thing.event.property.post",
"name": "property",
"type": "info",
"required": true,
"desc": "属性上报"
}
]
}
{
"schema": "https://iot-ap.ikonke.com/model/product_3171.json",
"productType": "lightPanel",
"version": "1.1",
"profile": {
"heartbeat": "300",
"productCode": "3171",
"productName": "耀夜系列.20W智能单路双色温磁吸驱动器(ColorTemp)"
},
"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": "%",
"unitName": "百分比",
"step": "1"
}
},
"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",
"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": "%",
"unitName": "百分比",
"step": "1"
}
},
"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": "最高亮度"
}
],
"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": "%",
"unitName": "百分比",
"step": "1"
}
},
"name": "色温"
},
{
"identifier": "FadeTime",
"accessMode": "rw",
"required": false,
"dataType": {
"type": "int",
"specs": {
"min": "10",
"max": "50",
"unit": "1/10s",
"unitName": "1/10秒",
"step": "10"
}
},
"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": "%",
"unitName": "百分比",
"step": "1"
}
},
"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": "最高亮度"
}
],
"identifier": "property",
"method": "thing.event.property.post",
"name": "property",
"type": "info",
"required": true,
"desc": "属性上报"
}
]
}
{
"schema": "https://iot-ap.ikonke.com/model/product_3172.json",
"productType": "lightPanel",
"version": "1.1",
"profile": {
"heartbeat": "300",
"productCode": "3172",
"productName": "耀夜系列.20W智能单路双色温磁吸驱动器(Level)"
},
"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": "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",
"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": "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": "最高亮度"
}
],
"identifier": "get",
"inputData": [
"PowerSwitch",
"Brightness",
"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": "FadeTime",
"accessMode": "rw",
"required": false,
"dataType": {
"type": "int",
"specs": {
"min": "10",
"max": "50",
"unit": "1/10s",
"unitName": "1/10秒",
"step": "10"
}
},
"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": "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": "最高亮度"
}
],
"identifier": "property",
"method": "thing.event.property.post",
"name": "property",
"type": "info",
"required": true,
"desc": "属性上报"
}
]
}
{
"schema": "https://iot-ap.ikonke.com/model/product_3175.json",
"productType": "lightPanel",
"version": "1.1",
"profile": {
"heartbeat": "300",
"productCode": "3175",
"productName": "耀夜系列.14W智能单路双色温磁吸驱动器(ColorTemp)"
},
"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": "%",
"unitName": "百分比",
"step": "1"
}
},
"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",
"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": "%",
"unitName": "百分比",
"step": "1"
}
},
"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": "最高亮度"
}
],
"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": "%",
"unitName": "百分比",
"step": "1"
}
},
"name": "色温"
},
{
"identifier": "FadeTime",
"accessMode": "rw",
"required": false,
"dataType": {
"type": "int",
"specs": {
"min": "10",
"max": "50",
"unit": "1/10s",
"unitName": "1/10秒",
"step": "10"
}
},
"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": "%",
"unitName": "百分比",
"step": "1"
}
},
"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": "最高亮度"
}
],
"identifier": "property",
"method": "thing.event.property.post",
"name": "property",
"type": "info",
"required": true,
"desc": "属性上报"
}
]
}
{
"schema": "https://iot-ap.ikonke.com/model/product_3176.json",
"productType": "lightPanel",
"version": "1.1",
"profile": {
"heartbeat": "300",
"productCode": "3176",
"productName": "耀夜系列.8W智能单路双色温磁吸驱动器(Level)"
},
"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": "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",
"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": "FadeTime",
"dataType": {
"type": "int",
"specs": {
"min": "10",
"max": "50",
"unit": "1/10s",
"unitName": "1/10秒",
"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",
"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": "FadeTime",
"accessMode": "rw",
"required": false,
"dataType": {
"type": "int",
"specs": {
"min": "10",
"max": "50",
"unit": "1/10s",
"unitName": "1/10秒",
"step": "10"
}
},
"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": "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": "最高亮度"
}
],
"identifier": "property",
"method": "thing.event.property.post",
"name": "property",
"type": "info",
"required": true,
"desc": "属性上报"
}
]
}
{
"schema": "https://iot-ap.ikonke.com/model/product_3191.json",
"productType": "lightPanel",
"version": "1.0",
"profile": {
"heartbeat": "300",
"productCode": "3191",
"productName": "光年系列.线性单路调光面板"
},
"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": "%",
"unitName": "百分比",
"step": "1"
}
},
"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",
"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": "%",
"unitName": "百分比",
"step": "1"
}
},
"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": "最高亮度"
}
],
"identifier": "get",
"inputData": [
"PowerSwitch",
"Brightness",
"FadeTime",
"ColorTemperature",
"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": "%",
"unitName": "百分比",
"step": "1"
}
},
"name": "色温"
},
{
"identifier": "FadeTime",
"accessMode": "rw",
"required": false,
"dataType": {
"type": "int",
"specs": {
"min": "10",
"max": "50",
"unit": "1/10s",
"unitName": "1/10秒",
"step": "10"
}
},
"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": "%",
"unitName": "百分比",
"step": "1"
}
},
"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": "最高亮度"
}
],
"identifier": "property",
"method": "thing.event.property.post",
"name": "property",
"type": "info",
"required": true,
"desc": "属性上报"
}
]
}
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