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
3057a861
Commit
3057a861
authored
Jan 18, 2022
by
chen.weican
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【修改内容】修改空调网关因没有内机导致同步死机的BUG
【提交认】陈伟灿
parent
4f152160
Changes
17
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
463 additions
and
234 deletions
+463
-234
application/klansdk/kk_findccu_handle.c
application/klansdk/kk_findccu_handle.c
+1
-1
application/klansdk/kk_lan_main.c
application/klansdk/kk_lan_main.c
+0
-21
application/klansdk/kk_lan_sync.c
application/klansdk/kk_lan_sync.c
+2
-5
midware/midware/dm/kk_dm_msg.h
midware/midware/dm/kk_dm_msg.h
+2
-0
midware/midware/dm/kk_linkkit.c
midware/midware/dm/kk_linkkit.c
+29
-0
midware/midware/dm/kk_property_get_handle.c
midware/midware/dm/kk_property_get_handle.c
+4
-4
midware/midware/dm/kk_sub_db.c
midware/midware/dm/kk_sub_db.c
+13
-0
midware/midware/dm/kk_sync_data.c
midware/midware/dm/kk_sync_data.c
+4
-8
midware/midware/midware.c
midware/midware/midware.c
+7
-0
midware/midware/scene/kk_scene_handle.c
midware/midware/scene/kk_scene_handle.c
+22
-5
nx5_soc_gw/smarthome_z3gw_a133
nx5_soc_gw/smarthome_z3gw_a133
+0
-0
opcodeMapCfg/device_3137.json
opcodeMapCfg/device_3137.json
+1
-1
opcodeMapCfg/device_3172.json
opcodeMapCfg/device_3172.json
+1
-1
tsl/product_3028.json
tsl/product_3028.json
+133
-1
tsl/product_3043.json
tsl/product_3043.json
+235
-180
tsl/product_3062.json
tsl/product_3062.json
+3
-1
tsl/product_3108.json
tsl/product_3108.json
+6
-6
No files found.
application/klansdk/kk_findccu_handle.c
View file @
3057a861
...
...
@@ -94,7 +94,7 @@ void *kk_findccu_handle(void *data)
WARNING_PRINT
(
"read error....
\n
"
);
}
else
{
DEBUG_PRINT
(
"findccu recmsg: %s
\n
"
,
recvline
);
DEBUG_PRINT
(
"findccu frome
ip: %s
\n
"
,
inet_ntoa
(
presaddr
.
sin_addr
));
WARNING_PRINT
(
"findccu from
ip: %s
\n
"
,
inet_ntoa
(
presaddr
.
sin_addr
));
pStart
=
strstr
(
recvline
,
"!"
);
pEnd
=
strstr
(
recvline
,
"$"
);
...
...
application/klansdk/kk_lan_main.c
View file @
3057a861
...
...
@@ -208,32 +208,11 @@ int main(int argc, char* argv[])
int
ret
=
0
;
struct
sigaction
sa
;
//#ifdef CONFIG_8197_PLATFORM
signal
(
SIGPIPE
,
SIG_IGN
);
signal
(
SIGALRM
,
SIG_IGN
);
signal
(
SIGSTOP
,
SIG_IGN
);
//#else
/* setup alarm signal handler */
//#ifdef CONFIG_NX5_PLATFORM
//for(int i=1;i<32;i++){
//signal(i, handler);
//}
//#endif
//#endif
//signal(SIGPIPE, SIG_IGN);
openlog
(
"kk_lan"
,
LOG_CONS
|
LOG_PID
,
LOG_USER
);
//if(prg_run_singleton(argv[0])<0){
//debug_log(LOG_CRITICAL_LEVEL,"[%s]run singleton fail!\n",argv[0]);
//return -1;
//}
kk_lan_pid_init
();
kk_lan_ccuid_init
();
...
...
application/klansdk/kk_lan_sync.c
View file @
3057a861
...
...
@@ -1508,16 +1508,13 @@ int kk_create_syncinfo_to_sdk(cJSON *payload,int push)
cJSON_AddItemToObject
(
root
,
"air_box_devices"
,
air_box_devices
);
alarms
=
cJSON_CreateArray
();
cJSON_AddItemToObject
(
root
,
"alarms"
,
alarms
);
cJSON
*
shortcut_panel_configs
=
cJSON_CreateArray
();
cJSON_AddItemToObject
(
root
,
"shortcut_panel_configs"
,
shortcut_panel_configs
);
ccu_link_status
=
cJSON_CreateObject
();
link_arg
=
cJSON_CreateObject
();
cJSON_AddItemToObject
(
ccu_link_status
,
"link_arg"
,
link_arg
);
cJSON_AddStringToObject
(
ccu_link_status
,
"link_type"
,
"broadband_net"
);
cJSON_AddItemToObject
(
root
,
"ccu_link_status"
,
ccu_link_status
);
printf
(
"[%s][%d]
\n
"
,
__FUNCTION__
,
__LINE__
);
cnwise_music_controllers
=
cJSON_CreateArray
();
cJSON_AddItemToObject
(
root
,
"cnwise_music_controllers"
,
cnwise_music_controllers
);
code_lib_controllers
=
cJSON_CreateArray
();
...
...
midware/midware/dm/kk_dm_msg.h
View file @
3057a861
...
...
@@ -85,6 +85,8 @@ typedef struct {
#define KK_THING_SERVICE_ADDSCENC_REPLY "/thing/service/addScene_reply"
#define KK_THING_SERVICE_DELETESCENC "/thing/service/deleteScene"
#define KK_THING_SERVICE_DELETESCENC_REPLY "/thing/service/deleteScene_reply"
#define KK_THING_SERVICE_ENABLESCENC "/thing/service/enableScene"
#define KK_THING_SERVICE_ENABLESCENC_REPLY "/thing/service/enableScene_reply"
#define KK_THING_SERVICE_UPDATESCENC "/thing/service/updateScene"
#define KK_THING_SERVICE_UPDATESCENC_REPLY "/thing/service/updateScene_reply"
#define KK_THING_SERVICE_PROPERTY_GET_REPLY "/thing/service/property/get_reply"
...
...
midware/midware/dm/kk_linkkit.c
View file @
3057a861
...
...
@@ -1454,6 +1454,28 @@ static int kk_service_updateScene_handle(cJSON *param,cJSON *msgId)
return
res
;
}
/************************************************************
*功能描述:使能场景处理
*输入参数:params:云端下发数据,包含场景名称,场景类型,场景使能,场景Id等
msgId:消息Id
*输出参数:无
*返 回 值: 0:成功;其他:失败
*其他说明:
*************************************************************/
static
int
kk_service_enableScene_handle
(
cJSON
*
param
,
cJSON
*
msgId
)
{
int
res
=
0
;
kk_tsl_t
*
pSceneShadow
=
NULL
;
if
(
param
==
NULL
||
msgId
==
NULL
){
return
INVALID_PARAMETER
;
}
cJSON
*
sceneId
=
cJSON_GetObjectItem
(
param
,
MSG_SCENE_SCENEID
);
if
(
sceneId
==
NULL
)
return
FAIL_RETURN
;
cJSON
*
enable
=
cJSON_GetObjectItem
(
param
,
MSG_SCENE_ENABLE
);
if
(
enable
==
NULL
)
return
FAIL_RETURN
;
kk_scene_update_scene_enable
(
enable
->
valueint
,
sceneId
->
valuestring
);
return
res
;
}
/************************************************************
*功能描述:删除场景处理
*输入参数:params:云端下发数据,包含场景Id等
msgId:消息Id
...
...
@@ -2105,6 +2127,13 @@ static void _iotx_linkkit_event_callback(iotx_dm_event_types_t type, char *data)
kk_service_updateScene_handle
(
paramStr
,
msgId
);
kk_service_common_reply
(
info_root
,
msgId
,
KK_THING_SERVICE_UPDATESCENC_REPLY
);
}
else
if
(
strcmp
(
typeJson
->
valuestring
,
KK_THING_SERVICE_ENABLESCENC
)
==
0
){
INFO_PRINT
(
" enable scene
\n
"
);
cJSON
*
paramStr
=
cJSON_GetObjectItem
(
payload
,
MSG_PARAMS_STR
);
cJSON
*
msgId
=
cJSON_GetObjectItem
(
payload
,
MSG_COMMON_MSGID
);
kk_service_enableScene_handle
(
paramStr
,
msgId
);
kk_service_common_reply
(
info_root
,
msgId
,
KK_THING_SERVICE_ENABLESCENC_REPLY
);
}
else
if
(
strcmp
(
typeJson
->
valuestring
,
KK_THING_SERVICE_DELETESCENC
)
==
0
){
INFO_PRINT
(
"delete scene
\n
"
);
cJSON
*
paramStr
=
cJSON_GetObjectItem
(
payload
,
MSG_PARAMS_STR
);
...
...
midware/midware/dm/kk_property_get_handle.c
View file @
3057a861
...
...
@@ -51,7 +51,7 @@ static int kk_service_get_reply(char *deviceCode,char *productCode,char *msgId,d
cJSON_AddNumberToObject
(
paramInfo
,
"data"
,
(
double
)
param1
);
}
else
if
(
strcmp
(
type
,
"ChildLockState"
)
==
0
){
cJSON_AddNumberToObject
(
paramInfo
,
"ChildLockState"
,
(
int
)
param1
);
}
else
if
(
strcmp
(
type
,
"Power
DownSave
"
)
==
0
){
}
else
if
(
strcmp
(
type
,
"Power
Memory
"
)
==
0
){
cJSON_AddNumberToObject
(
paramInfo
,
"PowerMemory"
,
(
int
)
param1
);
cJSON_AddNumberToObject
(
paramInfo
,
"Mode"
,
(
int
)
1
);
}
else
if
(
strcmp
(
type
,
"Screensaver"
)
==
0
){
...
...
@@ -351,12 +351,12 @@ static int kk_property_WaterValveArgs_handle(char *deviceCode,int epNum,char *ms
mutiDev
=
kk_check_muti_device
(
node
);
if
(
mutiDev
){
memset
(
propertiesTmp
,
0x0
,
sizeof
(
propertiesTmp
));
sprintf
(
propertiesTmp
,
"Power
DownSave
_%d"
,
epNum
);
sprintf
(
propertiesTmp
,
"Power
Memory
_%d"
,
epNum
);
kk_property_db_get_value
(
deviceCode
,
propertiesTmp
,
&
PowerDownSave
);
}
else
{
kk_property_db_get_value
(
deviceCode
,
"Power
DownSave
"
,
&
PowerDownSave
);
kk_property_db_get_value
(
deviceCode
,
"Power
Memory
"
,
&
PowerDownSave
);
}
kk_service_get_reply
(
deviceCode
,
node
->
productCode
,
msgid
,
PowerDownSave
,
1
,
-
1
,
epNum
,
"Power
DownSave
"
);
kk_service_get_reply
(
deviceCode
,
node
->
productCode
,
msgid
,
PowerDownSave
,
1
,
-
1
,
epNum
,
"Power
Memory
"
);
return
SUCCESS_RETURN
;
}
static
int
kk_property_Screensaver_handle
(
char
*
deviceCode
,
int
epNum
,
char
*
msgid
)
...
...
midware/midware/dm/kk_sub_db.c
View file @
3057a861
...
...
@@ -712,6 +712,7 @@ static int _kk_air_switch_handle(char* deviceCode, char *sceneId, char *property
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
devIsExsit
=
0
;
sqlite3_stmt
*
stmt
;
char
*
sqlCmd
=
NULL
;
char
*
pDeviceCode
=
NULL
;
...
...
@@ -747,8 +748,10 @@ int kk_subDev_set_action_by_productType(const char *productType,const char *room
INFO_PRINT
(
"typeArray[k]:%s
\n
"
,
typeArray
[
k
]);
sqlCmd
=
sqlite3_mprintf
(
searchCmd
,
typeArray
[
k
]);
//curtain type
sqlite3_prepare_v2
(
ctx
->
pDb
,
sqlCmd
,
strlen
(
sqlCmd
),
&
stmt
,
NULL
);
devIsExsit
=
0
;
//INFO_PRINT("total_column = %d\n", sqlite3_column_count(stmt));
while
(
sqlite3_step
(
stmt
)
==
SQLITE_ROW
){
pDeviceCode
=
(
char
*
)
sqlite3_column_text
(
stmt
,
DB_SUB_DEVICECODE
);
res
=
dm_mgr_get_device_by_devicecode
(
pDeviceCode
,
&
node
);
if
(
res
!=
SUCCESS_RETURN
)
{
...
...
@@ -804,6 +807,7 @@ int kk_subDev_set_action_by_productType(const char *productType,const char *room
continue
;
}
info
.
delay
=
delay
;
devIsExsit
=
1
;
kk_scene_action_add
(
node
->
fatherDeviceCode
,
sceneId
,
info
);
res
=
kk_scene_insert_scene_action
(
type
,
node
->
deviceCode
,
info
.
epNum
,
property
->
identifier
,
propertyValue
,
info
.
delay
,
sceneId
,
node
->
fatherDeviceCode
);
...
...
@@ -815,6 +819,15 @@ int kk_subDev_set_action_by_productType(const char *productType,const char *room
}
}
}
if
(
devIsExsit
==
0
){
//设置场景,但是又没有对应的设备需要插入一条无效action用于记录propertyName,同步需要
res
=
kk_scene_insert_scene_action
(
type
,
""
,
1
,
propertyName
,
propertyValue
,
delay
,
sceneId
,
""
);
if
(
res
!=
SUCCESS_RETURN
){
INFO_PRINT
(
"kk_subDev_set_action_by_productType fail!!!
\n
"
);
//return res;
continue
;
}
}
sqlite3_finalize
(
stmt
);
sqlite3_free
(
sqlCmd
);
}
...
...
midware/midware/dm/kk_sync_data.c
View file @
3057a861
...
...
@@ -482,12 +482,12 @@ static cJSON *kk_get_indoor_properties_info(char *deviceCode)
}
}
cJSON_AddItemToArray
(
eps
,
propertyItem
);
sqlite3_free
(
sqlCmd
);
sqlite3_finalize
(
stmt
);
}
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_subfreshair_properties_info
(
char
*
deviceCode
)
...
...
@@ -675,15 +675,13 @@ static int kk_get_panelConfig_info(cJSON *decvies,char *deviceCode)
}
cJSON
*
panelConfig
=
NULL
;
sqlCmd
=
sqlite3_mprintf
(
"select * from QuickPanelScene WHERE deviceCode = '%s' "
,
deviceCode
);
sqlite3_prepare_v2
(
ctx
->
pDb
,
sqlCmd
,
strlen
(
sqlCmd
),
&
stmt
,
NULL
);
while
(
sqlite3_step
(
stmt
)
==
SQLITE_ROW
){
if
(
mFlag
==
0
){
mFlag
=
1
;
panelConfig
=
cJSON_CreateArray
();
}
}
cJSON
*
item
=
cJSON_CreateObject
();
cJSON
*
action
=
cJSON_CreateObject
();
...
...
@@ -706,7 +704,6 @@ static int kk_get_panelConfig_info(cJSON *decvies,char *deviceCode)
cJSON_AddStringToObject
(
item
,
"buttonId"
,
buttonId
);
cJSON_AddItemToArray
(
panelConfig
,
item
);
}
if
(
mFlag
==
1
){
cJSON_AddItemToObject
(
decvies
,
"panelConfig"
,
panelConfig
);
}
...
...
@@ -770,14 +767,13 @@ static int kk_get_sub_devices_info(cJSON *gwdevicesItem,char *deviceCode)
subProductCode
=
(
char
*
)
sqlite3_column_text
(
stmt
,
DB_SUB_PRODUCTCODE
);
subVersion
=
(
char
*
)
sqlite3_column_text
(
stmt
,
DB_SUB_VERSION
);
subIsline
=
(
char
*
)
sqlite3_column_text
(
stmt
,
DB_SUB_ONLINE
);
subproductType
=
(
char
*
)
sqlite3_column_text
(
stmt
,
DB_SUB_PRODUCTTYPE
);
subproductType
=
(
char
*
)
sqlite3_column_text
(
stmt
,
DB_SUB_PRODUCTTYPE
);
cJSON_AddStringToObject
(
subdevicesItem
,
KK_SYNC_DEVICECODE_STR
,
subDeviceCode
);
cJSON_AddStringToObject
(
subdevicesItem
,
KK_SYNC_VERSION_STR
,
subVersion
);
_kk_deviceCode_switchto_mac
(
subDeviceCode
,
macaddr
);
cJSON_AddStringToObject
(
subdevicesItem
,
KK_SYNC_MAC_STR
,
macaddr
);
cJSON_AddNumberToObject
(
subdevicesItem
,
KK_SYNC_ONLINE_STR
,
(
strcmp
(
subIsline
,
"0"
)
==
0
)
?
1
:
0
);
kk_get_panelConfig_info
(
subdevicesItem
,
subDeviceCode
);
cJSON_AddStringToObject
(
subdevicesItem
,
KK_SYNC_PRODUCTCODE_STR
,
subProductCode
);
...
...
midware/midware/midware.c
View file @
3057a861
...
...
@@ -1165,6 +1165,13 @@ static int kk_subDevice_property_handle(cJSON *info,cJSON *payload,char *deviceC
}
static
int
_kk_subDevice_online_to_app
(
cJSON
*
info
,
cJSON
*
payload
)
{
char
ccuid
[
32
]
=
{
0
};
HAL_Get_ccuid
(
ccuid
);
cJSON
*
param
=
cJSON_GetObjectItem
(
payload
,
"params"
);
if
(
param
==
NULL
){
return
-
1
;
}
cJSON_AddStringToObject
(
param
,
"ccuCode"
,
ccuid
);
char
*
payload11
=
cJSON_Print
(
payload
);
char
*
infff
=
cJSON_Print
(
info
);
printf
(
"------------------------payload11:%s
\n
"
,
payload11
);
...
...
midware/midware/scene/kk_scene_handle.c
View file @
3057a861
...
...
@@ -533,12 +533,12 @@ int kk_scene_action_add(const char *gwdeviceCode,const char *sceneId,kk_scene_ac
cJSON_AddStringToObject
(
info
,
MSG_SCENE_PROPERTYNAME
,
ptr
->
actionInfo
->
info
.
propertyName
);
if
(
strstr
(
ptr
->
actionInfo
->
info
.
propertyValue
,
"{"
)
!=
NULL
&&
strstr
(
ptr
->
actionInfo
->
info
.
propertyValue
,
"}"
)
!=
NULL
){
prtyObj
=
cJSON_Parse
(
ptr
->
actionInfo
->
info
.
propertyValue
);
if
(
prtyObj
!=
NULL
){
cJSON_AddItemToObject
(
info
,
MSG_SCENE_PROPERTYVALUE
,
prtyObj
);
}
else
{
//
prtyObj = cJSON_Parse(ptr->actionInfo->info.propertyValue);
//
if(prtyObj != NULL){
//
cJSON_AddItemToObject(info, MSG_SCENE_PROPERTYVALUE, prtyObj);
//
}else{
cJSON_AddStringToObject
(
info
,
MSG_SCENE_PROPERTYVALUE
,
ptr
->
actionInfo
->
info
.
propertyValue
);
}
//
}
}
else
{
//开启/关闭取反操作
if
(
strcmp
(
ptr
->
actionInfo
->
info
.
propertyName
,
"PowerSwitch"
)
==
0
&&
strcmp
(
ptr
->
actionInfo
->
info
.
propertyValue
,
"2"
)
==
0
){
...
...
@@ -1164,6 +1164,23 @@ static int _kk_scene_LightStripSpecialAction_handle(cJSON* propertyValue,char *d
kk_scene_action_add
(
fatherDeviceCode
,
sceneId
,
info
);
}
memset
(
&
info
,
0x0
,
sizeof
(
kk_scene_action_detail_t
));
cJSON
*
WhiteBrightness
=
cJSON_GetObjectItem
(
propertyValue
,
"WhiteBrightness"
);
if
(
WhiteBrightness
!=
NULL
&&
WhiteBrightness
->
type
==
cJSON_Number
){
sprintf
(
info
.
propertyValue
,
"%d"
,
WhiteBrightness
->
valueint
);
memcpy
(
info
.
propertyName
,
"WhiteBrightness"
,
strlen
(
"WhiteBrightness"
));
memcpy
(
info
.
deviceCode
,
deviceCode
,
strlen
(
deviceCode
));
info
.
epNum
=
ep
;
info
.
delay
=
idelay
;
kk_scene_action_add
(
fatherDeviceCode
,
sceneId
,
info
);
}
else
if
(
WhiteBrightness
!=
NULL
&&
WhiteBrightness
->
type
==
cJSON_String
){
memcpy
(
info
.
propertyValue
,
WhiteBrightness
->
valuestring
,
strlen
(
WhiteBrightness
->
valuestring
));
memcpy
(
info
.
propertyName
,
"WhiteBrightness"
,
strlen
(
"WhiteBrightness"
));
memcpy
(
info
.
deviceCode
,
deviceCode
,
strlen
(
deviceCode
));
info
.
epNum
=
ep
;
info
.
delay
=
idelay
;
kk_scene_action_add
(
fatherDeviceCode
,
sceneId
,
info
);
}
memset
(
&
info
,
0x0
,
sizeof
(
kk_scene_action_detail_t
));
cJSON
*
RGBColor
=
cJSON_GetObjectItem
(
propertyValue
,
"RGBColor"
);
if
(
RGBColor
!=
NULL
&&
RGBColor
->
type
==
cJSON_String
){
//"RGBColor":"[115,114,253]"
cJSON
*
rgb
=
cJSON_CreateObject
();
...
...
nx5_soc_gw/smarthome_z3gw_a133
View file @
3057a861
No preview for this file type
opcodeMapCfg/device_3137.json
View file @
3057a861
{
"productCode"
:
"3137"
,
"operateType"
:
"51
4
"
,
"operateType"
:
"51
2
"
,
"channel"
:
1
,
"syn_type"
:
1
,
"syn_opcode"
:
"DIMMABLE_LIGHT_STATUS"
,
...
...
opcodeMapCfg/device_3172.json
View file @
3057a861
{
"productCode"
:
"3172"
,
"operateType"
:
"50
7
"
,
"operateType"
:
"50
6
"
,
"channel"
:
1
,
"syn_type"
:
1
,
"syn_opcode"
:
"DIMMABLE_LIGHT_STATUS"
,
...
...
tsl/product_3028.json
View file @
3057a861
...
...
@@ -70,12 +70,57 @@
}
},
"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"
"Brightness"
,
"FadeTime"
,
"LowBrightness"
,
"HighBrightness"
],
"method"
:
"thing.service.property.get"
,
"name"
:
"get"
,
...
...
@@ -127,6 +172,51 @@
"step"
:
"1"
}
}
},
{
"identifier"
:
"FadeTime"
,
"accessMode"
:
"rw"
,
"dataType"
:
{
"type"
:
"int"
,
"specs"
:
{
"min"
:
"10"
,
"max"
:
"50"
,
"unit"
:
"1/10s"
,
"unitName"
:
"1/10秒"
,
"step"
:
"10"
}
},
"name"
:
"渐变时间"
},
{
"identifier"
:
"LowBrightness"
,
"accessMode"
:
"rw"
,
"dataType"
:
{
"type"
:
"int"
,
"specs"
:
{
"min"
:
"10"
,
"max"
:
"90"
,
"unit"
:
"%"
,
"unitName"
:
"百分比"
,
"step"
:
"1"
}
},
"name"
:
"最低亮度"
},
{
"identifier"
:
"HighBrightness"
,
"accessMode"
:
"rw"
,
"dataType"
:
{
"type"
:
"int"
,
"specs"
:
{
"min"
:
"20"
,
"max"
:
"100"
,
"unit"
:
"%"
,
"unitName"
:
"百分比"
,
"step"
:
"1"
}
},
"name"
:
"最高亮度"
}
],
"events"
:
[
...
...
@@ -156,6 +246,48 @@
}
},
"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"
,
...
...
tsl/product_3043.json
View file @
3057a861
{
"schema"
:
"https://iot-ap.ikonke.com/model/product_3043.json"
,
"productType"
:
"sensor"
,
"version"
:
"1.1"
,
"profile"
:
{
"heartbeat"
:
"1200"
,
"productCode"
:
"3043"
,
"productName"
:
"红外幕帘探测器Z3S(KONKE)"
,
"sleepTime"
:
"30000"
},
"services"
:
[
{
"outputData"
:
[
{
"identifier"
:
"MotionAlarmState"
,
"name"
:
"红外检测状态"
,
"dataType"
:
{
"type"
:
"enum"
,
"specs"
:
{
"0"
:
"无人"
,
"1"
:
"有人"
}
}
},
{
"identifier"
:
"Battery"
,
"name"
:
"电池电量"
,
"dataType"
:
{
"type"
:
"double"
,
"specs"
:
{
"min"
:
"0.0"
,
"max"
:
"100.0"
,
"unit"
:
"%"
,
"unitName"
:
"百分比"
,
"step"
:
"0.01"
}
}
}
],
"identifier"
:
"get"
,
"inputData"
:
[
"MotionAlarmState"
,
"Battery"
],
"method"
:
"thing.service.property.get"
,
"name"
:
"get"
,
"required"
:
true
,
"callType"
:
"async"
,
"desc"
:
"属性获取"
}
],
"properties"
:
[
{
"identifier"
:
"MotionAlarmState"
,
"name"
:
"红外检测状态"
,
"accessMode"
:
"r"
,
"required"
:
true
,
"dataType"
:
{
"type"
:
"enum"
,
"specs"
:
{
"0"
:
"无人"
,
"1"
:
"有人"
}
}
},
{
"identifier"
:
"Battery"
,
"name"
:
"电池电量"
,
"accessMode"
:
"r"
,
"required"
:
true
,
"dataType"
:
{
"type"
:
"double"
,
"specs"
:
{
"min"
:
"0.0"
,
"max"
:
"100.0"
,
"unit"
:
"%"
,
"unitName"
:
"百分比"
,
"step"
:
"0.01"
}
}
},
{
"identifier"
:
"SensorType"
,
"name"
:
"安防等级"
,
"accessMode"
:
"rw"
,
"required"
:
true
,
"dataType"
:
{
"type"
:
"enum"
,
"specs"
:
{
"0"
:
"在家安防"
,
"1"
:
"室外安防"
,
"2"
:
"24小时警戒"
,
"3"
:
"无警戒"
}
}
}
],
"events"
:
[
{
"outputData"
:
[
{
"identifier"
:
"MotionAlarmState"
,
"name"
:
"红外检测状态"
,
"dataType"
:
{
"type"
:
"enum"
,
"specs"
:
{
"0"
:
"无人"
,
"1"
:
"有人"
}
}
},
{
"identifier"
:
"Battery"
,
"name"
:
"电池电量"
,
"dataType"
:
{
"type"
:
"double"
,
"specs"
:
{
"min"
:
"0.0"
,
"max"
:
"100.0"
,
"unit"
:
"%"
,
"unitName"
:
"百分比"
,
"step"
:
"0.01"
}
}
}
],
"identifier"
:
"property"
,
"method"
:
"thing.event.property.post"
,
"name"
:
"property"
,
"type"
:
"info"
,
"required"
:
true
,
"desc"
:
"属性上报"
},
{
"outputData"
:
[
{
"identifier"
:
"MotionAlarmState"
,
"name"
:
"红外检测状态"
,
"dataType"
:
{
"type"
:
"enum"
,
"specs"
:
{
"0"
:
"无人"
,
"1"
:
"有人"
}
}
}
],
"identifier"
:
"motionAlarm"
,
"method"
:
"thing.event.motionAlarm.post"
,
"name"
:
"motionAlarm"
,
"type"
:
"alarm"
,
"required"
:
true
,
"desc"
:
"红外检测告警"
},
{
"outputData"
:
[
{
"identifier"
:
"Battery"
,
"name"
:
"电池电量"
,
"dataType"
:
{
"type"
:
"double"
,
"specs"
:
{
"min"
:
"0.0"
,
"max"
:
"100.0"
,
"unit"
:
"%"
,
"unitName"
:
"百分比"
,
"step"
:
"0.01"
}
}
}
],
"identifier"
:
"BatteryAlarm"
,
"method"
:
"thing.event.BatteryAlarm.post"
,
"name"
:
"BatteryAlarm"
,
"type"
:
"alert"
,
"required"
:
true
,
"desc"
:
"低电量告警"
}
]
}
{
"schema"
:
"https://iot-ap.ikonke.com/model/product_3043.json"
,
"productType"
:
"sensor"
,
"version"
:
"1.2"
,
"profile"
:
{
"heartbeat"
:
"1200"
,
"productCode"
:
"3043"
,
"productName"
:
"红外幕帘探测器Z3S(KONKE)"
,
"sleepTime"
:
"30000"
},
"services"
:
[
{
"outputData"
:
[
{
"identifier"
:
"MotionAlarmState"
,
"name"
:
"红外检测状态"
,
"dataType"
:
{
"type"
:
"enum"
,
"specs"
:
{
"0"
:
"无人"
,
"1"
:
"有人"
}
}
},
{
"identifier"
:
"DismantleState"
,
"name"
:
"拆卸状态"
,
"dataType"
:
{
"type"
:
"enum"
,
"specs"
:
{
"0"
:
"正常"
,
"1"
:
"被拆卸"
}
}
},
{
"identifier"
:
"Battery"
,
"name"
:
"电池电量"
,
"dataType"
:
{
"type"
:
"double"
,
"specs"
:
{
"min"
:
"0.0"
,
"max"
:
"100.0"
,
"unit"
:
"%"
,
"unitName"
:
"百分比"
,
"step"
:
"0.01"
}
}
}
],
"identifier"
:
"get"
,
"inputData"
:
[
"MotionAlarmState"
,
"Battery"
],
"method"
:
"thing.service.property.get"
,
"name"
:
"get"
,
"required"
:
true
,
"callType"
:
"async"
,
"desc"
:
"属性获取"
}
],
"properties"
:
[
{
"identifier"
:
"MotionAlarmState"
,
"name"
:
"红外检测状态"
,
"accessMode"
:
"r"
,
"required"
:
true
,
"dataType"
:
{
"type"
:
"enum"
,
"specs"
:
{
"0"
:
"无人"
,
"1"
:
"有人"
}
}
},
{
"identifier"
:
"DismantleState"
,
"name"
:
"拆卸状态"
,
"accessMode"
:
"r"
,
"required"
:
false
,
"dataType"
:
{
"type"
:
"enum"
,
"specs"
:
{
"0"
:
"正常"
,
"1"
:
"被拆卸"
}
}
},
{
"identifier"
:
"Battery"
,
"name"
:
"电池电量"
,
"accessMode"
:
"r"
,
"required"
:
true
,
"dataType"
:
{
"type"
:
"double"
,
"specs"
:
{
"min"
:
"0.0"
,
"max"
:
"100.0"
,
"unit"
:
"%"
,
"unitName"
:
"百分比"
,
"step"
:
"0.01"
}
}
},
{
"identifier"
:
"SensorType"
,
"name"
:
"安防等级"
,
"accessMode"
:
"rw"
,
"required"
:
true
,
"dataType"
:
{
"type"
:
"enum"
,
"specs"
:
{
"0"
:
"在家安防"
,
"1"
:
"室外安防"
,
"2"
:
"24小时警戒"
,
"3"
:
"无警戒"
}
}
}
],
"events"
:
[
{
"outputData"
:
[
{
"identifier"
:
"MotionAlarmState"
,
"name"
:
"红外检测状态"
,
"dataType"
:
{
"type"
:
"enum"
,
"specs"
:
{
"0"
:
"无人"
,
"1"
:
"有人"
}
}
},
{
"identifier"
:
"DismantleState"
,
"name"
:
"拆卸状态"
,
"dataType"
:
{
"type"
:
"enum"
,
"specs"
:
{
"0"
:
"正常"
,
"1"
:
"被拆卸"
}
}
},
{
"identifier"
:
"Battery"
,
"name"
:
"电池电量"
,
"dataType"
:
{
"type"
:
"double"
,
"specs"
:
{
"min"
:
"0.0"
,
"max"
:
"100.0"
,
"unit"
:
"%"
,
"unitName"
:
"百分比"
,
"step"
:
"0.01"
}
}
}
],
"identifier"
:
"property"
,
"method"
:
"thing.event.property.post"
,
"name"
:
"property"
,
"type"
:
"info"
,
"required"
:
true
,
"desc"
:
"属性上报"
},
{
"outputData"
:
[
{
"identifier"
:
"MotionAlarmState"
,
"name"
:
"红外检测状态"
,
"dataType"
:
{
"type"
:
"enum"
,
"specs"
:
{
"0"
:
"无人"
,
"1"
:
"有人"
}
}
}
],
"identifier"
:
"motionAlarm"
,
"method"
:
"thing.event.motionAlarm.post"
,
"name"
:
"motionAlarm"
,
"type"
:
"alarm"
,
"required"
:
true
,
"desc"
:
"红外检测告警"
},
{
"identifier"
:
"TamperAlarm"
,
"name"
:
"防撬报警"
,
"type"
:
"alert"
,
"required"
:
true
,
"method"
:
"thing.event.TamperAlarm.post"
,
"outputData"
:
[
{
"identifier"
:
"DismantleState"
,
"name"
:
"拆卸状态"
,
"dataType"
:
{
"type"
:
"enum"
,
"specs"
:
{
"0"
:
"正常"
,
"1"
:
"被拆卸"
}
}
}
]
},
{
"outputData"
:
[
{
"identifier"
:
"Battery"
,
"name"
:
"电池电量"
,
"dataType"
:
{
"type"
:
"double"
,
"specs"
:
{
"min"
:
"0.0"
,
"max"
:
"100.0"
,
"unit"
:
"%"
,
"unitName"
:
"百分比"
,
"step"
:
"0.01"
}
}
}
],
"identifier"
:
"BatteryAlarm"
,
"method"
:
"thing.event.BatteryAlarm.post"
,
"name"
:
"BatteryAlarm"
,
"type"
:
"alert"
,
"required"
:
true
,
"desc"
:
"低电量告警"
}
]
}
tsl/product_3062.json
View file @
3057a861
...
...
@@ -47,9 +47,11 @@
"dataType"
:
{
"type"
:
"enum"
,
"specs"
:
{
"0"
:
"自动"
,
"2"
:
"低档"
,
"3"
:
"中档"
,
"4"
:
"高档"
"4"
:
"高档"
,
"6"
:
"未知"
}
}
},
...
...
tsl/product_3108.json
View file @
3057a861
{
"schema"
:
"https://iot-ap.ikonke.com/model/product_3108.json"
,
"productType"
:
"On/Off Output"
,
"version"
:
"1.
0
"
,
"version"
:
"1.
1
"
,
"profile"
:
{
"heartbeat"
:
"300"
,
"productCode"
:
"3108"
,
...
...
@@ -24,7 +24,7 @@
"name"
:
"电源开关"
},
{
"identifier"
:
"Power
DownSave
"
,
"identifier"
:
"Power
Memory
"
,
"dataType"
:
{
"specs"
:
{
"0"
:
"关闭"
,
...
...
@@ -55,7 +55,7 @@
"name"
:
"电源开关"
},
{
"identifier"
:
"Power
DownSave
"
,
"identifier"
:
"Power
Memory
"
,
"dataType"
:
{
"specs"
:
{
"0"
:
"关闭"
,
...
...
@@ -69,7 +69,7 @@
"identifier"
:
"get"
,
"inputData"
:
[
"PowerSwitch"
,
"Power
DownSave
"
"Power
Memory
"
],
"method"
:
"thing.service.property.get"
,
"name"
:
"get"
,
...
...
@@ -108,7 +108,7 @@
"required"
:
true
},
{
"identifier"
:
"Power
DownSave
"
,
"identifier"
:
"Power
Memory
"
,
"dataType"
:
{
"specs"
:
{
"0"
:
"关闭"
,
...
...
@@ -135,7 +135,7 @@
"name"
:
"电源开关"
},
{
"identifier"
:
"Power
DownSave
"
,
"identifier"
:
"Power
Memory
"
,
"dataType"
:
{
"specs"
:
{
"0"
:
"关闭"
,
...
...
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