Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
k-sdk
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
陈伟灿
k-sdk
Commits
c53ed887
Commit
c53ed887
authored
Sep 09, 2021
by
chen.weican
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【修改内容】1,更新物模型;2,修改局域网协议场景过滤;3,彩灯接入
【提交人】陈伟灿
parent
02a01c2b
Changes
56
Hide whitespace changes
Inline
Side-by-side
Showing
56 changed files
with
1209 additions
and
506 deletions
+1209
-506
application/kcloud/kcloud_config.h
application/kcloud/kcloud_config.h
+1
-0
application/kcloud/kcloud_data_handle.c
application/kcloud/kcloud_data_handle.c
+1
-0
application/kcloud/kk_register.c
application/kcloud/kk_register.c
+19
-2
application/kcloud/mqtt_api.c
application/kcloud/mqtt_api.c
+7
-3
application/klansdk/kk_data_handle.c
application/klansdk/kk_data_handle.c
+7
-5
application/klansdk/kk_lan_sync.c
application/klansdk/kk_lan_sync.c
+39
-8
application/klansdk/kk_lan_sync.h
application/klansdk/kk_lan_sync.h
+1
-0
application/klansdk/kk_login_handle.c
application/klansdk/kk_login_handle.c
+9
-9
midware/midware/dm/kk_dm_msg.c
midware/midware/dm/kk_dm_msg.c
+61
-71
midware/midware/dm/kk_dm_msg.h
midware/midware/dm/kk_dm_msg.h
+1
-1
midware/midware/dm/kk_linkkit.c
midware/midware/dm/kk_linkkit.c
+44
-0
midware/midware/dm/kk_sub_db.c
midware/midware/dm/kk_sub_db.c
+2
-2
midware/midware/dm/kk_sync_data.c
midware/midware/dm/kk_sync_data.c
+45
-11
midware/midware/midware.c
midware/midware/midware.c
+13
-3
midware/midware/scene/kk_scene_handle.c
midware/midware/scene/kk_scene_handle.c
+12
-4
nx5_soc_gw/kk_device_def.json
nx5_soc_gw/kk_device_def.json
+196
-332
nx5_soc_gw/smarthome_z3gw_nx5
nx5_soc_gw/smarthome_z3gw_nx5
+0
-0
opcodeMapCfg/device_3073.json
opcodeMapCfg/device_3073.json
+61
-0
opcodeMapCfg/device_3102.json
opcodeMapCfg/device_3102.json
+46
-0
process_check.sh
process_check.sh
+11
-8
tsl/product_3014.json
tsl/product_3014.json
+2
-1
tsl/product_3016.json
tsl/product_3016.json
+2
-1
tsl/product_3018.json
tsl/product_3018.json
+1
-1
tsl/product_3037.json
tsl/product_3037.json
+0
-1
tsl/product_3039.json
tsl/product_3039.json
+2
-1
tsl/product_3041.json
tsl/product_3041.json
+4
-1
tsl/product_3042.json
tsl/product_3042.json
+2
-1
tsl/product_3043.json
tsl/product_3043.json
+2
-1
tsl/product_3044.json
tsl/product_3044.json
+2
-1
tsl/product_3045.json
tsl/product_3045.json
+2
-1
tsl/product_3046.json
tsl/product_3046.json
+2
-1
tsl/product_3048.json
tsl/product_3048.json
+2
-1
tsl/product_3049.json
tsl/product_3049.json
+3
-2
tsl/product_3050.json
tsl/product_3050.json
+1
-1
tsl/product_3051.json
tsl/product_3051.json
+5
-3
tsl/product_3052.json
tsl/product_3052.json
+3
-2
tsl/product_3053.json
tsl/product_3053.json
+2
-1
tsl/product_3054.json
tsl/product_3054.json
+2
-1
tsl/product_3055.json
tsl/product_3055.json
+2
-1
tsl/product_3056.json
tsl/product_3056.json
+2
-1
tsl/product_3057.json
tsl/product_3057.json
+5
-4
tsl/product_3064.json
tsl/product_3064.json
+5
-3
tsl/product_3073.json
tsl/product_3073.json
+147
-2
tsl/product_3076.json
tsl/product_3076.json
+1
-1
tsl/product_3079.json
tsl/product_3079.json
+10
-5
tsl/product_3080.json
tsl/product_3080.json
+1
-0
tsl/product_3081.json
tsl/product_3081.json
+4
-1
tsl/product_3082.json
tsl/product_3082.json
+1
-0
tsl/product_3083.json
tsl/product_3083.json
+4
-1
tsl/product_3084.json
tsl/product_3084.json
+1
-1
tsl/product_3091.json
tsl/product_3091.json
+1
-1
tsl/product_3092.json
tsl/product_3092.json
+1
-1
tsl/product_3093.json
tsl/product_3093.json
+1
-1
tsl/product_3094.json
tsl/product_3094.json
+406
-0
tsl/product_3095.json
tsl/product_3095.json
+1
-1
tsl/version
tsl/version
+1
-1
No files found.
application/kcloud/kcloud_config.h
View file @
c53ed887
...
...
@@ -21,6 +21,7 @@ typedef enum {
}
kk_kcloud_error_code_t
;
#define KK_DEVICESECRET_PATH "/data/kk/kk_deviceSecret.txt"
#define KK_TOKEN_PATH "/data/kk/kk_token.txt"
#define HOST_NAME "dev.nj-ikonke.site"
#endif
application/kcloud/kcloud_data_handle.c
View file @
c53ed887
...
...
@@ -198,6 +198,7 @@ char * g_filerToCloudTable[] =
(
char
*
){
"/thing/service/historyAlarm_reply"
},
(
char
*
){
"/thing/service/delAlarm_reply"
},
(
char
*
){
"/thing/service/syncinfo_reply"
},
(
char
*
){
"/thing/service/syncinfopush_reply"
},
};
/************************************************************
*功能描述:过滤不需要下发给网关的消息
...
...
application/kcloud/kk_register.c
View file @
c53ed887
...
...
@@ -17,6 +17,13 @@
#include "kk_product.h"
#include "kcloud_config.h"
#include "infra_sha256.h"
#include <string.h>
#include <stdlib.h>
#include <netdb.h>
#include <arpa/inet.h>
#include <netinet/tcp.h>
#include <sys/stat.h>
#include <sys/socket.h>
#include "kk_log.h"
#define BUFSIZE 1024
#define PRODUCTSECRET "123456"
...
...
@@ -273,6 +280,7 @@ static char * kk_create_get_jwt_info()
INFO_PRINT
(
"--------------------->kk_create_get_jwt_info:%s
\n
"
,
out
);
return
out
;
}
char
s_ServerIp
[
16
]
=
{
0
};
static
int
kk_send_register_info
(
int
sockfd
,
const
char
*
path
,
int
type
)
{
char
str1
[
1024
],
str2
[
1024
],
str
[
16
]
=
{
0
};
...
...
@@ -292,7 +300,7 @@ static int kk_send_register_info(int sockfd,const char * path,int type)
sprintf
(
tmp
,
"POST %s HTTP/1.1
\n
"
,
path
);
strcat
(
str1
,
tmp
);
memset
(
tmp
,
0
,
sizeof
(
tmp
));
sprintf
(
tmp
,
"Host: %s:%d
\n
"
,
IPSTR
,
PORT
);
sprintf
(
tmp
,
"Host: %s:%d
\n
"
,
s_ServerIp
,
PORT
);
strcat
(
str1
,
tmp
);
strcat
(
str1
,
"Content-Type: application/json
\n
"
);
strcat
(
str1
,
"Content-Length: "
);
...
...
@@ -304,6 +312,7 @@ static int kk_send_register_info(int sockfd,const char * path,int type)
INFO_PRINT
(
"%s
\n
"
,
str1
);
return
write
(
sockfd
,
str1
,
strlen
(
str1
));
}
int
kk_start_ccu_register
(
void
)
{
int
sockfd
,
ret
,
i
,
h
;
...
...
@@ -319,7 +328,15 @@ int kk_start_ccu_register(void)
bzero
(
&
servaddr
,
sizeof
(
servaddr
));
servaddr
.
sin_family
=
AF_INET
;
servaddr
.
sin_port
=
htons
(
PORT
);
if
(
inet_pton
(
AF_INET
,
IPSTR
,
&
servaddr
.
sin_addr
)
<=
0
){
struct
hostent
*
host
=
gethostbyname
(
HOST_NAME
);
if
(
NULL
==
host
)
{
INFO_PRINT
(
"gethostbyname h_errno
\n
"
);
return
-
1
;
}
memcpy
(
s_ServerIp
,
inet_ntoa
(
*
(
struct
in_addr
*
)(
host
->
h_addr_list
[
0
])),
strlen
(
inet_ntoa
(
*
(
struct
in_addr
*
)(
host
->
h_addr_list
[
0
]))));
INFO_PRINT
(
"---------------------------->s_ServerIp:%s
\n
"
,
s_ServerIp
);
if
(
inet_pton
(
AF_INET
,
s_ServerIp
,
&
servaddr
.
sin_addr
)
<=
0
){
INFO_PRINT
(
"--inet_pton error!
\n
"
);
close
(
sockfd
);
return
-
1
;
...
...
application/kcloud/mqtt_api.c
View file @
c53ed887
...
...
@@ -208,9 +208,11 @@ void KK_Get_MqttClient(MQTTAsync *pClient)
}
}
extern
char
g_clientId
[
64
];
extern
char
s_ServerIp
[
16
];
MQTTAsync
KK_MQTT_Connect
(
void
)
{
int
rc
=
0
;
int
temp_address
[
128
]
=
{
0
};
FILE
*
fp
;
MQTTAsync_createOptions
opts
=
MQTTAsync_createOptions_initializer
;
MQTTAsync_connectOptions
conn_opts
=
MQTTAsync_connectOptions_initializer
;
...
...
@@ -228,9 +230,11 @@ MQTTAsync KK_MQTT_Connect(void)
char
ccuid
[
32
]
=
{
0
};
KK_Get_ccuid
(
ccuid
);
sprintf
(
usrname
,
"%s.%s"
,
ccuid
,
KK_CCU_PRODUCTID
);
printf
(
"cliendid:%s,usrname:%s
\n
"
,
g_clientId
,
usrname
);
printf
(
"------------>token:%s
\n
"
,
token
);
if
((
rc
=
MQTTAsync_createWithOptions
(
&
s_Client
,
ADDRESS
,
g_clientId
,
MQTTCLIENT_PERSISTENCE_NONE
,
NULL
,
&
opts
))
!=
MQTTASYNC_SUCCESS
)
INFO_PRINT
(
"cliendid:%s,usrname:%s
\n
"
,
g_clientId
,
usrname
);
INFO_PRINT
(
"------------>token:%s
\n
"
,
token
);
sprintf
(
temp_address
,
"tcp://%s:1983"
,
s_ServerIp
);
INFO_PRINT
(
"------------>temp_address:%s
\n
"
,
temp_address
);
if
((
rc
=
MQTTAsync_createWithOptions
(
&
s_Client
,
temp_address
,
g_clientId
,
MQTTCLIENT_PERSISTENCE_NONE
,
NULL
,
&
opts
))
!=
MQTTASYNC_SUCCESS
)
{
ERROR_PRINT
(
"Failed to create client object, return code %d
\n
"
,
rc
);
return
NULL
;
...
...
application/klansdk/kk_data_handle.c
View file @
c53ed887
...
...
@@ -410,8 +410,6 @@ static int kk_parse_syncinfo(cJSON *payload)
cJSON
*
valuejson
;
int
value
;
printf
(
"[%s][%d]
\n
"
,
__FUNCTION__
,
__LINE__
);
kk_map_dev_deinit
();
...
...
@@ -539,17 +537,21 @@ static alarmcontext_map_s alarmContext[] = {
{
"3049"
,
"检测到有人 告警时间戳"
},
{
"3054"
,
"SOS 按钮触发报警 告警时间戳"
},
{
"3083"
,
"检测到浓雾 告警时间戳"
},
{
"3051"
,
"检测到有开关门 告警时间戳"
},
{
"3082"
,
"检测到燃气 告警时间戳"
},
{
"3051"
,
"检测到有开关门 告警时间戳"
},
{
"3055"
,
"检测到有水浸入 告警时间戳"
},
};
static
alarmcontext_map_s
lowbatteryContext
[]
=
{
{
"3049"
,
"人体感应设备电量低 告警时间戳"
},
{
"3054"
,
"SOS按钮电量低 告警时间戳"
},
{
"3083"
,
"烟感电量低 告警时间戳"
},
{
"3051"
,
"门磁电量低 告警时间戳"
},
{
"3082"
,
"气感电量低 告警时间戳"
},
{
"3051"
,
"门磁电量低 告警时间戳"
},
{
"3055"
,
"水浸电量低 告警时间戳"
},
};
static
alarmcontext_map_s
DismantleStateContext
[]
=
{
{
"3083"
,
"烟感被拆除 告警时间戳"
},
{
"3082"
,
"气感被拆除 告警时间戳"
},
};
int
kk_get_alarmcontext_type_table_size
(
void
)
{
...
...
application/klansdk/kk_lan_sync.c
View file @
c53ed887
...
...
@@ -147,7 +147,7 @@ cJSON *kk_scene_build(SYN_SCENE_ITEM **content)
cJSON_AddStringToObject
(
scene
,
"pannel_id"
,(
ptr
->
pannel_id
==
NULL
)
?
"*"
:
ptr
->
pannel_id
);
cJSON_AddStringToObject
(
scene
,
"room_id"
,
ptr
->
room_id
);
cJSON_AddStringToObject
(
scene
,
"scene_image"
,
""
);
cJSON_AddStringToObject
(
scene
,
"scene_type"
,
"100"
);
cJSON_AddStringToObject
(
scene
,
"scene_type"
,
ptr
->
scenetype
);
if
(
ptr
->
time
==
NULL
){
cJSON_AddStringToObject
(
scene
,
"timer_enable"
,
"0"
);
...
...
@@ -256,8 +256,26 @@ static int kk_sync_scene_condition(cJSON *condition,SYN_SCENE_ITEM **build)
}
typedef
struct
{
char
*
name
;
char
*
type
;
}
scenetype_map_s
;
static
scenetype_map_s
sceneTypeMap
[]
=
{
{
"聚会模式"
,
"1"
},
{
"会议模式"
,
"2"
},
{
"家庭影院"
,
"3"
},
{
"回家模式"
,
"4"
},
{
"烛光模式"
,
"5"
},
{
"离家模式"
,
"6"
},
{
"早晨模式"
,
"7"
},
{
"睡觉模式"
,
"8"
},
{
"影院模式"
,
"9"
},
{
"娱乐模式"
,
"13"
},
};
static
int
kk_get_sceneTypeMap_table_size
(
void
)
{
return
sizeof
(
sceneTypeMap
)
/
sizeof
(
scenetype_map_s
);
}
cJSON
*
kk_sync_scence_to_sdk
(
cJSON
*
root
,
cJSON
*
data
)
{
cJSON
*
scenes
=
cJSON_GetObjectItem
(
data
,
SCENES_STR
);
...
...
@@ -265,6 +283,7 @@ cJSON *kk_sync_scence_to_sdk(cJSON *root,cJSON *data)
cJSON
*
actions
,
*
enable
,
*
name
,
*
sceneId
,
*
sceneType
,
*
trigger
,
*
condition
;
int
i
,
num
=
cJSON_GetArraySize
(
scenes
);
int
k
=
0
,
isMatch
=
0
;
SYN_SCENE_ITEM
*
build
=
(
SYN_SCENE_ITEM
*
)
malloc
(
sizeof
(
SYN_SCENE_ITEM
)
*
num
);
if
(
build
==
NULL
){
...
...
@@ -288,11 +307,23 @@ cJSON *kk_sync_scence_to_sdk(cJSON *root,cJSON *data)
trigger
=
cJSON_GetObjectItem
(
item
,
SCENE_TRIGGER_STR
);
condition
=
cJSON_GetObjectItem
(
item
,
CONDITION_STR
);
//todo
/* 时间段类型
if(strcmp(sceneType->valuestring,"")==){
}*/
/*过滤多控 iftt,定时相关场景*/
if
(
sceneType
==
NULL
||
sceneType
->
type
!=
cJSON_Number
||
sceneType
->
valueint
!=
0
){
continue
;
}
int
size
=
kk_get_sceneTypeMap_table_size
();
for
(
k
=
0
;
k
<
size
;
k
++
){
//printf("---------------------------->producTypeMap[k].type:%s\n",producTypeMap[k].type);
if
(
!
strcmp
(
name
->
valuestring
,
sceneTypeMap
[
k
].
name
)){
pScene
->
scenetype
=
sceneTypeMap
[
k
].
type
;
isMatch
=
1
;
break
;
}
}
if
(
isMatch
==
0
){
pScene
->
scenetype
=
"100"
;
//自定义场景
}
pScene
->
act_num
=
kk_sync_actions
(
actions
,
&
pScene
->
act
,
&
pScene
->
room_id
);
kk_sync_scene_condition
(
condition
,
&
pScene
);
...
...
application/klansdk/kk_lan_sync.h
View file @
c53ed887
...
...
@@ -30,6 +30,7 @@ typedef struct{
char
*
room_id
;
char
*
time
;
char
*
week
;
char
*
scenetype
;
SYN_SCENE_ACTION
*
act
;
int
act_num
;
}
SYN_SCENE_ITEM
;
...
...
application/klansdk/kk_login_handle.c
View file @
c53ed887
...
...
@@ -180,8 +180,8 @@ void *TCPServer()
len
=
sizeof
(
Client
);
bzero
(
&
Client
,
len
);
client_fd
=
accept
(
Listenfd
,
(
struct
sockaddr
*
)
&
Client
,
&
len
);
printf
(
"addr:%s
\n
"
,
inet_ntoa
(
Client
.
sin_addr
));
printf
(
"[%s][%d]Connfd:%d
\n
"
,
__FUNCTION__
,
__LINE__
,
client_fd
);
INFO_PRINT
(
"addr:%s
\n
"
,
inet_ntoa
(
Client
.
sin_addr
));
INFO_PRINT
(
"[%s][%d]Connfd:%d
\n
"
,
__FUNCTION__
,
__LINE__
,
client_fd
);
//若有新的连接
if
(
client_fd
!=
-
1
)
{
...
...
@@ -220,21 +220,21 @@ void *TCPServer()
memset
(
Buf
,
0
,
sizeof
(
Buf
));
pthread_mutex_lock
(
&
data_mutex
);
ret
=
recv
(
s_ConnInfo
[
i
ndex
].
socketfd
,
Buf
,
sizeof
(
Buf
),
0
);
//最后一个参数为0,表示默认阻塞接收,前面select解除了阻塞说明有数据可读
ret
=
recv
(
s_ConnInfo
[
i
].
socketfd
,
Buf
,
sizeof
(
Buf
),
0
);
//最后一个参数为0,表示默认阻塞接收,前面select解除了阻塞说明有数据可读
pthread_mutex_unlock
(
&
data_mutex
);
if
(
ret
>
0
)
{
printf
(
"recv->buf:%s
\n
"
,
Buf
);
_kk_handle_data
(
Buf
,
s_ConnInfo
[
i
ndex
].
socketfd
);
INFO_PRINT
(
"recv->buf:%s
\n
"
,
Buf
);
_kk_handle_data
(
Buf
,
s_ConnInfo
[
i
].
socketfd
);
}
else
{
printf
(
"client disconnected
\r\n
"
);
INFO_PRINT
(
"client disconnected
\r\n
"
);
pthread_mutex_lock
(
&
data_mutex
);
close
(
s_ConnInfo
[
i
ndex
].
socketfd
);
s_ConnInfo
[
i
ndex
].
socketfd
=
-
1
;
memset
(
s_ConnInfo
[
i
ndex
].
ip
,
0x0
,
sizeof
(
s_ConnInfo
[
index
].
ip
));
close
(
s_ConnInfo
[
i
].
socketfd
);
s_ConnInfo
[
i
].
socketfd
=
-
1
;
memset
(
s_ConnInfo
[
i
].
ip
,
0x0
,
sizeof
(
s_ConnInfo
[
i
].
ip
));
pthread_mutex_unlock
(
&
data_mutex
);
}
}
...
...
midware/midware/dm/kk_dm_msg.c
View file @
c53ed887
...
...
@@ -1029,7 +1029,7 @@ int dm_msg_ccu_property_post(dm_mgr_dev_node_t *node)
}
return
SUCCESS_RETURN
;
}
static
void
kk_split
(
char
*
src
,
const
char
*
separator
,
char
**
dest
,
int
*
num
)
{
void
kk_split
(
char
*
src
,
const
char
*
separator
,
char
**
dest
,
int
*
num
)
{
char
*
pNext
;
int
count
=
0
;
if
(
src
==
NULL
||
strlen
(
src
)
==
0
)
...
...
@@ -1045,7 +1045,29 @@ static void kk_split(char *src,const char *separator,char **dest,int *num) {
*
num
=
count
;
}
static
int
_kk_property_handle
(
kk_dm_property_e_t
*
pro
,
int
type
,
char
*
identifier
,
void
*
value
)
{
int
num
=
0
;
if
(
pro
==
NULL
||
value
==
NULL
||
identifier
==
NULL
){
return
-
1
;
}
pro
->
num
++
;
num
=
pro
->
num
;
pro
->
info
[
num
-
1
].
type
=
type
;
memset
(
pro
->
info
[
num
-
1
].
property
,
0x0
,
sizeof
(
pro
->
info
[
num
-
1
].
property
));
memcpy
(
pro
->
info
[
num
-
1
].
property
,
identifier
,
strlen
(
identifier
));
if
(
type
==
KK_TSL_DATA_TYPE_INT
||
type
==
KK_TSL_DATA_TYPE_ENUM
||
type
==
KK_TSL_DATA_TYPE_BOOL
){
pro
->
info
[
num
-
1
].
value
=
*
(
int
*
)
value
;
}
else
if
(
type
==
KK_TSL_DATA_TYPE_FLOAT
||
type
==
KK_TSL_DATA_TYPE_DOUBLE
){
pro
->
info
[
num
-
1
].
value
=
*
(
double
*
)
value
;
}
else
{
pro
->
info
[
num
-
1
].
valueStr
=
(
char
*
)
value
;
}
return
0
;
}
int
dm_msg_thing_property_post_by_identify
(
char
*
deviceCode
,
cJSON
*
params
)
{
int
res
=
0
;
...
...
@@ -1057,10 +1079,11 @@ int dm_msg_thing_property_post_by_identify(char *deviceCode,cJSON *params)
cJSON
*
propertyItem
=
NULL
;
char
tmpValue
[
20
]
=
{
0
};
kk_dm_property_e_t
propertyInfoBuf
[
DEVICE_PROPERTY_NUM_MAX
];
kk_dm_property_e_t
subPropertyInfoBuf
;
char
propertiesTmp
[
DEVICE_PROPERTY_NAME_MAX
]
=
{
0
};
char
pFinal
[
DEVICE_PROPERTY_NAME_MAX
]
=
{
0
};
int
num
=
0
;
int
countPro
=
0
;
int
countPro
=
0
,
subCountPro
=
0
;
int
epNumInt
=
1
;
int
maxEpNum
=
1
;
if
(
params
==
NULL
||
deviceCode
==
NULL
){
...
...
@@ -1072,7 +1095,8 @@ int dm_msg_thing_property_post_by_identify(char *deviceCode,cJSON *params)
return
FAIL_RETURN
;
}
//printf("dm_msg_thing_property_post_by_identify:%s\n",params->valuestring);
memset
(
propertyInfoBuf
,
0x0
,
sizeof
(
kk_dm_property_e_t
)
*
16
);
memset
(
propertyInfoBuf
,
0x0
,
sizeof
(
kk_dm_property_e_t
)
*
DEVICE_PROPERTY_NUM_MAX
);
memset
(
&
subPropertyInfoBuf
,
0x0
,
sizeof
(
kk_dm_property_e_t
));
nums
=
node
->
dev_shadow
->
property_number
;
for
(
idx
=
0
;
idx
<
nums
;
idx
++
){
property
=
(
kk_tsl_data_t
*
)(
node
->
dev_shadow
->
properties
+
idx
);
...
...
@@ -1098,10 +1122,6 @@ int dm_msg_thing_property_post_by_identify(char *deviceCode,cJSON *params)
}
else
{
//printf("---------------------------------->property->identifier:%s\n",property->identifier);
memcpy
(
pFinal
,
property
->
identifier
,
strlen
(
property
->
identifier
));
//memset(propertiesbuf[0],0x0,sizeof(propertiesbuf[0]));
//memcpy(propertiesbuf[0],property->identifier,strlen(property->identifier));
//printf("propertiesbuf[0]:%s,num:%d\n",propertiesbuf[0],num);
//epNumInt = 1;
}
propertyItem
=
cJSON_GetObjectItem
(
params
,
property
->
identifier
);
if
(
propertyItem
!=
NULL
){
...
...
@@ -1112,42 +1132,25 @@ int dm_msg_thing_property_post_by_identify(char *deviceCode,cJSON *params)
property
->
data_value
.
type
==
KK_TSL_DATA_TYPE_BOOL
){
sprintf
(
tmpValue
,
"%d"
,
property
->
data_value
.
value_int
);
kk_property_db_update_value
(
deviceCode
,
property
->
identifier
,
tmpValue
);
propertyInfoBuf
[
epNumInt
-
1
].
num
++
;
countPro
=
propertyInfoBuf
[
epNumInt
-
1
].
num
;
propertyInfoBuf
[
epNumInt
-
1
].
info
[
countPro
-
1
].
type
=
property
->
data_value
.
type
;
memset
(
propertyInfoBuf
[
epNumInt
-
1
].
info
[
countPro
-
1
].
property
,
0x0
,
sizeof
(
propertyInfoBuf
[
epNumInt
-
1
].
info
[
countPro
-
1
].
property
));
memcpy
(
propertyInfoBuf
[
epNumInt
-
1
].
info
[
countPro
-
1
].
property
,
pFinal
,
strlen
(
pFinal
));
propertyInfoBuf
[
epNumInt
-
1
].
info
[
countPro
-
1
].
value
=
property
->
data_value
.
value_int
;
_kk_property_handle
(
&
propertyInfoBuf
[
epNumInt
-
1
],
property
->
data_value
.
type
,
pFinal
,
&
property
->
data_value
.
value_int
);
}
else
if
(
property
->
data_value
.
type
==
KK_TSL_DATA_TYPE_FLOAT
){
sprintf
(
tmpValue
,
"%f"
,
property
->
data_value
.
value_float
);
kk_property_db_update_value
(
deviceCode
,
property
->
identifier
,
tmpValue
);
propertyInfoBuf
[
epNumInt
-
1
].
num
++
;
countPro
=
propertyInfoBuf
[
epNumInt
-
1
].
num
;
propertyInfoBuf
[
epNumInt
-
1
].
info
[
countPro
-
1
].
type
=
property
->
data_value
.
type
;
memset
(
propertyInfoBuf
[
epNumInt
-
1
].
info
[
countPro
-
1
].
property
,
0x0
,
sizeof
(
propertyInfoBuf
[
epNumInt
-
1
].
info
[
countPro
-
1
].
property
));
memcpy
(
propertyInfoBuf
[
epNumInt
-
1
].
info
[
countPro
-
1
].
property
,
pFinal
,
strlen
(
pFinal
));
propertyInfoBuf
[
epNumInt
-
1
].
info
[
countPro
-
1
].
value
=
property
->
data_value
.
value_float
;
_kk_property_handle
(
&
propertyInfoBuf
[
epNumInt
-
1
],
property
->
data_value
.
type
,
pFinal
,
&
property
->
data_value
.
value_float
);
}
else
if
(
property
->
data_value
.
type
==
KK_TSL_DATA_TYPE_DOUBLE
){
sprintf
(
tmpValue
,
"%f"
,
property
->
data_value
.
value_double
);
kk_property_db_update_value
(
deviceCode
,
property
->
identifier
,
tmpValue
);
propertyInfoBuf
[
epNumInt
-
1
].
num
++
;
countPro
=
propertyInfoBuf
[
epNumInt
-
1
].
num
;
propertyInfoBuf
[
epNumInt
-
1
].
info
[
countPro
-
1
].
type
=
property
->
data_value
.
type
;
memset
(
propertyInfoBuf
[
epNumInt
-
1
].
info
[
countPro
-
1
].
property
,
0x0
,
sizeof
(
propertyInfoBuf
[
epNumInt
-
1
].
info
[
countPro
-
1
].
property
));
memcpy
(
propertyInfoBuf
[
epNumInt
-
1
].
info
[
countPro
-
1
].
property
,
pFinal
,
strlen
(
pFinal
));
propertyInfoBuf
[
epNumInt
-
1
].
info
[
countPro
-
1
].
value
=
property
->
data_value
.
value_double
;
_kk_property_handle
(
&
propertyInfoBuf
[
epNumInt
-
1
],
property
->
data_value
.
type
,
pFinal
,
&
property
->
data_value
.
value_double
);
}
else
if
(
property
->
data_value
.
type
==
KK_TSL_DATA_TYPE_TEXT
||
property
->
data_value
.
type
==
KK_TSL_DATA_TYPE_DATE
){
kk_property_db_update_value
(
deviceCode
,
property
->
identifier
,
property
->
data_value
.
value
);
propertyInfoBuf
[
epNumInt
-
1
].
num
++
;
countPro
=
propertyInfoBuf
[
epNumInt
-
1
].
num
;
propertyInfoBuf
[
epNumInt
-
1
].
info
[
countPro
-
1
].
type
=
property
->
data_value
.
type
;
memset
(
propertyInfoBuf
[
epNumInt
-
1
].
info
[
countPro
-
1
].
property
,
0x0
,
sizeof
(
propertyInfoBuf
[
epNumInt
-
1
].
info
[
countPro
-
1
].
property
));
memcpy
(
propertyInfoBuf
[
epNumInt
-
1
].
info
[
countPro
-
1
].
property
,
pFinal
,
strlen
(
pFinal
));
propertyInfoBuf
[
epNumInt
-
1
].
info
[
countPro
-
1
].
valueStr
=
property
->
data_value
.
value
;
_kk_property_handle
(
&
propertyInfoBuf
[
epNumInt
-
1
],
property
->
data_value
.
type
,
pFinal
,
property
->
data_value
.
value
);
}
else
if
(
property
->
data_value
.
type
==
KK_TSL_DATA_TYPE_STRUCT
){
...
...
@@ -1157,6 +1160,7 @@ int dm_msg_thing_property_post_by_identify(char *deviceCode,cJSON *params)
cJSON
*
propertyItem_1
=
NULL
;
char
tmp_identifiers
[
256
]
=
{
0
};
complex_struct
=
property
->
data_value
.
value
;
_kk_property_handle
(
&
propertyInfoBuf
[
epNumInt
-
1
],
property
->
data_value
.
type
,
pFinal
,
property
->
data_value
.
value
);
for
(
index
=
0
;
index
<
complex_struct
->
size
;
index
++
)
{
current_data
=
(
kk_tsl_data_t
*
)
complex_struct
->
value
+
index
;
propertyItem_1
=
cJSON_GetObjectItem
(
propertyItem
,
current_data
->
identifier
);
...
...
@@ -1168,59 +1172,26 @@ int dm_msg_thing_property_post_by_identify(char *deviceCode,cJSON *params)
current_data
->
data_value
.
type
==
KK_TSL_DATA_TYPE_BOOL
){
sprintf
(
tmpValue
,
"%d"
,
current_data
->
data_value
.
value_int
);
kk_property_db_update_value
(
deviceCode
,
tmp_identifiers
,
tmpValue
);
_kk_property_handle
(
&
subPropertyInfoBuf
,
current_data
->
data_value
.
type
,
current_data
->
identifier
,
&
current_data
->
data_value
.
value_int
);
}
else
if
(
current_data
->
data_value
.
type
==
KK_TSL_DATA_TYPE_FLOAT
){
sprintf
(
tmpValue
,
"%f"
,
current_data
->
data_value
.
value_float
);
kk_property_db_update_value
(
deviceCode
,
tmp_identifiers
,
tmpValue
);
_kk_property_handle
(
&
subPropertyInfoBuf
,
current_data
->
data_value
.
type
,
current_data
->
identifier
,
&
current_data
->
data_value
.
value_float
);
}
else
if
(
current_data
->
data_value
.
type
==
KK_TSL_DATA_TYPE_DOUBLE
){
sprintf
(
tmpValue
,
"%u"
,
current_data
->
data_value
.
value_double
);
kk_property_db_update_value
(
deviceCode
,
tmp_identifiers
,
tmpValue
);
_kk_property_handle
(
&
subPropertyInfoBuf
,
current_data
->
data_value
.
type
,
current_data
->
identifier
,
&
current_data
->
data_value
.
value_double
);
}
else
if
(
current_data
->
data_value
.
type
==
KK_TSL_DATA_TYPE_TEXT
||
current_data
->
data_value
.
type
==
KK_TSL_DATA_TYPE_DATE
){
kk_property_db_update_value
(
deviceCode
,
tmp_identifiers
,
current_data
->
data_value
.
value
);
_kk_property_handle
(
&
subPropertyInfoBuf
,
current_data
->
data_value
.
type
,
current_data
->
identifier
,
current_data
->
data_value
.
value
);
}
#if 0
else if(current_data->data_value.type == KK_TSL_DATA_TYPE_STRUCT){
kk_tsl_data_value_complex_t *complex_struct_1 = NULL;
complex_struct_1 = current_data->data_value.value;
int index1 = 0;
kk_tsl_data_t *current_data_1 = NULL;
cJSON *propertyItem_2 = NULL;
for(index1 = 0; index1 < complex_struct_1->size; index1++){
current_data_1 = (kk_tsl_data_t *)complex_struct_1->value + index1;
propertyItem_2 = cJSON_GetObjectItem(propertyItem_1, current_data_1->identifier);
if(propertyItem_2 != NULL){
memset(tmp_identifiers,0x0,sizeof(tmp_identifiers));
sprintf(tmp_identifiers,"%s.%s.%s",property->identifier,current_data->identifier,current_data_1->identifier);
if(current_data_1->data_value.type == KK_TSL_DATA_TYPE_INT ||
current_data_1->data_value.type == KK_TSL_DATA_TYPE_ENUM||
current_data_1->data_value.type == KK_TSL_DATA_TYPE_BOOL){
sprintf(tmpValue,"%d",current_data_1->data_value.value_int);
kk_property_db_update_value(deviceCode,tmp_identifiers,tmpValue);
}
else if(current_data_1->data_value.type == KK_TSL_DATA_TYPE_FLOAT){
sprintf(tmpValue,"%f",current_data_1->data_value.value_float);
kk_property_db_update_value(deviceCode,tmp_identifiers,tmpValue);
}
else if(current_data_1->data_value.type == KK_TSL_DATA_TYPE_DOUBLE){
sprintf(tmpValue,"%u",current_data_1->data_value.value_double);
kk_property_db_update_value(deviceCode,tmp_identifiers,tmpValue);
}
else if(current_data_1->data_value.type == KK_TSL_DATA_TYPE_TEXT||
current_data_1->data_value.type == KK_TSL_DATA_TYPE_DATE){
kk_property_db_update_value(deviceCode,tmp_identifiers,current_data_1->data_value.value);
}
else{
ERROR_PRINT("Unsupport Type ~~\n");
}
}
}
}
#endif
else
{
ERROR_PRINT
(
"Unsupport Type
\n
"
);
}
...
...
@@ -1240,6 +1211,9 @@ int dm_msg_thing_property_post_by_identify(char *deviceCode,cJSON *params)
memset
(
epIdx
,
0x0
,
sizeof
(
epIdx
));
sprintf
(
epIdx
,
"%d"
,
idx
+
1
);
cJSON
*
rootData
=
cJSON_CreateObject
();
if
(
countPro
==
0
){
continue
;
}
cJSON_AddStringToObject
(
rootData
,
"epNum"
,
epIdx
);
for
(
i
=
0
;
i
<
countPro
;
i
++
){
int
vtype
=
propertyInfoBuf
[
idx
].
info
[
i
].
type
;
...
...
@@ -1250,6 +1224,22 @@ int dm_msg_thing_property_post_by_identify(char *deviceCode,cJSON *params)
cJSON_AddNumberToObject
(
rootData
,
propertyInfoBuf
[
idx
].
info
[
i
].
property
,
propertyInfoBuf
[
idx
].
info
[
i
].
value
);
}
else
if
(
vtype
==
KK_TSL_DATA_TYPE_TEXT
||
vtype
==
KK_TSL_DATA_TYPE_DATE
){
cJSON_AddStringToObject
(
rootData
,
propertyInfoBuf
[
idx
].
info
[
i
].
property
,
propertyInfoBuf
[
idx
].
info
[
i
].
valueStr
);
}
else
if
(
vtype
==
KK_TSL_DATA_TYPE_STRUCT
){
int
subPro
=
subPropertyInfoBuf
.
num
;
int
k
=
0
;
cJSON
*
subroot
=
cJSON_CreateObject
();
for
(
k
=
0
;
k
<
countPro
;
k
++
){
int
subtype
=
subPropertyInfoBuf
.
info
[
k
].
type
;
if
(
subtype
==
KK_TSL_DATA_TYPE_INT
||
subtype
==
KK_TSL_DATA_TYPE_ENUM
\
||
subtype
==
KK_TSL_DATA_TYPE_BOOL
||
subtype
==
KK_TSL_DATA_TYPE_FLOAT
\
||
subtype
==
KK_TSL_DATA_TYPE_DOUBLE
)
{
cJSON_AddNumberToObject
(
subroot
,
subPropertyInfoBuf
.
info
[
k
].
property
,
subPropertyInfoBuf
.
info
[
k
].
value
);
}
else
if
(
subtype
==
KK_TSL_DATA_TYPE_TEXT
||
subtype
==
KK_TSL_DATA_TYPE_DATE
){
cJSON_AddStringToObject
(
subroot
,
subPropertyInfoBuf
.
info
[
k
].
property
,
subPropertyInfoBuf
.
info
[
k
].
valueStr
);
}
}
cJSON_AddItemToObject
(
rootData
,
propertyInfoBuf
[
idx
].
info
[
i
].
property
,
subroot
);
}
}
char
*
outstr
=
cJSON_Print
(
rootData
);
...
...
midware/midware/dm/kk_dm_msg.h
View file @
c53ed887
...
...
@@ -151,7 +151,7 @@ int kk_msg_execute_scene_action(const char* params,const char *fatherDeviceCode)
int
kk_msg_execute_scene_delete
(
const
char
*
params
,
const
char
*
fatherDeviceCode
);
int
dm_msg_thing_syncinfo_reply
(
void
);
int
dm_msg_thing_syncinfopush_reply
(
void
);
void
kk_split
(
char
*
src
,
const
char
*
separator
,
char
**
dest
,
int
*
num
);
//const char DM_URI_SYS_PREFIX[] DM_READ_ONLY = "/sys/%s/%s/";
...
...
midware/midware/dm/kk_linkkit.c
View file @
c53ed887
...
...
@@ -905,6 +905,44 @@ static int kk_service_getCCUVersion_handle(cJSON *param,cJSON *msgId)
cJSON_Delete
(
info
);
return
res
;
}
static
int
kk_service_common_reply
(
cJSON
*
param
,
cJSON
*
msgId
,
char
*
msgType
)
{
int
res
=
0
;
int
i
=
0
,
num
=
0
;
SensorType_t
*
pList
=
NULL
;
char
version
[
VERSION_MAXLEN
]
=
{
0
};
if
(
param
==
NULL
||
msgId
==
NULL
){
return
INVALID_PARAMETER
;
}
cJSON
*
deviceCode
=
cJSON_GetObjectItem
(
param
,
MSG_DEVICE_CODE_STR
);
if
(
deviceCode
==
NULL
){
return
FAIL_RETURN
;
}
cJSON
*
productCode
=
cJSON_GetObjectItem
(
param
,
MSG_PRODUCT_CODE_STR
);
if
(
productCode
==
NULL
){
return
FAIL_RETURN
;
}
cJSON
*
info
=
cJSON_CreateObject
();
cJSON_AddStringToObject
(
info
,
MSG_TYPE_STR
,
msgType
);
cJSON_AddStringToObject
(
info
,
MSG_DEVICE_CODE_STR
,
deviceCode
->
valuestring
);
cJSON_AddStringToObject
(
info
,
MSG_PRODUCT_CODE_STR
,
productCode
->
valuestring
);
char
*
infff
=
cJSON_Print
(
info
);
cJSON
*
payload
=
cJSON_CreateObject
();
cJSON_AddStringToObject
(
payload
,
"desc"
,
"success"
);
cJSON_AddStringToObject
(
payload
,
"version"
,
"1.0"
);
cJSON_AddStringToObject
(
payload
,
"code"
,
"0"
);
cJSON_AddStringToObject
(
payload
,
"msgId"
,
msgId
->
valuestring
);
cJSON
*
Item
=
cJSON_CreateObject
();
cJSON_AddItemToObject
(
payload
,
"params"
,
Item
);
char
*
payload11
=
cJSON_Print
(
payload
);
kk_sendData2app
(
infff
,
payload11
,
0
);
free
(
payload11
);
free
(
infff
);
cJSON_Delete
(
payload
);
cJSON_Delete
(
info
);
return
res
;
}
/************************************************************
*功能描述:获取主机版本信息
*输入参数:params:云端下发数据,包含场景Id等
...
...
@@ -1371,6 +1409,8 @@ static void _iotx_linkkit_event_callback(iotx_dm_event_types_t type, char *data)
cJSON
*
paramStr
=
cJSON_GetObjectItem
(
payload
,
MSG_PARAMS_STR
);
if
(
paramStr
!=
NULL
){
kk_service_bindScene_handle
(
paramStr
,
deviceCode
->
valuestring
);
cJSON
*
msgId
=
cJSON_GetObjectItem
(
payload
,
MSG_COMMON_MSGID
);
kk_service_common_reply
(
info_root
,
msgId
,
"/thing/service/bindScene_reply"
);
}
}
else
if
(
strcmp
(
typeJson
->
valuestring
,
KK_THING_SERVICE_UNBINDSBUTTTON
)
==
0
){
...
...
@@ -1385,6 +1425,8 @@ static void _iotx_linkkit_event_callback(iotx_dm_event_types_t type, char *data)
}
sprintf
(
btnId
,
"%d"
,
buttonId
->
valueint
);
kk_scene_delete_panel_scene_info
(
btnId
,
deviceCode
->
valuestring
);
cJSON
*
msgId
=
cJSON_GetObjectItem
(
payload
,
MSG_COMMON_MSGID
);
kk_service_common_reply
(
info_root
,
msgId
,
"/thing/service/unbindButton_reply"
);
}
}
else
if
(
strcmp
(
typeJson
->
valuestring
,
KK_THING_SERVICE_ACTIVEBUTTON
)
==
0
){
...
...
@@ -1399,6 +1441,8 @@ static void _iotx_linkkit_event_callback(iotx_dm_event_types_t type, char *data)
}
sprintf
(
btnId
,
"%d"
,
buttonId
->
valueint
);
kk_scene_execute_quickpanel
(
btnId
,
deviceCode
->
valuestring
);
cJSON
*
msgId
=
cJSON_GetObjectItem
(
payload
,
MSG_COMMON_MSGID
);
kk_service_common_reply
(
info_root
,
msgId
,
"/thing/service/activeButton_reply"
);
}
}
else
if
(
strcmp
(
typeJson
->
valuestring
,
KK_THING_SERVICE_GETCCUVERSION
)
==
0
){
...
...
midware/midware/dm/kk_sub_db.c
View file @
c53ed887
...
...
@@ -590,9 +590,9 @@ static productype_map_s producTypeMap[] = {
{
"LIGHT_STRIP"
,
"colorDimmableLight"
},
{
"LIGHT_DIMMER"
,
"lightPanel"
},
{
"SOCKET"
,
"outlet"
},
{
"AC_IndoorUnit"
,
"air"
},
{
"AC_IndoorUnit"
,
"air
Conditioning
"
},
{
"FLOOR_HEATING"
,
"floorHeating"
},
{
"FRESH_AIR"
,
"
airConditioning
"
},
{
"FRESH_AIR"
,
"
freshAir
"
},
{
"AIR_SWITCH"
,
"airSwitch"
},
};
int
kk_get_product_type_table_size
(
void
)
...
...
midware/midware/dm/kk_sync_data.c
View file @
c53ed887
...
...
@@ -334,8 +334,6 @@ static cJSON *kk_get_properties_info(char *deviceCode,int devType)
propertyStr
=
(
char
*
)
sqlite3_column_text
(
stmt
,
DB_IDENTIFITER
);
valueType
=
sqlite3_column_int
(
stmt
,
DB_VALUETYPE
);
valueStr
=
(
char
*
)
sqlite3_column_text
(
stmt
,
DB_VALUE
);
printf
(
"[%s][%d]
\n
"
,
__FUNCTION__
,
__LINE__
);
char
*
propertiesbuf
[
64
]
=
{
0
};
int
num
=
0
;
...
...
@@ -420,6 +418,9 @@ static cJSON *kk_get_indoor_properties_info(char *deviceCode)
static
int
kk_get_properties_info_obj
(
char
*
deviceCode
)
{
char
*
sqlCmd
=
NULL
;
int
num
=
0
;
cJSON
*
subObj
=
NULL
;
char
pFinal
[
DEVICE_PROPERTY_NAME_MAX
]
=
{
0
};
//char *zErrMsg = 0;
sqlite3_stmt
*
stmt
;
char
*
propertyStr
=
NULL
;
...
...
@@ -438,17 +439,50 @@ static int kk_get_properties_info_obj(char *deviceCode)
propertyStr
=
(
char
*
)
sqlite3_column_text
(
stmt
,
DB_IDENTIFITER
);
valueType
=
sqlite3_column_int
(
stmt
,
DB_VALUETYPE
);
valueStr
=
(
char
*
)
sqlite3_column_text
(
stmt
,
DB_VALUE
);
if
(
valueType
==
KK_TSL_DATA_TYPE_TEXT
){
cJSON_AddStringToObject
(
obj
,
propertyStr
,
valueStr
);
}
else
if
(
valueType
==
KK_TSL_DATA_TYPE_INT
||
valueType
==
KK_TSL_DATA_TYPE_ENUM
||
valueType
==
KK_TSL_DATA_TYPE_BOOL
){
cJSON_AddNumberToObject
(
obj
,
propertyStr
,
atoi
(
valueStr
));
}
else
if
(
valueType
==
KK_TSL_DATA_TYPE_DOUBLE
){
cJSON_AddNumberToObject
(
obj
,
propertyStr
,
atof
(
valueStr
));
valueStr
=
(
char
*
)
sqlite3_column_text
(
stmt
,
DB_VALUE
);
if
(
strstr
(
propertyStr
,
"."
)
!=
NULL
){
printf
(
"[%s][%d]
\n
"
,
__FUNCTION__
,
__LINE__
);
char
*
propertiesbuf
[
DEVICE_PROPERTY_NAME_MAX
]
=
{
0
};
kk_split
(
propertyStr
,
"."
,
propertiesbuf
,
&
num
);
if
(
num
==
2
){
if
(
strcmp
(
propertiesbuf
[
0
],
pFinal
)
!=
0
){
printf
(
"[%s][%d]
\n
"
,
__FUNCTION__
,
__LINE__
);
memcpy
(
pFinal
,
propertiesbuf
[
0
],
strlen
(
propertiesbuf
[
0
]));
subObj
=
cJSON_CreateObject
();
}
printf
(
"[%s][%d]
\n
"
,
__FUNCTION__
,
__LINE__
);
if
(
strlen
(
pFinal
)
>
0
&&
subObj
!=
NULL
){
if
(
valueType
==
KK_TSL_DATA_TYPE_TEXT
){
cJSON_AddStringToObject
(
subObj
,
propertiesbuf
[
1
],
valueStr
);
}
else
if
(
valueType
==
KK_TSL_DATA_TYPE_INT
||
valueType
==
KK_TSL_DATA_TYPE_ENUM
||
valueType
==
KK_TSL_DATA_TYPE_BOOL
){
cJSON_AddNumberToObject
(
subObj
,
propertiesbuf
[
1
],
atoi
(
valueStr
));
}
else
if
(
valueType
==
KK_TSL_DATA_TYPE_DOUBLE
){
cJSON_AddNumberToObject
(
subObj
,
propertiesbuf
[
1
],
atof
(
valueStr
));
}
}
}
//printf("---------------------------------------->pFinal:%s,num:%d\n",pFinal,epNumInt);
}
else
{
printf
(
"[%s][%d]
\n
"
,
__FUNCTION__
,
__LINE__
);
if
(
valueType
==
KK_TSL_DATA_TYPE_TEXT
){
cJSON_AddStringToObject
(
obj
,
propertyStr
,
valueStr
);
}
else
if
(
valueType
==
KK_TSL_DATA_TYPE_INT
||
valueType
==
KK_TSL_DATA_TYPE_ENUM
||
valueType
==
KK_TSL_DATA_TYPE_BOOL
){
cJSON_AddNumberToObject
(
obj
,
propertyStr
,
atoi
(
valueStr
));
}
else
if
(
valueType
==
KK_TSL_DATA_TYPE_DOUBLE
){
cJSON_AddNumberToObject
(
obj
,
propertyStr
,
atof
(
valueStr
));
}
}
}
if
(
subObj
!=
NULL
){
cJSON_AddItemToObject
(
obj
,
pFinal
,
subObj
);
}
//printf("[%s][%d]\n",__FUNCTION__,__LINE__);
sqlite3_free
(
sqlCmd
);
sqlite3_finalize
(
stmt
);
return
obj
;
...
...
midware/midware/midware.c
View file @
c53ed887
...
...
@@ -581,9 +581,19 @@ static int kk_alarm_notify_handle(dm_mgr_dev_node_t *node,char *identifier,char
}
else
if
(
strcmp
(
identifier
,
"SmokeSensorState"
)
==
0
&&
atoi
(
valueBuf
)
==
1
){
cJSON_AddStringToObject
(
param
,
"CommonAlarmState"
,
"1"
);
needSave
=
1
;
}
else
if
(
strcmp
(
identifier
,
"GasSensorState"
)
==
0
&&
atoi
(
valueBuf
)
==
1
){
cJSON_AddStringToObject
(
param
,
"CommonAlarmState"
,
"1"
);
needSave
=
1
;
}
else
if
(
strcmp
(
identifier
,
"WaterSensorState"
)
==
0
&&
atoi
(
valueBuf
)
==
1
){
cJSON_AddStringToObject
(
param
,
"CommonAlarmState"
,
"1"
);
needSave
=
1
;
}
else
if
(
strcmp
(
identifier
,
"DismantleState"
)
==
0
&&
atoi
(
valueBuf
)
==
0
){
}
else
if
(
strcmp
(
identifier
,
"SmokeSensorState"
)
==
0
&&
atoi
(
valueBuf
)
==
0
){
}
else
if
(
strcmp
(
identifier
,
"GasSensorState"
)
==
0
&&
atoi
(
valueBuf
)
==
0
){
}
else
if
(
strcmp
(
identifier
,
"WaterSensorState"
)
==
0
&&
atoi
(
valueBuf
)
==
0
){
}
else
{
cJSON_AddStringToObject
(
param
,
"CommonAlarmState"
,
"1"
);
...
...
@@ -912,18 +922,18 @@ void kk_platMsg_handle(void* data, char* chalMark){
itemData
->
data_value
.
type
==
KK_TSL_DATA_TYPE_ENUM
||
itemData
->
data_value
.
type
==
KK_TSL_DATA_TYPE_BOOL
){
sprintf
(
valueBuf
,
"%d"
,
itemDataIdentifier
->
valueint
);
kk_tsl_set_value
(
kk_tsl_set_event_output_value
,
node
->
dev_shadow
,
tmpStr
,
&
itemDataIdentifier
->
valueint
,
NULL
);
//
kk_tsl_set_value(kk_tsl_set_event_output_value,node->dev_shadow,tmpStr,&itemDataIdentifier->valueint,NULL);
}
else
if
(
itemData
->
data_value
.
type
==
KK_TSL_DATA_TYPE_FLOAT
||
itemData
->
data_value
.
type
==
KK_TSL_DATA_TYPE_DOUBLE
){
sprintf
(
valueBuf
,
"%f"
,
itemDataIdentifier
->
valuedouble
);
kk_tsl_set_value
(
kk_tsl_set_event_output_value
,
node
->
dev_shadow
,
tmpStr
,
&
itemDataIdentifier
->
valuedouble
,
NULL
);
//
kk_tsl_set_value(kk_tsl_set_event_output_value,node->dev_shadow,tmpStr,&itemDataIdentifier->valuedouble,NULL);
}
else
if
(
itemData
->
data_value
.
type
==
KK_TSL_DATA_TYPE_TEXT
||
itemData
->
data_value
.
type
==
KK_TSL_DATA_TYPE_DATE
){
sprintf
(
valueBuf
,
"%s"
,
itemDataIdentifier
->
valuestring
);
kk_tsl_set_value
(
kk_tsl_set_event_output_value
,
node
->
dev_shadow
,
tmpStr
,
NULL
,
itemDataIdentifier
->
valuestring
);
//
kk_tsl_set_value(kk_tsl_set_event_output_value,node->dev_shadow,tmpStr,NULL,itemDataIdentifier->valuestring);
}
if
(
sensorDev
){
kk_alarm_notify_handle
(
node
,
itemData
->
identifier
,
valueBuf
);
//告警信息处理
...
...
midware/midware/scene/kk_scene_handle.c
View file @
c53ed887
...
...
@@ -1087,7 +1087,10 @@ int kk_scene_parse_addscene(const cJSON* args,char *sceneId,int isUpdate,const c
return
INVALID_PARAMETER
;
}
cJSON
*
room_id
=
cJSON_GetObjectItem
(
args
,
MSG_SCENE_ROOM_ID
);
if
(
room_id
==
NULL
)
return
FAIL_RETURN
;
if
(
room_id
==
NULL
)
{
INFO_PRINT
(
"NOT Contain the room info
\n
"
);
}
cJSON
*
name
=
cJSON_GetObjectItem
(
args
,
MSG_SCENE_SCENE_NAME
);
if
(
name
==
NULL
)
return
FAIL_RETURN
;
cJSON
*
sceneType
=
cJSON_GetObjectItem
(
args
,
MSG_SCENE_SCENCTYPE
);
...
...
@@ -1104,9 +1107,14 @@ int kk_scene_parse_addscene(const cJSON* args,char *sceneId,int isUpdate,const c
}
}
char
roomIdStr
[
32
]
=
{
0
};
snprintf
(
roomIdStr
,
32
,
"%d"
,
room_id
->
valueint
);
res
=
kk_scene_insert_scene_info
(
roomIdStr
,
name
->
valuestring
,
sceneType
->
valueint
,
enable
->
valueint
,
sceneId
);
//多合一面板绑定的时候可能不带roomid
if
(
room_id
!=
NULL
){
char
roomIdStr
[
32
]
=
{
0
};
snprintf
(
roomIdStr
,
32
,
"%d"
,
room_id
->
valueint
);
res
=
kk_scene_insert_scene_info
(
roomIdStr
,
name
->
valuestring
,
sceneType
->
valueint
,
enable
->
valueint
,
sceneId
);
}
else
{
res
=
kk_scene_insert_scene_info
(
"-1"
,
name
->
valuestring
,
sceneType
->
valueint
,
enable
->
valueint
,
sceneId
);
}
/*多控直接下发给网关处理*/
if
(
enable
->
valueint
==
1
&&
sceneType
->
valueint
==
DB_SCENETYPE_MUTICONTROL
){
kk_scene_parse_scene_muticontrol
(
args
,
sceneId
,
isUpdate
);
...
...
nx5_soc_gw/kk_device_def.json
View file @
c53ed887
...
...
@@ -9,13 +9,11 @@
"type"
:
"ZR"
,
"ota"
:
true
,
"b_pid"
:
3001
,
"productType"
:
"switch"
,
"eps"
:
[
{
"ep"
:
"1"
,
"zid"
:
"0103"
,
"zname"
:
"On/Off Light Switch"
,
"b_oid"
:
0
,
"cluster"
:
{
"client"
:
"0003:0019"
,
...
...
@@ -30,13 +28,11 @@
"type"
:
"ZR"
,
"ota"
:
true
,
"b_pid"
:
3002
,
"productType"
:
"switch"
,
"eps"
:
[
{
"ep"
:
"1:2"
,
"zid"
:
"0103"
,
"zname"
:
"On/Off Light Switch"
,
"b_oid"
:
0
,
"cluster"
:
{
"client"
:
"0003:0019"
,
...
...
@@ -51,13 +47,11 @@
"type"
:
"ZR"
,
"ota"
:
true
,
"b_pid"
:
3003
,
"productType"
:
"switch"
,
"eps"
:
[
{
"ep"
:
"1:2:3"
,
"zid"
:
"0103"
,
"zname"
:
"On/Off Light Switch"
,
"b_oid"
:
0
,
"cluster"
:
{
"client"
:
"0003:0019"
,
...
...
@@ -72,14 +66,12 @@
"type"
:
"ZR"
,
"ota"
:
true
,
"b_pid"
:
3004
,
"productType"
:
"scene"
,
"eps"
:
[
{
"ep"
:
"1:2:3:4"
,
"zid"
:
"0004"
,
"zname"
:
"Scene Selector"
,
"b_oid"
:
0
,
"cluster"
:
{
"client"
:
"0003:0019"
,
"server"
:
"0000:0003:0004:0005:0006"
...
...
@@ -93,13 +85,11 @@
"type"
:
"ZR"
,
"ota"
:
true
,
"b_pid"
:
3005
,
"productType"
:
"curtain"
,
"eps"
:
[
{
"ep"
:
"1"
,
"zid"
:
"0203"
,
"zname"
:
"Window Covering Controller"
,
"b_oid"
:
0
,
"cluster"
:
{
"client"
:
"0003:0019"
,
...
...
@@ -114,13 +104,11 @@
"type"
:
"ZR"
,
"ota"
:
true
,
"b_pid"
:
3006
,
"productType"
:
"curtain"
,
"eps"
:
[
{
"ep"
:
"1:2"
,
"zid"
:
"0203"
,
"zname"
:
"Window Covering Controller"
,
"b_oid"
:
0
,
"cluster"
:
{
"client"
:
"0003:0019"
,
...
...
@@ -135,14 +123,12 @@
"type"
:
"ZR"
,
"ota"
:
true
,
"b_pid"
:
3007
,
"productType"
:
"curtain"
,
"eps"
:
[
{
"ep"
:
"1"
,
"zid"
:
"0203"
,
"zname"
:
"Window Covering Controller"
,
"b_oid"
:
0
,
"cluster"
:
{
"client"
:
"0003:0019"
,
"server"
:
"0000:0003:0004:0005:0006:0102"
...
...
@@ -156,13 +142,11 @@
"type"
:
"ZR"
,
"ota"
:
true
,
"b_pid"
:
3008
,
"productType"
:
"curtain"
,
"eps"
:
[
{
"ep"
:
"1:2"
,
"zid"
:
"0203"
,
"zname"
:
"Window Covering Controller"
,
"b_oid"
:
0
,
"cluster"
:
{
"client"
:
"0003:0019"
,
...
...
@@ -177,13 +161,11 @@
"type"
:
"ZR"
,
"ota"
:
true
,
"b_pid"
:
3009
,
"productType"
:
"switch"
,
"eps"
:
[
{
"ep"
:
"1"
,
"zid"
:
"0103"
,
"zname"
:
"On/Off Light Switch"
,
"b_oid"
:
0
,
"cluster"
:
{
"client"
:
"0003:0019"
,
...
...
@@ -198,13 +180,11 @@
"type"
:
"ZR"
,
"ota"
:
true
,
"b_pid"
:
3010
,
"productType"
:
"switch"
,
"eps"
:
[
{
"ep"
:
"1:2"
,
"zid"
:
"0103"
,
"zname"
:
"On/Off Light Switch"
,
"b_oid"
:
0
,
"cluster"
:
{
"client"
:
"0003:0019"
,
...
...
@@ -219,13 +199,11 @@
"type"
:
"ZR"
,
"ota"
:
true
,
"b_pid"
:
3011
,
"productType"
:
"switch"
,
"eps"
:
[
{
"ep"
:
"1:2:3"
,
"zid"
:
"0103"
,
"zname"
:
"On/Off Light Switch"
,
"b_oid"
:
0
,
"cluster"
:
{
"client"
:
"0003:0019"
,
...
...
@@ -240,13 +218,11 @@
"type"
:
"ZR"
,
"ota"
:
true
,
"b_pid"
:
3012
,
"productType"
:
"curtain"
,
"eps"
:
[
{
"ep"
:
"1"
,
"zid"
:
"0203"
,
"zname"
:
"Window Covering Controller"
,
"b_oid"
:
0
,
"cluster"
:
{
"client"
:
"0003:0019"
,
...
...
@@ -261,13 +237,11 @@
"type"
:
"ZR"
,
"ota"
:
true
,
"b_pid"
:
3013
,
"productType"
:
"scene"
,
"eps"
:
[
{
"ep"
:
"1:2:3"
,
"zid"
:
"0004"
,
"zname"
:
"Scene Selector"
,
"b_oid"
:
0
,
"cluster"
:
{
"client"
:
"0003:0019"
,
...
...
@@ -282,13 +256,11 @@
"type"
:
"ZSED"
,
"ota"
:
false
,
"b_pid"
:
3014
,
"productType"
:
"scene"
,
"eps"
:
[
{
"ep"
:
"1:2:3"
,
"zid"
:
"0004"
,
"zname"
:
"Scene Selector"
,
"b_oid"
:
0
,
"cluster"
:
{
"client"
:
"0003"
,
...
...
@@ -303,14 +275,12 @@
"type"
:
"ZSED"
,
"ota"
:
false
,
"b_pid"
:
3015
,
"productType"
:
"IASsensor"
,
"eps"
:
[
{
"ep"
:
"1"
,
"zid"
:
"0402"
,
"zname"
:
"IAS Zone"
,
"zone_type"
:
"002C"
,
"b_oid"
:
0
,
"cluster"
:
{
"client"
:
"0003"
,
...
...
@@ -325,14 +295,12 @@
"type"
:
"ZR"
,
"ota"
:
true
,
"b_pid"
:
3016
,
"productType"
:
"IASsensor"
,
"eps"
:
[
{
"ep"
:
"1"
,
"zid"
:
"0402"
,
"zname"
:
"IAS Zone"
,
"zone_type"
:
"002C"
,
"b_oid"
:
0
,
"cluster"
:
{
"client"
:
"0003:0019"
,
...
...
@@ -347,13 +315,11 @@
"type"
:
"ZR"
,
"ota"
:
true
,
"b_pid"
:
3017
,
"productType"
:
"actuator"
,
"eps"
:
[
{
"ep"
:
"1"
,
"zid"
:
"0203"
,
"zname"
:
"Window Covering Controller"
,
"b_oid"
:
0
,
"cluster"
:
{
"client"
:
"0003:0019"
,
...
...
@@ -368,14 +334,12 @@
"type"
:
"ZR"
,
"ota"
:
true
,
"b_pid"
:
3018
,
"productType"
:
"lightPanel"
,
"eps"
:
[
{
"ep"
:
"1"
,
"zid"
:
"0101"
,
"zname"
:
"Dimmable Light"
,
"b_oid"
:
0
,
"cluster"
:
{
"client"
:
"0003:0019"
,
"server"
:
"0000:0003:0004:0005:0006:0008"
...
...
@@ -389,13 +353,11 @@
"type"
:
"ZR"
,
"ota"
:
true
,
"b_pid"
:
3019
,
"productType"
:
"outlet"
,
"eps"
:
[
{
"ep"
:
"1"
,
"zid"
:
"0051"
,
"zname"
:
"Smart Plug"
,
"b_oid"
:
0
,
"cluster"
:
{
"client"
:
"0003:0019"
,
...
...
@@ -410,13 +372,11 @@
"type"
:
"ZR"
,
"ota"
:
true
,
"b_pid"
:
3020
,
"productType"
:
"outlet"
,
"eps"
:
[
{
"ep"
:
"1"
,
"zid"
:
"0051"
,
"zname"
:
"Smart Plug"
,
"b_oid"
:
0
,
"cluster"
:
{
"client"
:
"0003:0019"
,
...
...
@@ -431,13 +391,11 @@
"type"
:
"ZR"
,
"ota"
:
true
,
"b_pid"
:
3021
,
"productType"
:
"curtain"
,
"eps"
:
[
{
"ep"
:
"1"
,
"zid"
:
"0203"
,
"zname"
:
"Window Covering Controller"
,
"b_oid"
:
0
,
"cluster"
:
{
"client"
:
"0003:0019"
,
...
...
@@ -452,13 +410,11 @@
"type"
:
"ZR"
,
"ota"
:
true
,
"b_pid"
:
3022
,
"productType"
:
"switch"
,
"eps"
:
[
{
"ep"
:
"1"
,
"zid"
:
"0103"
,
"zname"
:
"On/Off Light Switch"
,
"b_oid"
:
0
,
"cluster"
:
{
"client"
:
"0003:0019"
,
...
...
@@ -473,13 +429,11 @@
"type"
:
"ZR"
,
"ota"
:
true
,
"b_pid"
:
3023
,
"productType"
:
"switch"
,
"eps"
:
[
{
"ep"
:
"1:2"
,
"zid"
:
"0103"
,
"zname"
:
"On/Off Light Switch"
,
"b_oid"
:
0
,
"cluster"
:
{
"client"
:
"0003:0019"
,
...
...
@@ -494,13 +448,11 @@
"type"
:
"ZR"
,
"ota"
:
true
,
"b_pid"
:
3024
,
"productType"
:
"switch"
,
"eps"
:
[
{
"ep"
:
"1:2:3"
,
"zid"
:
"0103"
,
"zname"
:
"On/Off Light Switch"
,
"b_oid"
:
0
,
"cluster"
:
{
"client"
:
"0003:0019"
,
...
...
@@ -515,13 +467,11 @@
"type"
:
"ZR"
,
"ota"
:
true
,
"b_pid"
:
3025
,
"productType"
:
"scene"
,
"eps"
:
[
{
"ep"
:
"1:2:3:4"
,
"zid"
:
"0004"
,
"zname"
:
"Scene Selector"
,
"b_oid"
:
0
,
"cluster"
:
{
"client"
:
"0003:0019"
,
...
...
@@ -536,13 +486,11 @@
"type"
:
"ZR"
,
"ota"
:
true
,
"b_pid"
:
3026
,
"productType"
:
"curtain"
,
"eps"
:
[
{
"ep"
:
"1"
,
"zid"
:
"0203"
,
"zname"
:
"Window Covering Controller"
,
"b_oid"
:
0
,
"cluster"
:
{
"client"
:
"0003:0019"
,
...
...
@@ -557,13 +505,11 @@
"type"
:
"ZR"
,
"ota"
:
true
,
"b_pid"
:
3027
,
"productType"
:
"curtain"
,
"eps"
:
[
{
"ep"
:
"1:2"
,
"zid"
:
"0203"
,
"zname"
:
"Window Covering Controller"
,
"b_oid"
:
0
,
"cluster"
:
{
"client"
:
"0003:0019"
,
...
...
@@ -578,13 +524,11 @@
"type"
:
"ZR"
,
"ota"
:
true
,
"b_pid"
:
3028
,
"productType"
:
"lightPanel"
,
"eps"
:
[
{
"ep"
:
"1"
,
"zid"
:
"0080"
,
"zname"
:
"Dimmable Light"
,
"b_oid"
:
0
,
"cluster"
:
{
"client"
:
"0003:0019"
,
...
...
@@ -599,13 +543,11 @@
"type"
:
"ZR"
,
"ota"
:
true
,
"b_pid"
:
3029
,
"productType"
:
"floorHeating"
,
"eps"
:
[
{
"ep"
:
"1"
,
"zid"
:
"0300"
,
"zname"
:
"Heating Cooling Unit"
,
"b_oid"
:
0
,
"cluster"
:
{
"client"
:
"0003:0006"
,
...
...
@@ -620,13 +562,11 @@
"type"
:
"ZR"
,
"ota"
:
true
,
"b_pid"
:
3030
,
"productType"
:
"floorHeating"
,
"eps"
:
[
{
"ep"
:
"1"
,
"zid"
:
"0300"
,
"zname"
:
"Heating Cooling Unit"
,
"b_oid"
:
0
,
"cluster"
:
{
"client"
:
"0003:0006"
,
...
...
@@ -641,13 +581,11 @@
"type"
:
"ZR"
,
"ota"
:
true
,
"b_pid"
:
3031
,
"productType"
:
"fanCoil"
,
"eps"
:
[
{
"ep"
:
"1"
,
"zid"
:
"0300"
,
"zname"
:
"Heating Cooling Unit"
,
"b_oid"
:
0
,
"cluster"
:
{
"client"
:
"0003:0006"
,
...
...
@@ -662,13 +600,11 @@
"type"
:
"ZR"
,
"ota"
:
true
,
"b_pid"
:
3032
,
"productType"
:
"freshAir"
,
"eps"
:
[
{
"ep"
:
"1"
,
"zid"
:
"0300"
,
"zname"
:
"Heating Cooling Unit"
,
"b_oid"
:
0
,
"cluster"
:
{
"client"
:
"0003:0006"
,
...
...
@@ -683,13 +619,11 @@
"type"
:
"ZR"
,
"ota"
:
true
,
"b_pid"
:
3033
,
"productType"
:
"airConditioning"
,
"eps"
:
[
{
"ep"
:
"1"
,
"zid"
:
"0300"
,
"zname"
:
"Heating Cooling Unit"
,
"b_oid"
:
0
,
"cluster"
:
{
"client"
:
"0003:0006"
,
...
...
@@ -704,13 +638,11 @@
"type"
:
"ZR"
,
"ota"
:
true
,
"b_pid"
:
3034
,
"productType"
:
"airConditioning"
,
"eps"
:
[
{
"ep"
:
"1"
,
"zid"
:
"0300"
,
"zname"
:
"Heating Cooling Unit"
,
"b_oid"
:
0
,
"cluster"
:
{
"client"
:
"0003:0006"
,
...
...
@@ -725,13 +657,11 @@
"type"
:
"ZR"
,
"ota"
:
true
,
"b_pid"
:
3035
,
"productType"
:
"airConditioning"
,
"eps"
:
[
{
"ep"
:
"1"
,
"zid"
:
"0300"
,
"zname"
:
"Heating Cooling Unit"
,
"b_oid"
:
0
,
"cluster"
:
{
"client"
:
"0003:0006"
,
...
...
@@ -746,13 +676,11 @@
"type"
:
"ZR"
,
"ota"
:
true
,
"b_pid"
:
3036
,
"productType"
:
"airConditioning"
,
"eps"
:
[
{
"ep"
:
"1"
,
"zid"
:
"0300"
,
"zname"
:
"Heating Cooling Unit"
,
"b_oid"
:
0
,
"cluster"
:
{
"client"
:
"0003:0006"
,
...
...
@@ -767,13 +695,11 @@
"type"
:
"ZR"
,
"ota"
:
true
,
"b_pid"
:
3037
,
"productType"
:
"outlet"
,
"eps"
:
[
{
"ep"
:
"1"
,
"zid"
:
"0051"
,
"zname"
:
"Smart Plug"
,
"b_oid"
:
0
,
"cluster"
:
{
"client"
:
"0003:0019"
,
...
...
@@ -788,13 +714,11 @@
"type"
:
"ZR"
,
"ota"
:
true
,
"b_pid"
:
3038
,
"productType"
:
"outlet"
,
"eps"
:
[
{
"ep"
:
"1"
,
"zid"
:
"0051"
,
"zname"
:
"Smart Plug"
,
"b_oid"
:
0
,
"cluster"
:
{
"client"
:
"0003:0019"
,
...
...
@@ -809,14 +733,13 @@
"type"
:
"ZSED"
,
"ota"
:
false
,
"b_pid"
:
3039
,
"productType"
:
"IASsensor"
,
"eps"
:
[
{
"ep"
:
"1"
,
"ep"
:
"1"
,
"zid"
:
"0402"
,
"zname"
:
"IAS Zone"
,
"zone_type"
:
"002A"
,
"b_oid"
:
0
,
"cluster"
:
{
"client"
:
"0003"
,
...
...
@@ -831,14 +754,13 @@
"type"
:
"ZSED"
,
"ota"
:
false
,
"b_pid"
:
3040
,
"productType"
:
"IASsensor"
,
"eps"
:
[
{
"ep"
:
"1"
,
"ep"
:
"1"
,
"zid"
:
"0402"
,
"zname"
:
"IAS Zone"
,
"zone_type"
:
"002B"
,
"b_oid"
:
0
,
"cluster"
:
{
"client"
:
"0003"
,
...
...
@@ -853,14 +775,13 @@
"type"
:
"ZSED"
,
"ota"
:
false
,
"b_pid"
:
3041
,
"productType"
:
"IASsensor"
,
"eps"
:
[
{
"ep"
:
"1"
,
"ep"
:
"1"
,
"zid"
:
"0402"
,
"zname"
:
"IAS Zone"
,
"zone_type"
:
"0028"
,
"b_oid"
:
0
,
"cluster"
:
{
"client"
:
"0003"
,
...
...
@@ -875,14 +796,13 @@
"type"
:
"ZSED"
,
"ota"
:
false
,
"b_pid"
:
3042
,
"productType"
:
"IASsensor"
,
"eps"
:
[
{
"ep"
:
"1"
,
"ep"
:
"1"
,
"zid"
:
"0402"
,
"zname"
:
"IAS Zone"
,
"zone_type"
:
"000D"
,
"b_oid"
:
0
,
"cluster"
:
{
"client"
:
"0003"
,
...
...
@@ -897,14 +817,13 @@
"type"
:
"ZSED"
,
"ota"
:
false
,
"b_pid"
:
3043
,
"productType"
:
"IASsensor"
,
"eps"
:
[
{
"ep"
:
"1"
,
"ep"
:
"1"
,
"zid"
:
"0402"
,
"zname"
:
"IAS Zone"
,
"zone_type"
:
"000D"
,
"b_oid"
:
0
,
"cluster"
:
{
"client"
:
"0003"
,
...
...
@@ -919,14 +838,13 @@
"type"
:
"ZR"
,
"ota"
:
true
,
"b_pid"
:
3044
,
"productType"
:
"siren"
,
"eps"
:
[
{
"ep"
:
"1"
,
"ep"
:
"1"
,
"zid"
:
"0403"
,
"zname"
:
"IAS Warnning Device"
,
"zone_type"
:
"0225"
,
"b_oid"
:
0
,
"cluster"
:
{
"client"
:
"0003:0019"
,
...
...
@@ -941,14 +859,13 @@
"type"
:
"ZSED"
,
"ota"
:
false
,
"b_pid"
:
3045
,
"productType"
:
"IASsensor"
,
"eps"
:
[
{
"ep"
:
"1"
,
"ep"
:
"1"
,
"zid"
:
"0402"
,
"zname"
:
"IAS Zone"
,
"zone_type"
:
"0015"
,
"b_oid"
:
0
,
"cluster"
:
{
"client"
:
"0003"
,
...
...
@@ -963,13 +880,11 @@
"type"
:
"ZSED"
,
"ota"
:
false
,
"b_pid"
:
3046
,
"productType"
:
"scene"
,
"eps"
:
[
{
"ep"
:
"1"
,
"zid"
:
"0002"
,
"zname"
:
"On/Off Output"
,
"b_oid"
:
0
,
"cluster"
:
{
"client"
:
"0003"
,
...
...
@@ -984,13 +899,11 @@
"type"
:
"ZSED"
,
"ota"
:
false
,
"b_pid"
:
3048
,
"productType"
:
"Environmental"
,
"eps"
:
[
{
"ep"
:
"1"
,
"zid"
:
"0302"
,
"zname"
:
"Temperature Sensor"
,
"b_oid"
:
0
,
"cluster"
:
{
"client"
:
"0003"
,
...
...
@@ -1005,14 +918,13 @@
"type"
:
"ZSED"
,
"ota"
:
false
,
"b_pid"
:
3049
,
"productType"
:
"IASsensor"
,
"eps"
:
[
{
"ep"
:
"1"
,
"ep"
:
"1"
,
"zid"
:
"0402"
,
"zname"
:
"IAS Zone"
,
"zone_type"
:
"000D"
,
"b_oid"
:
0
,
"cluster"
:
{
"client"
:
"0003"
,
...
...
@@ -1027,14 +939,13 @@
"type"
:
"ZSED"
,
"ota"
:
false
,
"b_pid"
:
3050
,
"productType"
:
"IASsensor"
,
"eps"
:
[
{
"ep"
:
"1"
,
"ep"
:
"1"
,
"zid"
:
"0402"
,
"zname"
:
"IAS Zone"
,
"zone_type"
:
"0015"
,
"b_oid"
:
0
,
"cluster"
:
{
"client"
:
"0003"
,
...
...
@@ -1049,15 +960,14 @@
"type"
:
"ZSED"
,
"ota"
:
true
,
"b_pid"
:
3051
,
"productType"
:
"IASsensor"
,
"eps"
:
[
{
"ep"
:
"1"
,
"ep"
:
"1"
,
"zid"
:
"0402"
,
"zname"
:
"IAS Zone"
,
"zone_type"
:
"0015"
,
"b_oid"
:
0
,
"cluster"
:
{
"client"
:
"0003:0019"
,
"server"
:
"0000:0003:0500"
...
...
@@ -1071,14 +981,12 @@
"type"
:
"ZSED"
,
"ota"
:
true
,
"b_pid"
:
3052
,
"productType"
:
"Environmental"
,
"eps"
:
[
{
"ep"
:
"1"
,
"zid"
:
"0302"
,
"zname"
:
"Temperature Sensor"
,
"b_oid"
:
0
,
"cluster"
:
{
"client"
:
"0019"
,
"server"
:
"0000:0001:0003:0400:0402:0405"
...
...
@@ -1092,14 +1000,13 @@
"type"
:
"ZSED"
,
"ota"
:
true
,
"b_pid"
:
3053
,
"productType"
:
"IASsensor"
,
"eps"
:
[
{
"ep"
:
"1"
,
"ep"
:
"1"
,
"zid"
:
"0402"
,
"zname"
:
"IAS Zone"
,
"zone_type"
:
"000D"
,
"b_oid"
:
0
,
"cluster"
:
{
"client"
:
"0003:0019"
,
...
...
@@ -1114,14 +1021,13 @@
"type"
:
"ZSED"
,
"ota"
:
true
,
"b_pid"
:
3054
,
"productType"
:
"IASsensor"
,
"eps"
:
[
{
"ep"
:
"1"
,
"ep"
:
"1"
,
"zid"
:
"0402"
,
"zname"
:
"IAS Zone"
,
"zone_type"
:
"002C"
,
"b_oid"
:
0
,
"cluster"
:
{
"client"
:
"0003:0019"
,
...
...
@@ -1136,15 +1042,14 @@
"type"
:
"ZSED"
,
"ota"
:
true
,
"b_pid"
:
3055
,
"productType"
:
"IASsensor"
,
"eps"
:
[
{
"ep"
:
"1"
,
"ep"
:
"1"
,
"zid"
:
"0402"
,
"zname"
:
"IAS Zone"
,
"zone_type"
:
"002A"
,
"b_oid"
:
0
,
"cluster"
:
{
"client"
:
"0003:0019"
,
"server"
:
"0000:0003:0500"
...
...
@@ -1158,14 +1063,12 @@
"type"
:
"ZSED"
,
"ota"
:
true
,
"b_pid"
:
3056
,
"productType"
:
"scene"
,
"eps"
:
[
{
"ep"
:
"1"
,
"zid"
:
"0004"
,
"zname"
:
"Scene Selector"
,
"b_oid"
:
0
,
"cluster"
:
{
"client"
:
"0003:0019"
,
"server"
:
"0000:0003:0004:0005:0006"
...
...
@@ -1179,15 +1082,14 @@
"type"
:
"ZR"
,
"ota"
:
true
,
"b_pid"
:
3057
,
"productType"
:
"siren"
,
"eps"
:
[
{
"ep"
:
"1"
,
"ep"
:
"1"
,
"zid"
:
"0403"
,
"zname"
:
"IAS Warnning Device"
,
"zone_type"
:
"0225"
,
"b_oid"
:
0
,
"cluster"
:
{
"client"
:
"0003:0019"
,
"server"
:
"0000:0003:0500"
...
...
@@ -1201,14 +1103,12 @@
"type"
:
"ZR"
,
"ota"
:
true
,
"b_pid"
:
3062
,
"productType"
:
"airConditioningGateway"
,
"eps"
:
[
{
"ep"
:
"1"
,
"zid"
:
"0300"
,
"zname"
:
"Heating Cooling Unit"
,
"b_oid"
:
0
,
"cluster"
:
{
"client"
:
"0003:0006"
,
"server"
:
"0000:0003:0004:0005:0006:0008:0201"
...
...
@@ -1222,14 +1122,12 @@
"type"
:
"ZSED"
,
"ota"
:
false
,
"b_pid"
:
3064
,
"productType"
:
"Doorlock"
,
"eps"
:
[
{
"ep"
:
"1"
,
"zid"
:
"000A"
,
"zname"
:
"Door Lock"
,
"b_oid"
:
0
,
"cluster"
:
{
"client"
:
"0003:0019"
,
"server"
:
"0000:0001:0003:0101:0B05"
...
...
@@ -1243,14 +1141,12 @@
"type"
:
"ZR"
,
"ota"
:
true
,
"b_pid"
:
3067
,
"productType"
:
"curtain"
,
"eps"
:
[
{
"ep"
:
"1"
,
"zid"
:
"0202"
,
"zname"
:
"Window Covering Device"
,
"b_oid"
:
0
,
"cluster"
:
{
"client"
:
"0003:0019"
,
"server"
:
"0000:0003:0004:0005:0006:0102"
...
...
@@ -1264,14 +1160,12 @@
"type"
:
"ZR"
,
"ota"
:
true
,
"b_pid"
:
3068
,
"productType"
:
"curtain"
,
"eps"
:
[
{
"ep"
:
"1"
,
"zid"
:
"0202"
,
"zname"
:
"Window Covering Device"
,
"b_oid"
:
0
,
"cluster"
:
{
"client"
:
"0003:0019"
,
"server"
:
"0000:0003:0004:0005:0006:0102"
...
...
@@ -1285,14 +1179,12 @@
"type"
:
"ZR"
,
"ota"
:
true
,
"b_pid"
:
3069
,
"productType"
:
"switch"
,
"eps"
:
[
{
"ep"
:
"1:2"
,
"zid"
:
"0100"
,
"zname"
:
"On/Off Light"
,
"b_oid"
:
0
,
"cluster"
:
{
"client"
:
"0003:0019"
,
"server"
:
"0000:0003:0004:0005:0006"
...
...
@@ -1306,15 +1198,14 @@
"type"
:
"ZR"
,
"ota"
:
true
,
"b_pid"
:
3070
,
"productType"
:
"IASsensor"
,
"eps"
:
[
{
"ep"
:
"1"
,
"ep"
:
"1"
,
"zid"
:
"0402"
,
"zname"
:
"Security Sensor"
,
"zone_type"
:
"8301"
,
"b_oid"
:
0
,
"cluster"
:
{
"client"
:
"0003:0019"
,
"server"
:
"0000:0003:0004:0005:0006"
...
...
@@ -1328,14 +1219,12 @@
"type"
:
"ZR"
,
"ota"
:
true
,
"b_pid"
:
3071
,
"productType"
:
"waterValve"
,
"eps"
:
[
{
"ep"
:
"1"
,
"zid"
:
"0330"
,
"zname"
:
"Water Valve"
,
"b_oid"
:
0
,
"cluster"
:
{
"client"
:
"0003:0019"
,
"server"
:
"0000:0003:0004:0005:0006"
...
...
@@ -1349,14 +1238,12 @@
"type"
:
"ZR"
,
"ota"
:
true
,
"b_pid"
:
3072
,
"productType"
:
"gasValve"
,
"eps"
:
[
{
"ep"
:
"1"
,
"zid"
:
"0331"
,
"zname"
:
"Gas Valve"
,
"b_oid"
:
0
,
"cluster"
:
{
"client"
:
"0003:0019"
,
"server"
:
"0000:0003:0004:0005:0006"
...
...
@@ -1370,25 +1257,20 @@
"type"
:
"ZR"
,
"ota"
:
true
,
"b_pid"
:
3073
,
"productType"
:
"colorDimmableLight"
,
"eps"
:
[
{
"ep"
:
"1"
,
"zid"
:
"0102"
,
"zname"
:
"Color Dimmable Light"
,
"b_oid"
:
0
,
"cluster"
:
{
"client"
:
"0003:0019"
,
"server"
:
"0000:0003:0004:0005:0006:0008:0300"
}
},
{
"ep"
:
"2"
,
"zid"
:
"0101"
,
"zname"
:
"Dimmable Light"
,
"b_oid"
:
0
,
"cluster"
:
{
"client"
:
""
,
"server"
:
"0004:0005:0006:0008"
...
...
@@ -1402,14 +1284,12 @@
"type"
:
"ZR"
,
"ota"
:
true
,
"b_pid"
:
3076
,
"productType"
:
"Environmental"
,
"eps"
:
[
{
"ep"
:
"1"
,
"zid"
:
"0302"
,
"zname"
:
"Temperature Sensor"
,
"b_oid"
:
0
,
"cluster"
:
{
"client"
:
"0003:0019"
,
"server"
:
"0000:0003:0402:0405:0400"
...
...
@@ -1423,14 +1303,12 @@
"type"
:
"ZR"
,
"ota"
:
true
,
"b_pid"
:
3078
,
"productType"
:
"switch"
,
"eps"
:
[
{
"ep"
:
"1:2:3:4"
,
"zid"
:
"0103"
,
"zname"
:
"On/Off Light Switch"
,
"b_oid"
:
0
,
"cluster"
:
{
"client"
:
"0003:0019"
,
"server"
:
"0000:0003:0004:0005:0006"
...
...
@@ -1444,14 +1322,12 @@
"type"
:
"ZR"
,
"ota"
:
true
,
"b_pid"
:
3079
,
"productType"
:
"switch"
,
"eps"
:
[
{
"ep"
:
"1:2:3:4"
,
"zid"
:
"0103"
,
"zname"
:
"On/Off Light Switch"
,
"b_oid"
:
0
,
"cluster"
:
{
"client"
:
"0003:0019"
,
"server"
:
"0000:0003:0004:0005:0006"
...
...
@@ -1465,15 +1341,14 @@
"type"
:
"ZR"
,
"ota"
:
true
,
"b_pid"
:
3080
,
"productType"
:
"IASsensor"
,
"eps"
:
[
{
"ep"
:
"1"
,
"ep"
:
"1"
,
"zid"
:
"0402"
,
"zname"
:
"IAS Zone"
,
"zone_type"
:
"002B"
,
"b_oid"
:
0
,
"cluster"
:
{
"client"
:
"0003:0019"
,
"server"
:
"0000:0003:0500"
...
...
@@ -1487,15 +1362,14 @@
"type"
:
"ZSED"
,
"ota"
:
true
,
"b_pid"
:
3081
,
"productType"
:
"IASsensor"
,
"eps"
:
[
{
"ep"
:
"1"
,
"ep"
:
"1"
,
"zid"
:
"0402"
,
"zname"
:
"IAS Zone"
,
"zone_type"
:
"0028"
,
"b_oid"
:
0
,
"cluster"
:
{
"client"
:
"0003:0019"
,
"server"
:
"0000:0003:0500"
...
...
@@ -1509,15 +1383,14 @@
"type"
:
"ZR"
,
"ota"
:
true
,
"b_pid"
:
3082
,
"productType"
:
"IASsensor"
,
"eps"
:
[
{
"ep"
:
"1"
,
"ep"
:
"1"
,
"zid"
:
"0402"
,
"zname"
:
"IAS Zone"
,
"zone_type"
:
"002B"
,
"b_oid"
:
0
,
"cluster"
:
{
"client"
:
"0003:0019"
,
"server"
:
"0000:0003:0500"
...
...
@@ -1531,15 +1404,14 @@
"type"
:
"ZSED"
,
"ota"
:
true
,
"b_pid"
:
3083
,
"productType"
:
"IASsensor"
,
"eps"
:
[
{
"ep"
:
"1"
,
"ep"
:
"1"
,
"zid"
:
"0402"
,
"zname"
:
"IAS Zone"
,
"zone_type"
:
"0028"
,
"b_oid"
:
0
,
"cluster"
:
{
"client"
:
"0003:0019"
,
"server"
:
"0000:0003:0500"
...
...
@@ -1553,13 +1425,11 @@
"type"
:
"ZR"
,
"ota"
:
true
,
"b_pid"
:
3084
,
"productType"
:
"Environmental"
,
"eps"
:
[
{
"ep"
:
"1"
,
"zid"
:
"0302"
,
"zname"
:
"Temperature Sensor"
,
"b_oid"
:
0
,
"cluster"
:
{
"client"
:
"0003:0019"
,
...
...
@@ -1574,13 +1444,11 @@
"type"
:
"ZR"
,
"ota"
:
true
,
"b_pid"
:
3085
,
"productType"
:
"switch"
,
"eps"
:
[
{
"ep"
:
"1"
,
"zid"
:
"0103"
,
"zname"
:
"On/Off Light Switch"
,
"b_oid"
:
0
,
"cluster"
:
{
"client"
:
"0003:0019"
,
...
...
@@ -1595,13 +1463,11 @@
"type"
:
"ZR"
,
"ota"
:
true
,
"b_pid"
:
3086
,
"productType"
:
"switch"
,
"eps"
:
[
{
"ep"
:
"1:2"
,
"zid"
:
"0103"
,
"zname"
:
"On/Off Light Switch"
,
"b_oid"
:
0
,
"cluster"
:
{
"client"
:
"0003:0019"
,
...
...
@@ -1616,13 +1482,11 @@
"type"
:
"ZR"
,
"ota"
:
true
,
"b_pid"
:
3087
,
"productType"
:
"switch"
,
"eps"
:
[
{
"ep"
:
"1:2:3"
,
"zid"
:
"0103"
,
"zname"
:
"On/Off Light Switch"
,
"b_oid"
:
0
,
"cluster"
:
{
"client"
:
"0003:0019"
,
...
...
@@ -1637,13 +1501,11 @@
"type"
:
"ZR"
,
"ota"
:
true
,
"b_pid"
:
3088
,
"productType"
:
"curtain"
,
"eps"
:
[
{
"ep"
:
"1"
,
"zid"
:
"0203"
,
"zname"
:
"Window Covering Controller"
,
"b_oid"
:
0
,
"cluster"
:
{
"client"
:
"0003:0019"
,
...
...
@@ -1658,13 +1520,11 @@
"type"
:
"ZR"
,
"ota"
:
true
,
"b_pid"
:
3089
,
"productType"
:
"curtain"
,
"eps"
:
[
{
"ep"
:
"1:2"
,
"zid"
:
"0203"
,
"zname"
:
"Window Covering Controller"
,
"b_oid"
:
0
,
"cluster"
:
{
"client"
:
"0003:0019"
,
...
...
@@ -1679,13 +1539,11 @@
"type"
:
"ZR"
,
"ota"
:
true
,
"b_pid"
:
3090
,
"productType"
:
"scene"
,
"eps"
:
[
{
"ep"
:
"1:2:3:4"
,
"zid"
:
"0004"
,
"zname"
:
"Scene Selector"
,
"b_oid"
:
0
,
"cluster"
:
{
"client"
:
"0003:0019"
,
...
...
@@ -1700,13 +1558,11 @@
"type"
:
"ZR"
,
"ota"
:
true
,
"b_pid"
:
3091
,
"productType"
:
"lightPanel"
,
"eps"
:
[
{
"ep"
:
"1:21"
,
"zid"
:
"0101"
,
"zname"
:
"Dimmable Light"
,
"b_oid"
:
0
,
"cluster"
:
{
"client"
:
"0003:0019"
,
...
...
@@ -1721,13 +1577,11 @@
"type"
:
"ZR"
,
"ota"
:
true
,
"b_pid"
:
3092
,
"productType"
:
"lightPanel"
,
"eps"
:
[
{
"ep"
:
"1:2:21:22"
,
"zid"
:
"0101"
,
"zname"
:
"Dimmable Light"
,
"b_oid"
:
0
,
"cluster"
:
{
"client"
:
"0003:0019"
,
...
...
@@ -1742,13 +1596,30 @@
"type"
:
"ZR"
,
"ota"
:
true
,
"b_pid"
:
3093
,
"productType"
:
"lightPanel"
,
"eps"
:
[
{
"zid"
:
"0101"
,
"cluster"
:
{
"client"
:
"0003:0019"
,
"server"
:
"0000:0003:0004:0005:0006:0008:0B05"
}
}
]
},
{
"pid"
:
"01010001"
,
"name"
:
"Dimmable Light Module 1G"
,
"type"
:
"ZR"
,
"ota"
:
true
,
"b_pid"
:
3094
,
"productType"
:
"lightPanel"
,
"eps"
:
[
{
"ep"
:
"1:2:3:21:22:23"
,
"zid"
:
"0101"
,
"zname"
:
"Dimmable Light"
,
"b_oid"
:
0
,
"cluster"
:
{
"client"
:
"0003:0019"
,
...
...
@@ -1763,13 +1634,11 @@
"type"
:
"ZR"
,
"ota"
:
true
,
"b_pid"
:
3095
,
"productType"
:
"airConditioning"
,
"eps"
:
[
{
"ep"
:
"1:2:3"
,
"zid"
:
"0300"
,
"zname"
:
"Heating Cooling Unit"
,
"b_oid"
:
0
,
"cluster"
:
{
"client"
:
"0003:0006"
,
...
...
@@ -1784,13 +1653,11 @@
"type"
:
"ZR"
,
"ota"
:
true
,
"b_pid"
:
3097
,
"productType"
:
"floorHeating"
,
"eps"
:
[
{
"ep"
:
"1:2:3"
,
"zid"
:
"0300"
,
"zname"
:
"Heating Cooling Unit"
,
"b_oid"
:
0
,
"cluster"
:
{
"client"
:
"0003:0006"
,
...
...
@@ -1805,13 +1672,11 @@
"type"
:
"ZR"
,
"ota"
:
true
,
"b_pid"
:
3098
,
"productType"
:
"fanCoil"
,
"eps"
:
[
{
"ep"
:
"1:2:3"
,
"zid"
:
"0300"
,
"zname"
:
"Heating Cooling Unit"
,
"b_oid"
:
0
,
"cluster"
:
{
"client"
:
"0003:0006"
,
...
...
@@ -1826,13 +1691,11 @@
"type"
:
"ZR"
,
"ota"
:
true
,
"b_pid"
:
3099
,
"productType"
:
"freshAir"
,
"eps"
:
[
{
"ep"
:
"1:2:3"
,
"zid"
:
"0300"
,
"zname"
:
"Heating Cooling Unit"
,
"b_oid"
:
0
,
"cluster"
:
{
"client"
:
"0003:0006"
,
...
...
@@ -1847,13 +1710,11 @@
"type"
:
"ZR"
,
"ota"
:
true
,
"b_pid"
:
3102
,
"productType"
:
"lightPanel"
,
"eps"
:
[
{
"ep"
:
"1"
,
"zid"
:
"0101"
,
"zname"
:
"Dimmable Light"
,
"b_oid"
:
0
,
"cluster"
:
{
"client"
:
"0003:0019"
,
...
...
@@ -1868,13 +1729,11 @@
"type"
:
"ZR"
,
"ota"
:
true
,
"b_pid"
:
3104
,
"productType"
:
"voicePanel"
,
"eps"
:
[
{
"ep"
:
"1:2:3:4"
,
"zid"
:
"0103"
,
"zname"
:
"On/Off Light Switch"
,
"b_oid"
:
0
,
"cluster"
:
{
"client"
:
"0003:0019"
,
...
...
@@ -1882,10 +1741,7 @@
}
},
{
"ep"
:
"5:6:7:8"
,
"zid"
:
"0004"
,
"zname"
:
"Scene Selector"
,
"b_oid"
:
0
,
"cluster"
:
{
"client"
:
"0003:0019"
,
...
...
@@ -1893,10 +1749,7 @@
}
},
{
"ep"
:
"9"
,
"zid"
:
"0007"
,
"zname"
:
"Combined Interface"
,
"b_oid"
:
0
,
"cluster"
:
{
"client"
:
"0003:0019"
,
...
...
@@ -1911,14 +1764,13 @@
"type"
:
"ZSED"
,
"ota"
:
true
,
"b_pid"
:
3105
,
"productType"
:
"IASsensor"
,
"eps"
:
[
{
"ep"
:
"1"
,
"ep"
:
"1"
,
"zid"
:
"0402"
,
"zname"
:
"IAS Zone"
,
"zone_type"
:
"0028"
,
"b_oid"
:
0
,
"cluster"
:
{
"client"
:
"0003:0019"
,
...
...
@@ -1933,14 +1785,13 @@
"type"
:
"ZR"
,
"ota"
:
true
,
"b_pid"
:
3106
,
"productType"
:
"IASsensor"
,
"eps"
:
[
{
"ep"
:
"1"
,
"ep"
:
"1"
,
"zid"
:
"0402"
,
"zname"
:
"IAS Zone"
,
"zone_type"
:
"002B"
,
"b_oid"
:
0
,
"cluster"
:
{
"client"
:
"0003:0019"
,
...
...
@@ -1955,13 +1806,11 @@
"type"
:
"ZR"
,
"ota"
:
true
,
"b_pid"
:
3108
,
"productType"
:
"waterValve"
,
"eps"
:
[
{
"ep"
:
"1"
,
"zid"
:
"0002"
,
"zname"
:
"On/Off Output"
,
"b_oid"
:
0
,
"cluster"
:
{
"client"
:
"0003:0019"
,
...
...
@@ -1976,13 +1825,11 @@
"type"
:
"ZR"
,
"ota"
:
true
,
"b_pid"
:
3110
,
"productType"
:
"scene"
,
"eps"
:
[
{
"ep"
:
"1:2:3:4:5:6"
,
"zid"
:
"0004"
,
"zname"
:
"Scene Selector"
,
"b_oid"
:
0
,
"cluster"
:
{
"client"
:
"0003:0019"
,
...
...
@@ -1991,19 +1838,36 @@
}
]
},
{
"pid"
:
"00068634"
,
"name"
:
"HD Wall switch 4G"
,
"type"
:
"ZR"
,
"ota"
:
true
,
"b_pid"
:
3115
,
"productType"
:
"switch"
,
"eps"
:
[
{
"zid"
:
"0103"
,
"cluster"
:
{
"client"
:
"0003:0019"
,
"server"
:
"0000:0003:0004:0005:0006"
}
}
]
},
{
"pid"
:
"000A0002"
,
"name"
:
"YC Doorlock"
,
"type"
:
"ZSED"
,
"ota"
:
false
,
"b_pid"
:
4508
,
"productType"
:
"Doorlock"
,
"eps"
:
[
{
"ep"
:
"1"
,
"zid"
:
"000A"
,
"zname"
:
"Door Lock"
,
"b_oid"
:
0
,
"cluster"
:
{
"client"
:
"0003:0019"
,
...
...
nx5_soc_gw/smarthome_z3gw_nx5
View file @
c53ed887
No preview for this file type
opcodeMapCfg/device_3073.json
0 → 100644
View file @
c53ed887
{
"productCode"
:
"3073"
,
"operateType"
:
"505"
,
"channel"
:
1
,
"syn_type"
:
1
,
"syn_opcode"
:
"DIMMABLE_LIGHT_STATUS"
,
"newccu"
:[
{
"identifier"
:
"PowerSwitch"
,
"opcodemap"
:
"SWITCH"
,
"dataType"
:
"int"
,
"channel"
:
"1"
,
"valueRange"
:[
0
,
1
],
"value"
:
0
},{
"identifier"
:
"Brightness"
,
"opcodemap"
:
"ADJUST_LUMINANCE"
,
"dataType"
:
"int"
,
"channel"
:
"1"
,
"valueRange"
:[],
"value"
:
0
},{
"identifier"
:
"WhiteBrightness"
,
"opcodemap"
:
"ADJUST_WHITE_LUMINANCE"
,
"dataType"
:
"int"
,
"channel"
:
"1"
,
"valueRange"
:[],
"value"
:
0
}
],
"oldccu"
:[
{
"opcode"
:
"SWITCH"
,
"identifiermap"
:
"PowerSwitch"
,
"dataType"
:
"map"
,
"channel"
:
"1"
,
"valueRange"
:[
"OFF"
,
"ON"
],
"syn"
:
"on"
,
"synType"
:
"bool"
},{
"opcode"
:
"ADJUST_LUMINANCE"
,
"identifiermap"
:
"Brightness"
,
"dataType"
:
"int"
,
"channel"
:
"1"
,
"valueRange"
:[],
"syn"
:
"bri"
,
"synType"
:
"int"
},{
"opcode"
:
"ADJUST_WHITE_LUMINANCE"
,
"identifiermap"
:
"WhiteBrightness"
,
"dataType"
:
"int"
,
"channel"
:
"1"
,
"valueRange"
:[],
"syn"
:
"white_bri"
,
"synType"
:
"int"
}
]
}
\ No newline at end of file
opcodeMapCfg/device_3102.json
0 → 100644
View file @
c53ed887
{
"productCode"
:
"3102"
,
"operateType"
:
"502"
,
"channel"
:
1
,
"syn_type"
:
1
,
"syn_opcode"
:
"DIMMABLE_LIGHT_STATUS"
,
"newccu"
:[
{
"identifier"
:
"PowerSwitch"
,
"opcodemap"
:
"SWITCH"
,
"dataType"
:
"int"
,
"channel"
:
"1"
,
"valueRange"
:[
0
,
1
],
"value"
:
0
},{
"identifier"
:
"Brightness"
,
"opcodemap"
:
"ADJUST_LUMINANCE"
,
"dataType"
:
"int"
,
"channel"
:
"1"
,
"valueRange"
:[],
"value"
:
0
}
],
"oldccu"
:[
{
"opcode"
:
"SWITCH"
,
"identifiermap"
:
"PowerSwitch"
,
"dataType"
:
"map"
,
"channel"
:
"1"
,
"valueRange"
:[
"OFF"
,
"ON"
],
"syn"
:
"on"
,
"synType"
:
"bool"
},{
"opcode"
:
"ADJUST_LUMINANCE"
,
"identifiermap"
:
"Brightness"
,
"dataType"
:
"int"
,
"channel"
:
"1"
,
"valueRange"
:[],
"syn"
:
"bri"
,
"synType"
:
"int"
}
]
}
\ No newline at end of file
process_check.sh
View file @
c53ed887
#!/bin/sh
#判断进程是否存在,如果不存在就启动它
ccuApps
=
"/app/ccuApps"
restart_process
()
{
$ccuApps
/killall.sh
$ccuApps
/onboot.sh
}
PIDS
=
`
ps|grep kk_midware |grep
-v
grep
|
awk
'{print $1}'
`
if
[
"
$PIDS
"
!=
""
]
;
then
echo
"kk_midware is runing!"
else
export
LD_LIBRARY_PATH
=
/app/ccuApps/lib
/app/ccuApps/bin/kk_midware &
restart_process
;
#运行进程
fi
sleep
3
...
...
@@ -14,8 +20,7 @@ if [ "$PIDS" != "" ]; then
echo
"kk_cloud is runing!"
else
echo
"kk_cloud is not running ,now restart kk_midware and kk_cloud"
export
LD_LIBRARY_PATH
=
/app/ccuApps/lib
/app/ccuApps/bin/kk_cloud &
restart_process
;
fi
sleep
1
PIDS
=
`
ps|grep smarthome_z3gw_nx5 |grep
-v
grep
|
awk
'{print $1}'
`
...
...
@@ -23,8 +28,7 @@ if [ "$PIDS" != "" ]; then
echo
"smarthome_z3gw_nx5 is runing!"
else
echo
"smarthome_z3gw_nx5 is not running ,now restart smarthome_z3gw_nx5"
export
LD_LIBRARY_PATH
=
/app/ccuApps/lib
/app/ccuApps/bin/smarthome_z3gw_nx5
-r0
-l3
--device-def
=
/app/ccuApps/kk_device_def.json
--db
=
/data/kk/kk_z3gw.db
--uart
=
/dev/ttyS1&
restart_process
;
fi
sleep
1
PIDS
=
`
ps|grep kk_lan |grep
-v
grep
|
awk
'{print $1}'
`
...
...
@@ -32,6 +36,5 @@ if [ "$PIDS" != "" ]; then
echo
"kk_lan is runing!"
else
echo
"kk_lan is not running ,now restart kk_lan"
export
LD_LIBRARY_PATH
=
/app/ccuApps/lib
/app/ccuApps/bin/kk_lan &
restart_process
;
fi
tsl/product_3014.json
View file @
c53ed887
...
...
@@ -122,8 +122,9 @@
"identifier"
:
"BatteryAlarm"
,
"method"
:
"thing.event.BatteryAlarm.post"
,
"name"
:
"BatteryAlarm"
,
"type"
:
"al
arm
"
,
"type"
:
"al
ert
"
,
"required"
:
true
,
"alarmbit"
:
3
,
"desc"
:
"低电量告警"
}
]
...
...
tsl/product_3016.json
View file @
c53ed887
...
...
@@ -109,8 +109,9 @@
"identifier"
:
"BatteryAlarm"
,
"method"
:
"thing.event.BatteryAlarm.post"
,
"name"
:
"BatteryAlarm"
,
"type"
:
"al
arm
"
,
"type"
:
"al
ert
"
,
"required"
:
true
,
"alarmbit"
:
3
,
"desc"
:
"低电量告警"
}
]
...
...
tsl/product_3018.json
View file @
c53ed887
{
"schema"
:
"https://iot-ap.ikonke.com/model/product_3018.json"
,
"productType"
:
"lightPanel"
,
"version"
:
"1.
0
"
,
"version"
:
"1.
1
"
,
"profile"
:
{
"heartbeat"
:
"300"
,
"productCode"
:
"3018"
,
...
...
tsl/product_3037.json
View file @
c53ed887
...
...
@@ -2,7 +2,6 @@
"schema"
:
"https://iot-ap.ikonke.com/model/product_3037.json"
,
"productType"
:
"outlet"
,
"version"
:
"1.0"
,
"version"
:
"1"
,
"profile"
:
{
"heartbeat"
:
"300"
,
"productCode"
:
"3037"
,
...
...
tsl/product_3039.json
View file @
c53ed887
...
...
@@ -172,8 +172,9 @@
"identifier"
:
"BatteryAlarm"
,
"method"
:
"thing.event.BatteryAlarm.post"
,
"name"
:
"BatteryAlarm"
,
"type"
:
"al
arm
"
,
"type"
:
"al
ert
"
,
"required"
:
true
,
"alarmbit"
:
3
,
"desc"
:
"低电量告警"
}
]
...
...
tsl/product_3041.json
View file @
c53ed887
...
...
@@ -244,8 +244,9 @@
"identifier"
:
"BatteryAlarm"
,
"method"
:
"thing.event.BatteryAlarm.post"
,
"name"
:
"BatteryAlarm"
,
"type"
:
"al
arm
"
,
"type"
:
"al
ert
"
,
"required"
:
true
,
"alarmbit"
:
3
,
"desc"
:
"低电量告警"
},
{
...
...
@@ -254,6 +255,7 @@
"type"
:
"alert"
,
"required"
:
true
,
"method"
:
"thing.event.TamperAlarm.post"
,
"alarmbit"
:
2
,
"outputData"
:
[
{
"identifier"
:
"DismantleState"
,
...
...
@@ -274,6 +276,7 @@
"type"
:
"alert"
,
"required"
:
true
,
"method"
:
"thing.event.sensorAlarm.post"
,
"alarmbit"
:
6
,
"outputData"
:
[
{
"identifier"
:
"SensorState"
,
...
...
tsl/product_3042.json
View file @
c53ed887
...
...
@@ -172,8 +172,9 @@
"identifier"
:
"BatteryAlarm"
,
"method"
:
"thing.event.BatteryAlarm.post"
,
"name"
:
"BatteryAlarm"
,
"type"
:
"al
arm
"
,
"type"
:
"al
ert
"
,
"required"
:
true
,
"alarmbit"
:
3
,
"desc"
:
"低电量告警"
}
]
...
...
tsl/product_3043.json
View file @
c53ed887
...
...
@@ -172,8 +172,9 @@
"identifier"
:
"BatteryAlarm"
,
"method"
:
"thing.event.BatteryAlarm.post"
,
"name"
:
"BatteryAlarm"
,
"type"
:
"al
arm
"
,
"type"
:
"al
ert
"
,
"required"
:
true
,
"alarmbit"
:
3
,
"desc"
:
"低电量告警"
}
]
...
...
tsl/product_3044.json
View file @
c53ed887
...
...
@@ -286,8 +286,9 @@
"identifier"
:
"BatteryAlarm"
,
"method"
:
"thing.event.BatteryAlarm.post"
,
"name"
:
"BatteryAlarm"
,
"type"
:
"al
arm
"
,
"type"
:
"al
ert
"
,
"required"
:
true
,
"alarmbit"
:
3
,
"desc"
:
"低电量告警"
}
]
...
...
tsl/product_3045.json
View file @
c53ed887
...
...
@@ -172,8 +172,9 @@
"identifier"
:
"BatteryAlarm"
,
"method"
:
"thing.event.BatteryAlarm.post"
,
"name"
:
"BatteryAlarm"
,
"type"
:
"al
arm
"
,
"type"
:
"al
ert
"
,
"required"
:
true
,
"alarmbit"
:
3
,
"desc"
:
"低电量告警"
}
]
...
...
tsl/product_3046.json
View file @
c53ed887
...
...
@@ -122,8 +122,9 @@
"identifier"
:
"BatteryAlarm"
,
"method"
:
"thing.event.BatteryAlarm.post"
,
"name"
:
"BatteryAlarm"
,
"type"
:
"al
arm
"
,
"type"
:
"al
ert
"
,
"required"
:
true
,
"alarmbit"
:
3
,
"desc"
:
"低电量告警"
}
]
...
...
tsl/product_3048.json
View file @
c53ed887
...
...
@@ -190,8 +190,9 @@
"identifier"
:
"BatteryAlarm"
,
"method"
:
"thing.event.BatteryAlarm.post"
,
"name"
:
"BatteryAlarm"
,
"type"
:
"al
arm
"
,
"type"
:
"al
ert
"
,
"required"
:
true
,
"alarmbit"
:
3
,
"desc"
:
"低电量告警"
}
]
...
...
tsl/product_3049.json
View file @
c53ed887
...
...
@@ -6,7 +6,7 @@
"heartbeat"
:
"7200"
,
"productCode"
:
"3049"
,
"productName"
:
"Kit Pro人体感应传感器"
,
"sleepTime"
:
"
300
00"
"sleepTime"
:
"
72
00"
},
"services"
:
[
{
...
...
@@ -172,8 +172,9 @@
"identifier"
:
"BatteryAlarm"
,
"method"
:
"thing.event.BatteryAlarm.post"
,
"name"
:
"BatteryAlarm"
,
"type"
:
"al
arm
"
,
"type"
:
"al
ert
"
,
"required"
:
true
,
"alarmbit"
:
3
,
"desc"
:
"低电量告警"
}
]
...
...
tsl/product_3050.json
View file @
c53ed887
...
...
@@ -172,7 +172,7 @@
"identifier"
:
"BatteryAlarm"
,
"method"
:
"thing.event.BatteryAlarm.post"
,
"name"
:
"BatteryAlarm"
,
"type"
:
"al
arm
"
,
"type"
:
"al
ert
"
,
"required"
:
true
,
"desc"
:
"低电量告警"
}
...
...
tsl/product_3051.json
View file @
c53ed887
...
...
@@ -6,7 +6,7 @@
"heartbeat"
:
"1200"
,
"productCode"
:
"3051"
,
"productName"
:
"邦德系列.门窗传感器(KONKE)"
,
"sleepTime"
:
"
300
00"
"sleepTime"
:
"
72
00"
},
"services"
:
[
{
...
...
@@ -150,7 +150,8 @@
"name"
:
"contactAlarm"
,
"type"
:
"alarm"
,
"required"
:
true
,
"desc"
:
"门磁告警"
"desc"
:
"门磁告警"
,
"alarm_bit"
:
1
},
{
"outputData"
:
[
...
...
@@ -172,8 +173,9 @@
"identifier"
:
"BatteryAlarm"
,
"method"
:
"thing.event.BatteryAlarm.post"
,
"name"
:
"BatteryAlarm"
,
"type"
:
"al
arm
"
,
"type"
:
"al
ert
"
,
"required"
:
true
,
"alarmbit"
:
3
,
"desc"
:
"低电量告警"
}
]
...
...
tsl/product_3052.json
View file @
c53ed887
...
...
@@ -6,7 +6,7 @@
"heartbeat"
:
"1200"
,
"productCode"
:
"3052"
,
"productName"
:
"邦德系列.环境传感器(KONKE)"
,
"sleepTime"
:
"
300
00"
"sleepTime"
:
"
12
00"
},
"services"
:
[
{
...
...
@@ -295,8 +295,9 @@
"identifier"
:
"BatteryAlarm"
,
"method"
:
"thing.event.BatteryAlarm.post"
,
"name"
:
"BatteryAlarm"
,
"type"
:
"al
arm
"
,
"type"
:
"al
ert
"
,
"required"
:
true
,
"alarmbit"
:
3
,
"desc"
:
"低电量告警"
}
]
...
...
tsl/product_3053.json
View file @
c53ed887
...
...
@@ -172,8 +172,9 @@
"identifier"
:
"BatteryAlarm"
,
"method"
:
"thing.event.BatteryAlarm.post"
,
"name"
:
"BatteryAlarm"
,
"type"
:
"al
arm
"
,
"type"
:
"al
ert
"
,
"required"
:
true
,
"alarmbit"
:
3
,
"desc"
:
"低电量告警"
}
]
...
...
tsl/product_3054.json
View file @
c53ed887
...
...
@@ -160,8 +160,9 @@
"identifier"
:
"BatteryAlarm"
,
"method"
:
"thing.event.BatteryAlarm.post"
,
"name"
:
"BatteryAlarm"
,
"type"
:
"al
arm
"
,
"type"
:
"al
ert
"
,
"required"
:
true
,
"alarmbit"
:
3
,
"desc"
:
"低电量告警"
}
]
...
...
tsl/product_3055.json
View file @
c53ed887
...
...
@@ -172,8 +172,9 @@
"identifier"
:
"BatteryAlarm"
,
"method"
:
"thing.event.BatteryAlarm.post"
,
"name"
:
"BatteryAlarm"
,
"type"
:
"al
arm
"
,
"type"
:
"al
ert
"
,
"required"
:
true
,
"alarmbit"
:
3
,
"desc"
:
"低电量告警"
}
]
...
...
tsl/product_3056.json
View file @
c53ed887
...
...
@@ -123,8 +123,9 @@
"identifier"
:
"BatteryAlarm"
,
"method"
:
"thing.event.BatteryAlarm.post"
,
"name"
:
"BatteryAlarm"
,
"type"
:
"al
arm
"
,
"type"
:
"al
ert
"
,
"required"
:
true
,
"alarmbit"
:
3
,
"desc"
:
"低电量告警"
}
]
...
...
tsl/product_3057.json
View file @
c53ed887
...
...
@@ -40,7 +40,7 @@
"name"
:
"告警时间"
},
{
"identifier"
:
"
Siren
State"
,
"identifier"
:
"
Alarm
State"
,
"name"
:
"声光告警状态"
,
"dataType"
:
{
"type"
:
"enum"
,
...
...
@@ -159,7 +159,7 @@
"name"
:
"告警时间"
},
{
"identifier"
:
"
Siren
State"
,
"identifier"
:
"
Alarm
State"
,
"accessMode"
:
"rw"
,
"required"
:
true
,
"name"
:
"声光告警状态"
,
...
...
@@ -234,7 +234,7 @@
"name"
:
"告警时间"
},
{
"identifier"
:
"
Siren
State"
,
"identifier"
:
"
Alarm
State"
,
"name"
:
"声光告警状态"
,
"dataType"
:
{
"type"
:
"enum"
,
...
...
@@ -286,8 +286,9 @@
"identifier"
:
"BatteryAlarm"
,
"method"
:
"thing.event.BatteryAlarm.post"
,
"name"
:
"BatteryAlarm"
,
"type"
:
"al
arm
"
,
"type"
:
"al
ert
"
,
"required"
:
true
,
"alarmbit"
:
3
,
"desc"
:
"低电量告警"
}
]
...
...
tsl/product_3064.json
View file @
c53ed887
{
"schema"
:
"https://iot-ap.ikonke.com/model/product_3064.json"
,
"productType"
:
"
sensor
"
,
"productType"
:
"
Doorlock
"
,
"version"
:
"1"
,
"profile"
:
{
"heartbeat"
:
"1200"
,
...
...
@@ -341,7 +341,8 @@
"name"
:
"TamperAlarm"
,
"type"
:
"alert"
,
"required"
:
true
,
"desc"
:
"防拆告警"
"desc"
:
"防拆告警"
,
"alarmbit"
:
2
},
{
"outputData"
:
[
...
...
@@ -363,8 +364,9 @@
"identifier"
:
"BatteryAlarm"
,
"method"
:
"thing.event.BatteryAlarm.post"
,
"name"
:
"BatteryAlarm"
,
"type"
:
"al
arm
"
,
"type"
:
"al
ert
"
,
"required"
:
true
,
"alarmbit"
:
3
,
"desc"
:
"低电量告警"
}
]
...
...
tsl/product_3073.json
View file @
c53ed887
{
"schema"
:
"https://iot-ap.ikonke.com/model/product_3073.json"
,
"productType"
:
"colorDimmableLight"
,
"version"
:
"1.
0
"
,
"version"
:
"1.
1
"
,
"profile"
:
{
"heartbeat"
:
"300"
,
"productCode"
:
"3073"
,
...
...
@@ -71,6 +71,20 @@
},
"name"
:
"RGB调色"
},
{
"identifier"
:
"Brightness"
,
"dataType"
:
{
"type"
:
"int"
,
"specs"
:
{
"min"
:
"1"
,
"max"
:
"100"
,
"unit"
:
"%"
,
"unitName"
:
"百分比"
,
"step"
:
"1"
}
},
"name"
:
"彩灯亮度"
},
{
"identifier"
:
"WhiteBrightness"
,
"dataType"
:
{
...
...
@@ -84,6 +98,28 @@
}
},
"name"
:
"白光亮度"
},
{
"identifier"
:
"Mode"
,
"dataType"
:{
"type"
:
"enum"
,
"specs"
:{
"0"
:
"模式0"
,
"1"
:
"模式1"
,
"2"
:
"模式2"
,
"3"
:
"模式3"
,
"4"
:
"模式4"
,
"5"
:
"模式5"
,
"6"
:
"模式6"
,
"7"
:
"模式7"
,
"8"
:
"模式8"
,
"9"
:
"模式9"
,
"10"
:
"模式10"
,
"11"
:
"模式11"
,
"12"
:
"模式12"
}
},
"name"
:
"模式"
}
],
"method"
:
"thing.service.property.set"
,
...
...
@@ -153,6 +189,20 @@
},
"name"
:
"RGB调色"
},
{
"identifier"
:
"Brightness"
,
"dataType"
:
{
"type"
:
"int"
,
"specs"
:
{
"min"
:
"1"
,
"max"
:
"100"
,
"unit"
:
"%"
,
"unitName"
:
"百分比"
,
"step"
:
"1"
}
},
"name"
:
"彩灯亮度"
},
{
"identifier"
:
"WhiteBrightness"
,
"dataType"
:
{
...
...
@@ -166,13 +216,36 @@
}
},
"name"
:
"白光亮度"
},
{
"identifier"
:
"Mode"
,
"dataType"
:{
"type"
:
"enum"
,
"specs"
:{
"0"
:
"模式0"
,
"1"
:
"模式1"
,
"2"
:
"模式2"
,
"3"
:
"模式3"
,
"4"
:
"模式4"
,
"5"
:
"模式5"
,
"6"
:
"模式6"
,
"7"
:
"模式7"
,
"8"
:
"模式8"
,
"9"
:
"模式9"
,
"10"
:
"模式10"
,
"11"
:
"模式11"
,
"12"
:
"模式12"
}
},
"name"
:
"模式"
}
],
"identifier"
:
"get"
,
"inputData"
:
[
"PowerSwitch"
,
"RGBColor"
,
"WhiteBrightness"
"WhiteBrightness"
,
"Brightness"
],
"method"
:
"thing.service.property.get"
,
"name"
:
"get"
,
...
...
@@ -294,6 +367,20 @@
"accessMode"
:
"rw"
,
"required"
:
true
},
{
"identifier"
:
"Brightness"
,
"dataType"
:
{
"type"
:
"int"
,
"specs"
:
{
"min"
:
"1"
,
"max"
:
"100"
,
"unit"
:
"%"
,
"unitName"
:
"百分比"
,
"step"
:
"1"
}
},
"name"
:
"彩灯亮度"
},
{
"identifier"
:
"WhiteBrightness"
,
"name"
:
"白光亮度"
,
...
...
@@ -309,6 +396,28 @@
"step"
:
"1"
}
}
},
{
"identifier"
:
"Mode"
,
"dataType"
:{
"type"
:
"enum"
,
"specs"
:{
"0"
:
"模式0"
,
"1"
:
"模式1"
,
"2"
:
"模式2"
,
"3"
:
"模式3"
,
"4"
:
"模式4"
,
"5"
:
"模式5"
,
"6"
:
"模式6"
,
"7"
:
"模式7"
,
"8"
:
"模式8"
,
"9"
:
"模式9"
,
"10"
:
"模式10"
,
"11"
:
"模式11"
,
"12"
:
"模式12"
}
},
"name"
:
"模式"
}
],
"events"
:
[
...
...
@@ -373,6 +482,20 @@
},
"name"
:
"RGB调色"
},
{
"identifier"
:
"Brightness"
,
"dataType"
:
{
"type"
:
"int"
,
"specs"
:
{
"min"
:
"1"
,
"max"
:
"100"
,
"unit"
:
"%"
,
"unitName"
:
"百分比"
,
"step"
:
"1"
}
},
"name"
:
"彩灯亮度"
},
{
"identifier"
:
"WhiteBrightness"
,
"dataType"
:
{
...
...
@@ -386,6 +509,28 @@
}
},
"name"
:
"白光亮度"
},
{
"identifier"
:
"Mode"
,
"dataType"
:{
"type"
:
"enum"
,
"specs"
:{
"0"
:
"模式0"
,
"1"
:
"模式1"
,
"2"
:
"模式2"
,
"3"
:
"模式3"
,
"4"
:
"模式4"
,
"5"
:
"模式5"
,
"6"
:
"模式6"
,
"7"
:
"模式7"
,
"8"
:
"模式8"
,
"9"
:
"模式9"
,
"10"
:
"模式10"
,
"11"
:
"模式11"
,
"12"
:
"模式12"
}
},
"name"
:
"模式"
}
],
"identifier"
:
"property"
,
...
...
tsl/product_3076.json
View file @
c53ed887
{
"schema"
:
"https://iot-ap.ikonke.com/model/product_3076.json"
,
"productType"
:
"sensor"
,
"version"
:
"1"
,
"version"
:
"1
.0
"
,
"profile"
:
{
"heartbeat"
:
"300"
,
"productCode"
:
"3076"
,
...
...
tsl/product_3079.json
View file @
c53ed887
...
...
@@ -178,7 +178,8 @@
},
"name"
:
"电源开关"
,
"accessMode"
:
"rw"
,
"required"
:
true
"required"
:
true
,
"epNum"
:
1
},
{
"identifier"
:
"PowerSwitch_2"
,
...
...
@@ -191,7 +192,8 @@
},
"name"
:
"电源开关"
,
"accessMode"
:
"rw"
,
"required"
:
true
"required"
:
true
,
"epNum"
:
2
},
{
"identifier"
:
"PowerSwitch_3"
,
...
...
@@ -204,7 +206,8 @@
},
"name"
:
"电源开关"
,
"accessMode"
:
"rw"
,
"required"
:
true
"required"
:
true
,
"epNum"
:
3
},
{
"identifier"
:
"PowerSwitch_4"
,
...
...
@@ -217,7 +220,8 @@
},
"name"
:
"电源开关"
,
"accessMode"
:
"rw"
,
"required"
:
true
"required"
:
true
,
"epNum"
:
4
},
{
"identifier"
:
"NoDisturbMode"
,
...
...
@@ -230,7 +234,8 @@
},
"name"
:
"勿扰模式开关"
,
"accessMode"
:
"rw"
,
"required"
:
true
"required"
:
true
,
"epNum"
:
1
}
],
"events"
:[
...
...
tsl/product_3080.json
View file @
c53ed887
...
...
@@ -147,6 +147,7 @@
"name"
:
"传感器故障告警"
,
"type"
:
"alert"
,
"required"
:
true
,
"alarmbit"
:
6
,
"method"
:
"thing.event.sensorAlarm.post"
,
"outputData"
:
[
{
...
...
tsl/product_3081.json
View file @
c53ed887
...
...
@@ -244,8 +244,9 @@
"identifier"
:
"BatteryAlarm"
,
"method"
:
"thing.event.BatteryAlarm.post"
,
"name"
:
"BatteryAlarm"
,
"type"
:
"al
arm
"
,
"type"
:
"al
ert
"
,
"required"
:
true
,
"alarmbit"
:
3
,
"desc"
:
"低电量告警"
},
{
...
...
@@ -254,6 +255,7 @@
"type"
:
"alert"
,
"required"
:
true
,
"method"
:
"thing.event.TamperAlarm.post"
,
"alarmbit"
:
2
,
"outputData"
:
[
{
"identifier"
:
"DismantleState"
,
...
...
@@ -273,6 +275,7 @@
"name"
:
"传感器故障告警"
,
"type"
:
"alert"
,
"required"
:
true
,
"alarmbit"
:
6
,
"method"
:
"thing.event.sensorAlarm.post"
,
"outputData"
:
[
{
...
...
tsl/product_3082.json
View file @
c53ed887
...
...
@@ -147,6 +147,7 @@
"name"
:
"传感器故障告警"
,
"type"
:
"alert"
,
"required"
:
true
,
"alarmbit"
:
6
,
"method"
:
"thing.event.sensorAlarm.post"
,
"outputData"
:
[
{
...
...
tsl/product_3083.json
View file @
c53ed887
...
...
@@ -244,8 +244,9 @@
"identifier"
:
"BatteryAlarm"
,
"method"
:
"thing.event.BatteryAlarm.post"
,
"name"
:
"BatteryAlarm"
,
"type"
:
"al
arm
"
,
"type"
:
"al
ert
"
,
"required"
:
true
,
"alarmbit"
:
3
,
"desc"
:
"低电量告警"
},
{
...
...
@@ -254,6 +255,7 @@
"type"
:
"alert"
,
"required"
:
true
,
"method"
:
"thing.event.TamperAlarm.post"
,
"alarmbit"
:
2
,
"outputData"
:
[
{
"identifier"
:
"DismantleState"
,
...
...
@@ -273,6 +275,7 @@
"name"
:
"传感器故障告警"
,
"type"
:
"alert"
,
"required"
:
true
,
"alarmbit"
:
6
,
"method"
:
"thing.event.sensorAlarm.post"
,
"outputData"
:
[
{
...
...
tsl/product_3084.json
View file @
c53ed887
{
"schema"
:
"https://iot-ap.ikonke.com/model/product_3084.json"
,
"productType"
:
"sensor"
,
"version"
:
"1"
,
"version"
:
"1
.0
"
,
"profile"
:
{
"heartbeat"
:
"300"
,
"productCode"
:
"3084"
,
...
...
tsl/product_3091.json
View file @
c53ed887
{
"schema"
:
"https://iot-ap.ikonke.com/model/product_3091.json"
,
"productType"
:
"lightPanel"
,
"version"
:
"1.
0
"
,
"version"
:
"1.
1
"
,
"profile"
:
{
"heartbeat"
:
"300"
,
"productCode"
:
"3091"
,
...
...
tsl/product_3092.json
View file @
c53ed887
{
"schema"
:
"https://iot-ap.ikonke.com/model/product_3092.json"
,
"productType"
:
"lightPanel"
,
"version"
:
"1.
0
"
,
"version"
:
"1.
1
"
,
"profile"
:
{
"heartbeat"
:
"300"
,
"productCode"
:
"3092"
,
...
...
tsl/product_3093.json
View file @
c53ed887
{
"schema"
:
"https://iot-ap.ikonke.com/model/product_3093.json"
,
"productType"
:
"lightPanel"
,
"version"
:
"1.
0
"
,
"version"
:
"1.
1
"
,
"profile"
:
{
"heartbeat"
:
"300"
,
"productCode"
:
"3093"
,
...
...
tsl/product_3094.json
0 → 100644
View file @
c53ed887
{
"schema"
:
"https://iot-ap.ikonke.com/model/product_3094.json"
,
"productType"
:
"lightPanel"
,
"version"
:
"1.1"
,
"profile"
:
{
"heartbeat"
:
"300"
,
"productCode"
:
"3094"
,
"productName"
:
"单路智能调光模块(KONKE)"
},
"services"
:
[
{
"outputData"
:
[],
"identifier"
:
"set"
,
"inputData"
:
[
{
"identifier"
:
"PowerSwitch"
,
"dataType"
:
{
"specs"
:
{
"0"
:
"关闭"
,
"1"
:
"打开"
},
"type"
:
"bool"
},
"name"
:
"电源开关"
},
{
"identifier"
:
"Brightness"
,
"dataType"
:
{
"type"
:
"int"
,
"specs"
:
{
"min"
:
"1"
,
"max"
:
"100"
,
"unit"
:
"%"
,
"unitName"
:
"百分比"
,
"step"
:
"1"
}
},
"name"
:
"亮度"
},
{
"identifier"
:
"ColorTemperature"
,
"dataType"
:
{
"type"
:
"int"
,
"specs"
:
{
"min"
:
"0"
,
"max"
:
"100"
,
"unit"
:
"K"
,
"unitName"
:
"开尔文"
,
"step"
:
"1"
}
},
"name"
:
"色温"
},
{
"identifier"
:
"FadeTime"
,
"dataType"
:
{
"type"
:
"int"
,
"specs"
:
{
"min"
:
"0"
,
"max"
:
"254"
,
"unit"
:
"s"
,
"unitName"
:
"秒"
,
"step"
:
"1"
}
},
"name"
:
"渐变时间"
},
{
"identifier"
:
"LowBrightness"
,
"dataType"
:
{
"type"
:
"int"
,
"specs"
:
{
"min"
:
"10"
,
"max"
:
"90"
,
"unit"
:
"%"
,
"unitName"
:
"百分比"
,
"step"
:
"1"
}
},
"name"
:
"最低亮度"
},
{
"identifier"
:
"HighBrightness"
,
"dataType"
:
{
"type"
:
"int"
,
"specs"
:
{
"min"
:
"20"
,
"max"
:
"100"
,
"unit"
:
"%"
,
"unitName"
:
"百分比"
,
"step"
:
"1"
}
},
"name"
:
"最高亮度"
}
],
"method"
:
"thing.service.property.set"
,
"name"
:
"set"
,
"required"
:
true
,
"callType"
:
"async"
,
"desc"
:
"属性设置"
},
{
"outputData"
:
[
{
"identifier"
:
"PowerSwitch"
,
"dataType"
:
{
"specs"
:
{
"0"
:
"关闭"
,
"1"
:
"打开"
},
"type"
:
"bool"
},
"name"
:
"电源开关"
},
{
"identifier"
:
"Brightness"
,
"dataType"
:
{
"type"
:
"int"
,
"specs"
:
{
"min"
:
"1"
,
"max"
:
"100"
,
"unit"
:
"%"
,
"unitName"
:
"百分比"
,
"step"
:
"1"
}
},
"name"
:
"亮度"
},
{
"identifier"
:
"ColorTemperature"
,
"dataType"
:
{
"type"
:
"int"
,
"specs"
:
{
"min"
:
"0"
,
"max"
:
"100"
,
"unit"
:
"K"
,
"unitName"
:
"开尔文"
,
"step"
:
"1"
}
},
"name"
:
"色温"
},
{
"identifier"
:
"FadeTime"
,
"dataType"
:
{
"type"
:
"int"
,
"specs"
:
{
"min"
:
"0"
,
"max"
:
"254"
,
"unit"
:
"s"
,
"unitName"
:
"秒"
,
"step"
:
"1"
}
},
"name"
:
"渐变时间"
},
{
"identifier"
:
"LowBrightness"
,
"dataType"
:
{
"type"
:
"int"
,
"specs"
:
{
"min"
:
"10"
,
"max"
:
"90"
,
"unit"
:
"%"
,
"unitName"
:
"百分比"
,
"step"
:
"1"
}
},
"name"
:
"最低亮度"
},
{
"identifier"
:
"HighBrightness"
,
"dataType"
:
{
"type"
:
"int"
,
"specs"
:
{
"min"
:
"20"
,
"max"
:
"100"
,
"unit"
:
"%"
,
"unitName"
:
"百分比"
,
"step"
:
"1"
}
},
"name"
:
"最高亮度"
}
],
"identifier"
:
"get"
,
"inputData"
:
[
"PowerSwitch"
,
"Brightness"
,
"ColorTemperature"
,
"FadeTime"
,
"LowBrightness"
,
"HighBrightness"
],
"method"
:
"thing.service.property.get"
,
"name"
:
"get"
,
"required"
:
true
,
"callType"
:
"async"
,
"desc"
:
"属性获取"
},
{
"outputData"
:[
],
"identifier"
:
"negativeProperty"
,
"inputData"
:[
"PowerSwitch"
],
"method"
:
"thing.service.negativeProperty"
,
"name"
:
"negativeProperty"
,
"required"
:
true
,
"callType"
:
"async"
,
"desc"
:
"属性值取反"
}
],
"properties"
:
[
{
"identifier"
:
"PowerSwitch"
,
"dataType"
:
{
"specs"
:
{
"0"
:
"关闭"
,
"1"
:
"打开"
},
"type"
:
"bool"
},
"name"
:
"电源开关"
,
"accessMode"
:
"rw"
,
"required"
:
true
},
{
"identifier"
:
"Brightness"
,
"name"
:
"亮度"
,
"accessMode"
:
"rw"
,
"required"
:
false
,
"dataType"
:
{
"type"
:
"int"
,
"specs"
:
{
"min"
:
"1"
,
"max"
:
"100"
,
"unit"
:
"%"
,
"unitName"
:
"百分比"
,
"step"
:
"1"
}
}
},
{
"identifier"
:
"ColorTemperature"
,
"accessMode"
:
"rw"
,
"required"
:
false
,
"dataType"
:
{
"type"
:
"int"
,
"specs"
:
{
"min"
:
"0"
,
"max"
:
"100"
,
"unit"
:
"K"
,
"unitName"
:
"开尔文"
,
"step"
:
"1"
}
},
"name"
:
"色温"
},
{
"identifier"
:
"FadeTime"
,
"accessMode"
:
"rw"
,
"required"
:
false
,
"dataType"
:
{
"type"
:
"int"
,
"specs"
:
{
"min"
:
"0"
,
"max"
:
"254"
,
"unit"
:
"s"
,
"unitName"
:
"秒"
,
"step"
:
"1"
}
},
"name"
:
"渐变时间"
},
{
"identifier"
:
"LowBrightness"
,
"accessMode"
:
"rw"
,
"required"
:
false
,
"dataType"
:
{
"type"
:
"int"
,
"specs"
:
{
"min"
:
"10"
,
"max"
:
"90"
,
"unit"
:
"%"
,
"unitName"
:
"百分比"
,
"step"
:
"1"
}
},
"name"
:
"最低亮度"
},
{
"identifier"
:
"HighBrightness"
,
"accessMode"
:
"rw"
,
"required"
:
false
,
"dataType"
:
{
"type"
:
"int"
,
"specs"
:
{
"min"
:
"20"
,
"max"
:
"100"
,
"unit"
:
"%"
,
"unitName"
:
"百分比"
,
"step"
:
"1"
}
},
"name"
:
"最高亮度"
}
],
"events"
:
[
{
"outputData"
:
[
{
"identifier"
:
"PowerSwitch"
,
"dataType"
:
{
"specs"
:
{
"0"
:
"关闭"
,
"1"
:
"打开"
},
"type"
:
"bool"
},
"name"
:
"电源开关"
},
{
"identifier"
:
"Brightness"
,
"dataType"
:
{
"type"
:
"int"
,
"specs"
:
{
"min"
:
"1"
,
"max"
:
"100"
,
"unit"
:
"%"
,
"unitName"
:
"百分比"
,
"step"
:
"1"
}
},
"name"
:
"亮度"
},
{
"identifier"
:
"ColorTemperature"
,
"dataType"
:
{
"type"
:
"int"
,
"specs"
:
{
"min"
:
"0"
,
"max"
:
"100"
,
"unit"
:
"K"
,
"unitName"
:
"开尔文"
,
"step"
:
"1"
}
},
"name"
:
"色温"
},
{
"identifier"
:
"FadeTime"
,
"dataType"
:
{
"type"
:
"int"
,
"specs"
:
{
"min"
:
"0"
,
"max"
:
"254"
,
"unit"
:
"s"
,
"unitName"
:
"秒"
,
"step"
:
"1"
}
},
"name"
:
"渐变时间"
},
{
"identifier"
:
"LowBrightness"
,
"dataType"
:
{
"type"
:
"int"
,
"specs"
:
{
"min"
:
"10"
,
"max"
:
"90"
,
"unit"
:
"%"
,
"unitName"
:
"百分比"
,
"step"
:
"1"
}
},
"name"
:
"最低亮度"
},
{
"identifier"
:
"HighBrightness"
,
"dataType"
:
{
"type"
:
"int"
,
"specs"
:
{
"min"
:
"20"
,
"max"
:
"100"
,
"unit"
:
"%"
,
"unitName"
:
"百分比"
,
"step"
:
"1"
}
},
"name"
:
"最高亮度"
}
],
"identifier"
:
"property"
,
"method"
:
"thing.event.property.post"
,
"name"
:
"property"
,
"type"
:
"info"
,
"required"
:
true
,
"desc"
:
"属性上报"
}
]
}
tsl/product_3095.json
View file @
c53ed887
{
"schema"
:
"https://iot-ap.ikonke.com/model/product_3095.json"
,
"productType"
:
"air
condition
"
,
"productType"
:
"air
Conditioning
"
,
"version"
:
"1.0"
,
"profile"
:
{
"heartbeat"
:
"3000"
,
...
...
tsl/version
View file @
c53ed887
1.1.0
\ No newline at end of file
1.1.1
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment