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
52797464
Commit
52797464
authored
Aug 14, 2021
by
陈伟灿
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'cwc' into 'master'
【修改内容】修改局域网场景同步失败的问题 See merge request chenweican/k-sdk!107
parents
b024dd73
f8b4d3a4
Changes
17
Show whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
806 additions
and
122 deletions
+806
-122
application/klansdk/kk_data_handle.c
application/klansdk/kk_data_handle.c
+6
-4
application/klansdk/kk_lan_ctrl.c
application/klansdk/kk_lan_ctrl.c
+1
-1
application/klansdk/kk_lan_sync.c
application/klansdk/kk_lan_sync.c
+22
-14
application/klansdk/kk_newccu_msg.c
application/klansdk/kk_newccu_msg.c
+1
-1
midware/midware/dm/kk_sub_db.c
midware/midware/dm/kk_sub_db.c
+19
-10
midware/midware/dm/kk_sub_db.h
midware/midware/dm/kk_sub_db.h
+1
-1
midware/midware/midware.c
midware/midware/midware.c
+1
-0
midware/midware/scene/kk_scene_handle.c
midware/midware/scene/kk_scene_handle.c
+4
-1
nx5_soc_gw/smarthome_z3gw_nx5
nx5_soc_gw/smarthome_z3gw_nx5
+0
-0
opcodeMapCfg/device_3020.json
opcodeMapCfg/device_3020.json
+80
-0
opcodeMapCfg/device_3023.json
opcodeMapCfg/device_3023.json
+41
-41
opcodeMapCfg/device_3024.json
opcodeMapCfg/device_3024.json
+57
-0
opcodeMapCfg/device_3027.json
opcodeMapCfg/device_3027.json
+42
-0
opcodeMapCfg/device_3032.json
opcodeMapCfg/device_3032.json
+138
-0
opcodeMapCfg/device_3034.json
opcodeMapCfg/device_3034.json
+214
-0
opcodeMapCfg/device_3051.json
opcodeMapCfg/device_3051.json
+46
-0
tsl/product_3067.json
tsl/product_3067.json
+133
-49
No files found.
application/klansdk/kk_data_handle.c
View file @
52797464
...
...
@@ -207,9 +207,9 @@ static cJSON *kk_zb_dev_hw_info_build(const char *deviceCode,cJSON * productCode
_deviceCode_switchto_mac
(
deviceCode
,
mac
);
if
(
online
==
0
){
online_status
=
1
;
//在线
}
else
if
(
online
==
1
){
online_status
=
2
;
//离线
}
else
if
(
online
==
1
){
online_status
=
1
;
//在线
}
else
{
online_status
=
0
;
//未知
}
...
...
@@ -468,6 +468,7 @@ void KK_Data_FromMid(void* str,int len)
if
(
info
==
NULL
||
payload
==
NULL
||
info
->
type
!=
cJSON_Object
||
payload
->
type
!=
cJSON_Object
){
cJSON_Delete
(
json
);
return
;
}
...
...
@@ -478,7 +479,7 @@ void KK_Data_FromMid(void* str,int len)
if
(
msgtype
==
NULL
||
productCode
==
NULL
||
deviceCode
==
NULL
||
msgtype
->
type
!=
cJSON_String
||
productCode
->
type
!=
cJSON_String
||
deviceCode
->
type
!=
cJSON_String
||
msgtype
->
valuestring
==
NULL
||
productCode
->
valuestring
==
NULL
||
deviceCode
->
valuestring
==
NULL
){
cJSON_Delete
(
json
);
return
;
}
...
...
@@ -495,13 +496,14 @@ void KK_Data_FromMid(void* str,int len)
arming_status_notify
(
type
);
}
}
else
{
property_post_deal
(
deviceCode
->
valuestring
,
payload
);
//
property_post_deal(deviceCode->valuestring,payload);
}
}
else
if
(
strstr
(
msgtype
->
valuestring
,
"/thing/topo/delete"
)
!=
NULL
){
device_delete_sync
(
payload
);
}
else
if
(
strstr
(
msgtype
->
valuestring
,
"/thing/status/online"
)
!=
NULL
){
device_add_sync
(
payload
);
}
cJSON_Delete
(
json
);
}
...
...
application/klansdk/kk_lan_ctrl.c
View file @
52797464
...
...
@@ -142,7 +142,7 @@ int kk_ccu_opcode_handle(cJSON *root)
if
(
nodeId
==
NULL
||
opcode
==
NULL
||
arg
==
NULL
){
printf
(
"[%s][%d]
\n
"
,
__FUNCTION__
,
__LINE__
);
return
;
return
-
1
;
}
if
(
requester
!=
NULL
){
...
...
application/klansdk/kk_lan_sync.c
View file @
52797464
...
...
@@ -89,16 +89,16 @@ cJSON *kk_sync_rooms_to_sdk(cJSON *root,cJSON *data)
/*******场景同步*******/
static
cJSON
*
_kk_scene_action_build
(
cJSON
*
action
,
SYN_SCENE_ACTION
*
*
act
)
static
cJSON
*
_kk_scene_action_build
(
SYN_SCENE_ACTION
*
act
)
{
SYN_SCENE_ACTION
*
ptr
=
*
act
;
SYN_SCENE_ACTION
*
ptr
=
act
;
if
(
ptr
->
nodeid
==-
1
||
ptr
->
operation
==
NULL
||
ptr
->
operation
==
NULL
){
return
;
}
cJSON
*
action
=
cJSON_CreateObject
();
cJSON_AddStringToObject
(
action
,
"area"
,(
ptr
->
ui_area
==
NULL
)
?
""
:
ptr
->
ui_area
);
cJSON_AddStringToObject
(
action
,
"name"
,(
ptr
->
ui_name
==
NULL
)
?
""
:
ptr
->
ui_name
);
cJSON_AddStringToObject
(
action
,
"delay"
,(
ptr
->
delay
==
NULL
)
?
"0"
:
ptr
->
delay
);
...
...
@@ -110,18 +110,22 @@ static cJSON *_kk_scene_action_build(cJSON *action,SYN_SCENE_ACTION **act)
}
cJSON
*
kk_scene_actions_build
(
SYN_SCENE_ACTION
*
*
act
,
int
num
)
cJSON
*
kk_scene_actions_build
(
SYN_SCENE_ACTION
*
act
,
int
num
)
{
int
i
;
cJSON
*
actions
=
cJSON_CreateArray
();
cJSON
*
action
=
cJSON_CreateObject
();
SYN_SCENE_ACTION
*
ptr
=*
act
;
//printf("------------------->num:%d\n",num);
SYN_SCENE_ACTION
*
ptr
=
act
;
for
(
i
=
0
;
i
<
num
;
i
++
,
ptr
++
){
_kk_scene_action_build
(
action
,
&
ptr
);
//printf("--------------------------->[%s][%d]\n",__FUNCTION__,__LINE__);
cJSON
*
action
=
_kk_scene_action_build
(
ptr
);
//printf("--------------------------->[%s][%d]\n",__FUNCTION__,__LINE__);
cJSON_AddItemToArray
(
actions
,
action
);
//printf("--------------------------->[%s][%d]\n",__FUNCTION__,__LINE__);
}
//printf("--------------------------->[%s][%d]\n",__FUNCTION__,__LINE__);
return
actions
;
}
...
...
@@ -133,9 +137,9 @@ cJSON *kk_scene_build(SYN_SCENE_ITEM **content)
if
(
content
==
NULL
||*
content
==
NULL
){
return
scene
;
}
cJSON
*
actions
=
kk_scene_actions_build
(
&
ptr
->
act
,
ptr
->
act_num
);
//printf("--------------------------->[%s][%d]\n",__FUNCTION__,__LINE__);
cJSON
*
actions
=
kk_scene_actions_build
(
ptr
->
act
,
ptr
->
act_num
);
//printf("--------------------------->[%s][%d]\n",__FUNCTION__,__LINE__);
cJSON_AddItemToObject
(
scene
,
"actions"
,
actions
);
cJSON_AddStringToObject
(
scene
,
"id"
,
ptr
->
scene_id
);
cJSON_AddStringToObject
(
scene
,
"name"
,
ptr
->
name
);
...
...
@@ -263,6 +267,9 @@ cJSON *kk_sync_scence_to_sdk(cJSON *root,cJSON *data)
int
i
,
num
=
cJSON_GetArraySize
(
scenes
);
SYN_SCENE_ITEM
*
build
=
(
SYN_SCENE_ITEM
*
)
malloc
(
sizeof
(
SYN_SCENE_ITEM
)
*
num
);
if
(
build
==
NULL
){
return
NULL
;
}
memset
(
build
,
0
,
sizeof
(
SYN_SCENE_ITEM
)
*
num
);
cJSON
*
scenesAry
=
cJSON_CreateArray
();
...
...
@@ -286,17 +293,18 @@ cJSON *kk_sync_scence_to_sdk(cJSON *root,cJSON *data)
if(strcmp(sceneType->valuestring,"")==){
}*/
//printf("--------------------------->[%s][%d]\n",__FUNCTION__,__LINE__);
pScene
->
act_num
=
kk_sync_actions
(
actions
,
&
pScene
->
act
,
&
pScene
->
room_id
);
//printf("--------------------------->[%s][%d]\n",__FUNCTION__,__LINE__);
kk_sync_scene_condition
(
condition
,
&
pScene
);
//printf("--------------------------->[%s][%d]\n",__FUNCTION__,__LINE__);
pScene
->
scene_id
=
sceneId
->
valuestring
;
pScene
->
name
=
name
->
valuestring
;
pScene
->
pannel_id
=
NULL
;
sceneItem
=
kk_scene_build
(
&
pScene
);
//printf("--------------------------->[%s][%d]\n",__FUNCTION__,__LINE__);
cJSON_AddItemToArray
(
scenesAry
,
sceneItem
);
// printf("[%s][%d]%s\n",__FUNCTION__,__LINE__,cJSON_Print(sceneItem));
...
...
application/klansdk/kk_newccu_msg.c
View file @
52797464
...
...
@@ -119,7 +119,7 @@ int kk_ipc_send_json(cJSON *root)
cJSON_Minify
(
msg
);
kk_ipc_send
(
IPC_APP2MID
,
msg
,
strlen
(
msg
)
+
1
);
free
(
msg
);
cJSON_Delete
(
root
);
return
0
;
}
...
...
midware/midware/dm/kk_sub_db.c
View file @
52797464
...
...
@@ -568,7 +568,7 @@ int kk_get_product_type_table_size(void)
{
return
sizeof
(
producTypeMap
)
/
sizeof
(
productype_map_s
);
}
int
kk_subDev_set_action_by_productType
(
const
char
*
productType
,
const
char
*
sceneId
,
const
char
*
propertyName
,
const
char
*
propertyValue
,
const
char
*
type
)
int
kk_subDev_set_action_by_productType
(
const
char
*
productType
,
const
char
*
sceneId
,
const
char
*
propertyName
,
const
char
*
propertyValue
,
const
char
*
type
,
int
delay
)
{
int
res
=
0
;
sqlite3_stmt
*
stmt
;
...
...
@@ -583,6 +583,7 @@ int kk_subDev_set_action_by_productType(const char *productType,const char *scen
int
k
=
0
,
count
=
0
;
char
typeArray
[
10
][
32
]
=
{
0
};
int
size
=
0
;
char
*
pStart
=
NULL
;
if
(
productType
==
NULL
){
ERROR_PRINT
(
"ERROR [%s][%d]
\n
"
,
__FUNCTION__
,
__LINE__
);
...
...
@@ -631,18 +632,26 @@ int kk_subDev_set_action_by_productType(const char *productType,const char *scen
memcpy
(
info
.
deviceCode
,
node
->
deviceCode
,
strlen
(
node
->
deviceCode
));
memcpy
(
info
.
propertyName
,
property
->
identifier
,
strlen
(
property
->
identifier
));
memcpy
(
info
.
propertyValue
,
propertyValue
,
strlen
(
propertyValue
));
//printf("------------------->property->identifier:%s\n",property->identifier);
pStart
=
strstr
(
property
->
identifier
,
"_"
);
if
(
pStart
!=
NULL
){
//printf("------------------->num:%s\n",pStart+1);
info
.
epNum
=
atoi
(
pStart
+
1
);
}
else
{
info
.
epNum
=
1
;
info
.
delay
=
0
;
kk_scene_action_add
(
node
->
fatherDeviceCode
,
sceneId
,
info
);
}
res
=
kk_scene_insert_scene_action
(
type
,
node
->
deviceCode
,
1
,
property
->
identifier
,
propertyValue
,
0
,
sceneId
,
node
->
fatherDeviceCode
);
info
.
delay
=
delay
;
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
);
if
(
res
!=
SUCCESS_RETURN
){
INFO_PRINT
(
"kk_subDev_set_action_by_productType fail!!!
\n
"
);
//return res;
continue
;
}
}
}
}
//}
...
...
midware/midware/dm/kk_sub_db.h
View file @
52797464
...
...
@@ -20,7 +20,7 @@ int kk_subDev_send_property_get_from_db(void);
int
kk_subDev_send_property_get
(
const
char
*
fatherDeviceCode
);
int
kk_subDev_check_scene_support
(
const
char
*
deviceCode
);
int
kk_subDev_set_action_by_productType
(
const
char
*
productType
,
const
char
*
sceneId
,
const
char
*
propertyName
,
const
char
*
propertyValue
,
const
char
*
type
);
int
kk_subDev_set_action_by_productType
(
const
char
*
productType
,
const
char
*
sceneId
,
const
char
*
propertyName
,
const
char
*
propertyValue
,
const
char
*
type
,
int
delay
);
int
kk_subDev_update_offline
(
int
isOffline
,
const
char
*
deviceCode
);
int
kk_subDev_getSensors_reply
(
SensorType_t
*
list
);
int
kk_load_subDevice
(
void
);
...
...
midware/midware/midware.c
View file @
52797464
...
...
@@ -266,6 +266,7 @@ static int kk_property_set_data_check(cJSON * payload,const char *deviceCode){
continue
;
}
//printf("----------------->property->identifier:%s\n",property->identifier);
memset
(
propertiesTmp
,
0x0
,
sizeof
(
propertiesTmp
));
memcpy
(
propertiesTmp
,
property
->
identifier
,
strlen
(
property
->
identifier
));
split
(
propertiesTmp
,
"_"
,
propertiesbuf
,
&
num
);
if
(
num
==
2
){
...
...
midware/midware/scene/kk_scene_handle.c
View file @
52797464
...
...
@@ -943,8 +943,11 @@ int kk_scene_parse_scene_action(const cJSON* str,const char *sceneId,int isUpdat
if
(
propertyValue
==
NULL
)
return
FAIL_RETURN
;
productType
=
cJSON_GetObjectItem
(
item
,
MSG_PRODUCT_TYPE_STR
);
if
(
productType
!=
NULL
){
delay
=
cJSON_GetObjectItem
(
item
,
MSG_SCENE_DELAY
);
if
(
delay
==
NULL
)
return
FAIL_RETURN
;
int
idelay
=
delay
->
valueint
;
kk_subDev_set_action_by_productType
(
productType
->
valuestring
,
sceneId
,
propertyName
->
valuestring
,
propertyValue
->
valuestring
,
type
->
valuestring
);
propertyValue
->
valuestring
,
type
->
valuestring
,
idelay
);
}
else
{
deviceCode
=
cJSON_GetObjectItem
(
item
,
MSG_DEVICE_CODE_STR
);
...
...
nx5_soc_gw/smarthome_z3gw_nx5
View file @
52797464
No preview for this file type
opcodeMapCfg/device_3020.json
0 → 100644
View file @
52797464
{
"productCode"
:
"3020"
,
"operateType"
:
"2001"
,
"channel"
:
1
,
"syn_type"
:
1
,
"syn_opcode"
:
"STATUS"
,
"newccu"
:[
{
"identifier"
:
"PowerSwitch"
,
"opcodemap"
:
"SWITCH"
,
"dataType"
:
"int"
,
"channel"
:
"1"
,
"valueRange"
:[
0
,
1
],
"value"
:
0
},
{
"identifier"
:
"Power"
,
"opcodemap"
:
"GET_DEV_POWER"
,
"dataType"
:
"double"
,
"channel"
:
"1"
,
"valueRange"
:[],
"value"
:
0
},
{
"identifier"
:
"Electric"
,
"opcodemap"
:
"GET_ELECTRICAL"
,
"dataType"
:
"double"
,
"channel"
:
"1"
,
"valueRange"
:[],
"value"
:
0
},
{
"identifier"
:
""
,
"opcodemap"
:
"STATUS"
,
"dataType"
:
"int"
,
"channel"
:
"1"
,
"valueRange"
:[],
"value"
:
1
}
],
"oldccu"
:[
{
"opcode"
:
"SWITCH"
,
"identifiermap"
:
"PowerSwitch"
,
"dataType"
:
"map"
,
"channel"
:
"1"
,
"valueRange"
:[
"OFF"
,
"ON"
],
"syn"
:
"switch"
,
"synType"
:
"map"
},
{
"opcode"
:
"GET_DEV_POWER"
,
"identifiermap"
:
"Power"
,
"dataType"
:
"string_double"
,
"channel"
:
"1"
,
"valueRange"
:[],
"syn"
:
""
,
"synType"
:
"dummy"
},
{
"opcode"
:
"GET_ELECTRICAL"
,
"identifiermap"
:
"Electric"
,
"dataType"
:
"string_double"
,
"channel"
:
"1"
,
"valueRange"
:[],
"syn"
:
""
,
"synType"
:
"dummy"
},
{
"opcode"
:
"STATUS"
,
"identifiermap"
:
""
,
"dataType"
:
"dummy"
,
"channel"
:
"1"
,
"valueRange"
:[],
"syn"
:
"light_switch"
,
"synType"
:
"bool"
}
]
}
\ No newline at end of file
opcodeMapCfg/device_3023.json
View file @
52797464
...
...
@@ -4,7 +4,7 @@
"channel"
:
2
,
"newccu"
:[
{
"identifier"
:
"PowerSwitch
_1"
,
"identifier"
:
"PowerSwitch
"
,
"opcodemap"
:
"SWITCH"
,
"dataType"
:
"int"
,
"channel"
:
"1"
,
...
...
@@ -12,7 +12,7 @@
"value"
:
0
},
{
"identifier"
:
"PowerSwitch
_2"
,
"identifier"
:
"PowerSwitch
"
,
"opcodemap"
:
"SWITCH"
,
"dataType"
:
"int"
,
"channel"
:
"2"
,
...
...
@@ -23,14 +23,14 @@
"oldccu"
:[
{
"opcode"
:
"SWITCH"
,
"identifiermap"
:
"PowerSwitch
_1"
,
"identifiermap"
:
"PowerSwitch
"
,
"dataType"
:
"map"
,
"channel"
:
"1"
,
"valueRange"
:[
"OFF"
,
"ON"
]
},
{
"opcode"
:
"SWITCH"
,
"identifiermap"
:
"PowerSwitch
_2"
,
"identifiermap"
:
"PowerSwitch
"
,
"dataType"
:
"map"
,
"channel"
:
"2"
,
"valueRange"
:[
"OFF"
,
"ON"
]
...
...
opcodeMapCfg/device_3024.json
0 → 100644
View file @
52797464
{
"productCode"
:
"3024"
,
"operateType"
:
"3"
,
"channel"
:
3
,
"newccu"
:[
{
"identifier"
:
"PowerSwitch"
,
"opcodemap"
:
"SWITCH"
,
"dataType"
:
"int"
,
"channel"
:
"1"
,
"valueRange"
:[
0
,
1
],
"value"
:
0
},
{
"identifier"
:
"PowerSwitch"
,
"opcodemap"
:
"SWITCH"
,
"dataType"
:
"int"
,
"channel"
:
"2"
,
"valueRange"
:[
0
,
1
],
"value"
:
0
},
{
"identifier"
:
"PowerSwitch"
,
"opcodemap"
:
"SWITCH"
,
"dataType"
:
"int"
,
"channel"
:
"3"
,
"valueRange"
:[
0
,
1
],
"value"
:
0
}
],
"oldccu"
:[
{
"opcode"
:
"SWITCH"
,
"identifiermap"
:
"PowerSwitch"
,
"dataType"
:
"map"
,
"channel"
:
"1"
,
"valueRange"
:[
"OFF"
,
"ON"
]
},
{
"opcode"
:
"SWITCH"
,
"identifiermap"
:
"PowerSwitch"
,
"dataType"
:
"map"
,
"channel"
:
"2"
,
"valueRange"
:[
"OFF"
,
"ON"
]
},
{
"opcode"
:
"SWITCH"
,
"identifiermap"
:
"PowerSwitch"
,
"dataType"
:
"map"
,
"channel"
:
"3"
,
"valueRange"
:[
"OFF"
,
"ON"
]
}
]
}
\ No newline at end of file
opcodeMapCfg/device_3027.json
0 → 100644
View file @
52797464
{
"productCode"
:
"3027"
,
"operateType"
:
"1003"
,
"channel"
:
2
,
"newccu"
:[
{
"identifier"
:
"OperationMode"
,
"opcodemap"
:
"SWITCH"
,
"dataType"
:
"int"
,
"channel"
:
"1"
,
"valueRange"
:[
0
,
1
,
2
],
"value"
:
2
},
{
"identifier"
:
"OperationMode"
,
"opcodemap"
:
"SWITCH"
,
"dataType"
:
"int"
,
"channel"
:
"2"
,
"valueRange"
:[
0
,
1
,
2
],
"value"
:
2
}
],
"oldccu"
:[
{
"opcode"
:
"SWITCH"
,
"identifiermap"
:
"OperationMode"
,
"dataType"
:
"map"
,
"channel"
:
"1"
,
"valueRange"
:[
"CLOSE"
,
"OPEN"
,
"STOP"
]
},
{
"opcode"
:
"SWITCH"
,
"identifiermap"
:
"OperationMode"
,
"dataType"
:
"map"
,
"channel"
:
"2"
,
"valueRange"
:[
"CLOSE"
,
"OPEN"
,
"STOP"
]
}
]
}
\ No newline at end of file
opcodeMapCfg/device_3032.json
0 → 100644
View file @
52797464
{
"productCode"
:
"3032"
,
"operateType"
:
"14002"
,
"channel"
:
1
,
"syn_type"
:
1
,
"syn_opcode"
:
"CHOPIN_FRESH_AIR_STATUS"
,
"newccu"
:[
{
"identifier"
:
"PowerSwitch"
,
"opcodemap"
:
"FRESH_AIR_SWITCH"
,
"dataType"
:
"int"
,
"channel"
:
"1"
,
"valueRange"
:[
0
,
1
],
"value"
:
0
},{
"identifier"
:
"WorkMode"
,
"opcodemap"
:
"FRESH_AIR_RUN_MODEL"
,
"dataType"
:
"int"
,
"channel"
:
"1"
,
"valueRange"
:[
0
,
1
],
"value"
:
1
},{
"identifier"
:
"WindSpeed"
,
"opcodemap"
:
"FRESH_AIR_SPEED_SET"
,
"dataType"
:
"int"
,
"channel"
:
"1"
,
"valueRange"
:[
0
,
1
,
2
,
3
],
"value"
:
1
},{
"identifier"
:
"ChildLockState"
,
"opcodemap"
:
"FRESH_AIR_SET_LOCK_STATUS"
,
"dataType"
:
"int"
,
"channel"
:
"1"
,
"valueRange"
:[
0
,
1
],
"value"
:
0
},{
"identifier"
:
"TimingOffTime"
,
"opcodemap"
:
"FRESH_AIR_SET_TIME_OFF"
,
"dataType"
:
"double"
,
"channel"
:
"1"
,
"valueRange"
:[],
"value"
:
0
},{
"identifier"
:
"StrainerUsageTime"
,
"opcodemap"
:
"CHOPIN_FRESH_AIR_STATUS"
,
"dataType"
:
"int"
,
"channel"
:
"1"
,
"valueRange"
:[],
"value"
:
0
},{
"identifier"
:
"StrainerAlarmTime"
,
"opcodemap"
:
"CHOPIN_FRESH_AIR_STATUS"
,
"dataType"
:
"int"
,
"channel"
:
"1"
,
"valueRange"
:[],
"value"
:
0
},{
"identifier"
:
"CurrentTemperature"
,
"opcodemap"
:
"CHOPIN_FRESH_AIR_STATUS"
,
"dataType"
:
"double"
,
"channel"
:
"1"
,
"valueRange"
:[],
"value"
:
0
}
],
"oldccu"
:[
{
"opcode"
:
"FRESH_AIR_SWITCH"
,
"identifiermap"
:
"PowerSwitch"
,
"dataType"
:
"map"
,
"channel"
:
"1"
,
"valueRange"
:[
"OFF"
,
"ON"
],
"syn"
:
"on"
,
"synType"
:
"bool"
},{
"opcode"
:
"FRESH_AIR_RUN_MODEL"
,
"identifiermap"
:
"WorkMode"
,
"dataType"
:
"map"
,
"channel"
:
"1"
,
"valueRange"
:[
"AUTO"
,
"MANUAL"
],
"syn"
:
"runModel"
,
"synType"
:
"map"
},{
"opcode"
:
"FRESH_AIR_SPEED_SET"
,
"identifiermap"
:
"WindSpeed"
,
"dataType"
:
"map"
,
"channel"
:
"1"
,
"valueRange"
:[
"STOP"
,
"LOW"
,
"MID"
,
"HIGH"
],
"syn"
:
"speed"
,
"synType"
:
"int"
},{
"opcode"
:
"FRESH_AIR_SET_LOCK_STATUS"
,
"identifiermap"
:
"ChildLockState"
,
"dataType"
:
"bool"
,
"channel"
:
"1"
,
"valueRange"
:[],
"syn"
:
"ChildLockState"
,
"synType"
:
"double"
},{
"opcode"
:
"FRESH_AIR_SET_TIME_OFF"
,
"identifiermap"
:
"TimingOffTime"
,
"dataType"
:
"string_time"
,
"channel"
:
"1"
,
"valueRange"
:[],
"syn"
:
"time_off"
,
"synType"
:
"string_time"
},{
"opcode"
:
"CHOPIN_FRESH_AIR_STATUS "
,
"identifiermap"
:
"StrainerUsageTime"
,
"dataType"
:
"int"
,
"channel"
:
"1"
,
"valueRange"
:[],
"syn"
:
"filterScreenWorkTime"
,
"synType"
:
"int"
},{
"opcode"
:
"CHOPIN_FRESH_AIR_STATUS"
,
"identifiermap"
:
"StrainerAlarmTime"
,
"dataType"
:
"int"
,
"channel"
:
"1"
,
"valueRange"
:[],
"syn"
:
"filterScreenAlarmTime"
,
"synType"
:
"int"
},{
"opcode"
:
"CHOPIN_FRESH_AIR_STATUS"
,
"identifiermap"
:
"CurrentTemperature"
,
"dataType"
:
"double"
,
"channel"
:
"1"
,
"valueRange"
:[],
"syn"
:
"cur_temperature"
,
"synType"
:
"double"
}
]
}
opcodeMapCfg/device_3034.json
0 → 100644
View file @
52797464
{
"productCode"
:
"3034"
,
"operateType"
:
"15003"
,
"channel"
:
1
,
"syn_type"
:
1
,
"syn_opcode"
:
"FAN_COIL_STATUS"
,
"newccu"
:[
{
"identifier"
:
"PowerSwitch"
,
"opcodemap"
:
"SWITCH"
,
"dataType"
:
"int"
,
"channel"
:
"1"
,
"valueRange"
:[
0
,
1
],
"value"
:
0
},{
"identifier"
:
"WorkMode"
,
"opcodemap"
:
"FAN_COIL_SET_RUN_MODEL"
,
"dataType"
:
"int"
,
"channel"
:
"1"
,
"valueRange"
:[
1
,
2
,
3
,
4
],
"value"
:
1
},{
"identifier"
:
"WindSpeed"
,
"opcodemap"
:
"FAN_COIL_SET_FUN_SPEED"
,
"dataType"
:
"int"
,
"channel"
:
"1"
,
"valueRange"
:[
1
,
2
,
3
,
4
],
"value"
:
1
},{
"identifier"
:
"TargetTemperature"
,
"opcodemap"
:
"FAN_COIL_SET_TEMPERATURE"
,
"dataType"
:
"double"
,
"channel"
:
"1"
,
"valueRange"
:[],
"value"
:
16
},{
"identifier"
:
"TimingOffTime"
,
"opcodemap"
:
"FAN_COIL_SET_DELAY_SWITCH_TASK"
,
"dataType"
:
"double"
,
"channel"
:
"1"
,
"valueRange"
:[],
"value"
:
0
},{
"identifier"
:
"ChildLockState"
,
"opcodemap"
:
"FAN_COIL_SET_LOCK_STATUS"
,
"dataType"
:
"int"
,
"channel"
:
"1"
,
"valueRange"
:[
0
,
1
],
"value"
:
0
},{
"identifier"
:
"CurrentTemperature"
,
"opcodemap"
:
"room_temperature"
,
"dataType"
:
"double"
,
"channel"
:
"1"
,
"valueRange"
:[],
"value"
:
22
},{
"identifier"
:
"smart_model_id"
,
"opcodemap"
:
"FAN_COIL_STATUS"
,
"dataType"
:
"dummy"
,
"channel"
:
"1"
,
"valueRange"
:[],
"value"
:
0
},{
"identifier"
:
"smart_model_time_index"
,
"opcodemap"
:
"FAN_COIL_STATUS"
,
"dataType"
:
"dummy"
,
"channel"
:
"1"
,
"valueRange"
:[],
"value"
:
0
},{
"identifier"
:
"system_time"
,
"opcodemap"
:
"FAN_COIL_STATUS"
,
"dataType"
:
"dummy"
,
"channel"
:
"1"
,
"valueRange"
:[],
"value"
:
"1970-01-01 00:00:00"
},{
"identifier"
:
"week_day"
,
"opcodemap"
:
"FAN_COIL_STATUS"
,
"dataType"
:
"dummy"
,
"channel"
:
"1"
,
"valueRange"
:[],
"value"
:
0
},{
"identifier"
:
"total_work_time"
,
"opcodemap"
:
"FAN_COIL_STATUS"
,
"dataType"
:
"dummy"
,
"channel"
:
"1"
,
"valueRange"
:[],
"value"
:
0
},{
"identifier"
:
"timing_boot"
,
"opcodemap"
:
"FAN_COIL_STATUS"
,
"dataType"
:
"dummy"
,
"channel"
:
"1"
,
"valueRange"
:[],
"value"
:
{
"enable "
:
false
,
"time"
:
"00:00"
}
}
],
"oldccu"
:[
{
"opcode"
:
"SWITCH"
,
"identifiermap"
:
"PowerSwitch"
,
"dataType"
:
"map"
,
"channel"
:
"1"
,
"valueRange"
:[
"OFF"
,
"ON"
],
"syn"
:
"on"
,
"synType"
:
"bool"
},{
"opcode"
:
"FAN_COIL_SET_RUN_MODEL"
,
"identifiermap"
:
"WorkMode"
,
"dataType"
:
"map"
,
"channel"
:
"1"
,
"valueRange"
:[
"COLD"
,
"HOT"
,
"WIND"
,
"DEHUMIDIFICATION"
],
"syn"
:
"run_model"
,
"synType"
:
"map"
},{
"opcode"
:
"FAN_COIL_SET_FUN_SPEED"
,
"identifiermap"
:
"WindSpeed"
,
"dataType"
:
"map"
,
"channel"
:
"1"
,
"valueRange"
:[
"AUTO"
,
"HIGH"
,
"MID"
,
"LOW"
],
"syn"
:
"fan_speed"
,
"synType"
:
"map"
},{
"opcode"
:
"FAN_COIL_SET_TEMPERATURE"
,
"identifiermap"
:
"TargetTemperature"
,
"dataType"
:
"double"
,
"channel"
:
"1"
,
"valueRange"
:[],
"syn"
:
"setting_temperature"
,
"synType"
:
"double"
},{
"opcode"
:
"FAN_COIL_SET_DELAY_SWITCH_TASK"
,
"identifiermap"
:
"TimingOffTime"
,
"dataType"
:
"double"
,
"channel"
:
"1"
,
"valueRange"
:[],
"syn"
:
"timing_shutdown"
,
"synType"
:
"timing_shutdown"
},{
"opcode"
:
"FAN_COIL_SET_LOCK_STATUS"
,
"identifiermap"
:
"ChildLockState"
,
"dataType"
:
"double"
,
"channel"
:
"1"
,
"valueRange"
:[],
"syn"
:
""
,
"synType"
:
"dummy"
},{
"opcode"
:
"room_temperature"
,
"identifiermap"
:
"CurrentTemperature"
,
"dataType"
:
"double"
,
"channel"
:
"1"
,
"valueRange"
:[],
"syn"
:
"room_temperature"
,
"synType"
:
"double"
},{
"opcode"
:
"FAN_COIL_STATUS"
,
"identifiermap"
:
"smart_model_id"
,
"dataType"
:
"double"
,
"channel"
:
"1"
,
"valueRange"
:[],
"syn"
:
"smart_model_id"
,
"synType"
:
"double"
},{
"opcode"
:
"FAN_COIL_STATUS"
,
"identifiermap"
:
"smart_model_time_index"
,
"dataType"
:
"double"
,
"channel"
:
"1"
,
"valueRange"
:[],
"syn"
:
"smart_model_time_index"
,
"synType"
:
"double"
},{
"opcode"
:
"FAN_COIL_STATUS"
,
"identifiermap"
:
"system_time"
,
"dataType"
:
"double"
,
"channel"
:
"1"
,
"valueRange"
:[],
"syn"
:
"system_time"
,
"synType"
:
"map"
},{
"opcode"
:
"FAN_COIL_STATUS"
,
"identifiermap"
:
"week_day"
,
"dataType"
:
"double"
,
"channel"
:
"1"
,
"valueRange"
:[],
"syn"
:
"week_day"
,
"synType"
:
"int"
},{
"opcode"
:
"FAN_COIL_STATUS"
,
"identifiermap"
:
"total_work_time"
,
"dataType"
:
"double"
,
"channel"
:
"1"
,
"valueRange"
:[],
"syn"
:
"total_work_time"
,
"synType"
:
"int"
},{
"opcode"
:
"FAN_COIL_STATUS"
,
"identifiermap"
:
"timing_boot"
,
"dataType"
:
"double"
,
"channel"
:
"1"
,
"valueRange"
:[],
"syn"
:
"timing_boot"
,
"synType"
:
"def"
}
]
}
opcodeMapCfg/device_3051.json
0 → 100644
View file @
52797464
{
"productCode"
:
"3051"
,
"operateType"
:
"3499"
,
"channel"
:
1
,
"syn_type"
:
1
,
"syn_opcode"
:
"DOOR_CONTACT_STATUS"
,
"newccu"
:[
{
"identifier"
:
"ContactState"
,
"opcodemap"
:
"DOOR_CONTACT_NOTIFY"
,
"dataType"
:
"int"
,
"channel"
:
"1"
,
"valueRange"
:[
0
,
1
],
"value"
:
0
},
{
"identifier"
:
"Battery"
,
"opcodemap"
:
"POWER_NOTIFY"
,
"dataType"
:
"double"
,
"channel"
:
"1"
,
"valueRange"
:[],
"value"
:
0
}
],
"oldccu"
:[
{
"opcode"
:
"DOOR_CONTACT_NOTIFY"
,
"identifiermap"
:
"ContactState"
,
"dataType"
:
"map"
,
"channel"
:
"1"
,
"valueRange"
:[
"CLOSE"
,
"OPEN"
],
"syn"
:
"status"
,
"synType"
:
"map"
},
{
"opcode"
:
"POWER_NOTIFY"
,
"identifiermap"
:
"Battery"
,
"dataType"
:
"string_double"
,
"channel"
:
"1"
,
"valueRange"
:[],
"syn"
:
"power"
,
"synType"
:
"string_double"
}
]
}
\ No newline at end of file
tsl/product_3067.json
View file @
52797464
{
"schema"
:
"https://iot-ap.ikonke.com/model/product_3067.json"
,
"productType"
:
"curtain"
,
"version"
:
"1.
0
"
,
"version"
:
"1.
1
"
,
"profile"
:
{
"heartbeat"
:
"300"
,
"productCode"
:
"3067"
,
...
...
@@ -25,7 +25,7 @@
"name"
:
"窗帘操作模式"
},
{
"identifier"
:
"
LiftPercentage
"
,
"identifier"
:
"
Position
"
,
"dataType"
:
{
"type"
:
"int"
,
"specs"
:
{
...
...
@@ -37,6 +37,38 @@
}
},
"name"
:
"窗帘开启百分比"
},
{
"identifier"
:
"WorkMode"
,
"dataType"
:
{
"specs"
:
{
"3"
:
"转向"
},
"type"
:
"enum"
},
"name"
:
"窗帘转向(循环交替转向)"
},
{
"identifier"
:
"RouteState"
,
"dataType"
:
{
"specs"
:
{
"0"
:
"未设置"
,
"1"
:
"已设置"
},
"type"
:
"enum"
},
"name"
:
"行程设置"
},
{
"identifier"
:
"SwapState"
,
"name"
:
"全开全关状态对调"
,
"dataType"
:
{
"type"
:
"bool"
,
"specs"
:
{
"0"
:
"关闭对调"
,
"1"
:
"开启对调"
}
}
}
],
"method"
:
"thing.service.property.set"
,
...
...
@@ -60,7 +92,7 @@
"name"
:
"窗帘操作模式"
},
{
"identifier"
:
"
LiftPercentage
"
,
"identifier"
:
"
Position
"
,
"dataType"
:
{
"type"
:
"int"
,
"specs"
:
{
...
...
@@ -72,6 +104,38 @@
}
},
"name"
:
"窗帘开启百分比"
},
{
"identifier"
:
"WorkMode"
,
"dataType"
:
{
"specs"
:
{
"3"
:
"转向"
},
"type"
:
"enum"
},
"name"
:
"窗帘转向(循环交替转向)"
},
{
"identifier"
:
"RouteState"
,
"dataType"
:
{
"specs"
:
{
"0"
:
"未设置"
,
"1"
:
"已设置"
},
"type"
:
"enum"
},
"name"
:
"行程设置"
},
{
"identifier"
:
"SwapState"
,
"name"
:
"全开全关状态对调"
,
"dataType"
:
{
"type"
:
"bool"
,
"specs"
:
{
"0"
:
"关闭对调"
,
"1"
:
"开启对调"
}
}
}
],
"identifier"
:
"get"
,
...
...
@@ -84,46 +148,6 @@
"required"
:
true
,
"callType"
:
"async"
,
"desc"
:
"属性获取"
},
{
"outputData"
:
[],
"identifier"
:
"setLimitedPoint"
,
"inputData"
:
[],
"method"
:
"thing.service.setLimitedPoint"
,
"name"
:
"setLimitedPoint"
,
"required"
:
true
,
"callType"
:
"async"
,
"desc"
:
"设置限位点"
},
{
"outputData"
:
[],
"identifier"
:
"resetLimitedPoint"
,
"inputData"
:
[],
"method"
:
"thing.service.resetLimitedPoint"
,
"name"
:
"resetLimitedPoint"
,
"required"
:
true
,
"callType"
:
"async"
,
"desc"
:
"重置限位点"
},
{
"outputData"
:
[],
"identifier"
:
"reverse"
,
"inputData"
:
[],
"method"
:
"thing.service.reverse"
,
"name"
:
"reverse"
,
"required"
:
true
,
"callType"
:
"async"
,
"desc"
:
"电机换向"
},
{
"outputData"
:
[],
"identifier"
:
"onOffReverse"
,
"inputData"
:
[],
"method"
:
"thing.service.onOffReverse"
,
"name"
:
"onOffReverse"
,
"required"
:
false
,
"callType"
:
"async"
,
"desc"
:
"全开全关对调"
}
],
"properties"
:
[
...
...
@@ -142,7 +166,7 @@
"name"
:
"窗帘操作模式"
},
{
"identifier"
:
"
LiftPercentage
"
,
"identifier"
:
"
Position
"
,
"dataType"
:
{
"type"
:
"int"
,
"specs"
:
{
...
...
@@ -156,6 +180,44 @@
"required"
:
true
,
"accessMode"
:
"rw"
,
"name"
:
"窗帘开启百分比"
},
{
"identifier"
:
"WorkMode"
,
"dataType"
:
{
"specs"
:
{
"3"
:
"转向"
},
"type"
:
"enum"
},
"name"
:
"窗帘转向(循环交替转向)"
,
"accessMode"
:
"w"
,
"required"
:
true
},
{
"identifier"
:
"RouteState"
,
"dataType"
:
{
"specs"
:
{
"0"
:
"未设置"
,
"1"
:
"已设置"
},
"type"
:
"enum"
},
"accessMode"
:
"w"
,
"required"
:
true
,
"name"
:
"行程设置"
},
{
"identifier"
:
"SwapState"
,
"name"
:
"全开全关状态对调"
,
"accessMode"
:
"w"
,
"required"
:
true
,
"dataType"
:
{
"type"
:
"bool"
,
"specs"
:
{
"0"
:
"关闭对调"
,
"1"
:
"开启对调"
}
}
}
],
"events"
:
[
...
...
@@ -174,7 +236,7 @@
"name"
:
"窗帘操作模式"
},
{
"identifier"
:
"
LiftPercentage
"
,
"identifier"
:
"
Position
"
,
"dataType"
:
{
"type"
:
"int"
,
"specs"
:
{
...
...
@@ -186,6 +248,28 @@
}
},
"name"
:
"窗帘开启百分比"
},
{
"identifier"
:
"WorkMode"
,
"dataType"
:
{
"specs"
:
{
"0"
:
"正转"
,
"1"
:
"反转"
},
"type"
:
"enum"
},
"name"
:
"窗帘工作模式"
},
{
"identifier"
:
"RouteState"
,
"dataType"
:
{
"specs"
:
{
"0"
:
"未设置"
,
"1"
:
"已设置"
},
"type"
:
"enum"
},
"name"
:
"行程设置"
}
],
"identifier"
:
"property"
,
...
...
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