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
65c4d534
Commit
65c4d534
authored
Mar 16, 2022
by
chen.weican
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【修改内容】1,上传最新的网关程序;2,版本号更新为1.4.6
parent
429ec1be
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
16 additions
and
24 deletions
+16
-24
VERSION
VERSION
+1
-1
application/kcloud/kk_register.c
application/kcloud/kk_register.c
+0
-2
application/kcloud/mqtt_api.c
application/kcloud/mqtt_api.c
+0
-2
application/klansdk/kk_data_handle.c
application/klansdk/kk_data_handle.c
+3
-2
application/klansdk/kk_data_handle.h
application/klansdk/kk_data_handle.h
+0
-1
application/klansdk/kk_lan_main.c
application/klansdk/kk_lan_main.c
+0
-3
application/klansdk/kk_lan_sync.c
application/klansdk/kk_lan_sync.c
+9
-7
application/klansdk/kk_oldccu_msg.c
application/klansdk/kk_oldccu_msg.c
+3
-6
nx5_soc_gw/smarthome_z3gw_a133
nx5_soc_gw/smarthome_z3gw_a133
+0
-0
No files found.
VERSION
View file @
65c4d534
1.4.5
\ No newline at end of file
1.4.6
\ No newline at end of file
application/kcloud/kk_register.c
View file @
65c4d534
...
...
@@ -238,7 +238,6 @@ static char * kk_create_register_info()
cJSON
*
root
;
char
*
out
=
NULL
;
char
*
signSource
,
*
base64Out
=
NULL
;
char
mac
[
16
]
=
{
0
};
char
ramdonId
[
16
]
=
{
0
};
unsigned
char
sign_hex
[
32
]
=
{
0
};
char
sign_hex_str
[
65
]
=
{
0
};
...
...
@@ -248,7 +247,6 @@ static char * kk_create_register_info()
int
productSecret_len
=
0
;
char
keyTmp
[
64
]
=
{
0
};
root
=
cJSON_CreateObject
();
HAL_Get_mac
(
mac
);
HAL_GetTime_s
(
ramdonId
);
KK_Get_ccuid
(
ccuid
);
kk_cloud_get_pid
(
pid
);
...
...
application/kcloud/mqtt_api.c
View file @
65c4d534
...
...
@@ -254,7 +254,6 @@ MQTTAsync KK_MQTT_Connect(void)
MQTTAsync_willOptions
will_opts
=
MQTTAsync_willOptions_initializer
;
MQTTAsync_setTraceCallback
(
mqttTraceCallback
);
opts
.
MQTTVersion
=
MQTTVERSION_3_1_1
;
char
mac
[
16
]
=
{
0
};
char
token
[
512
]
=
{
0
};
char
usrname
[
128
]
=
{
0
};
fp
=
fopen
(
KK_TOKEN_PATH
,
"r"
);
...
...
@@ -262,7 +261,6 @@ MQTTAsync KK_MQTT_Connect(void)
fread
(
token
,
1
,
sizeof
(
token
),
fp
);
fclose
(
fp
);
}
HAL_Get_mac
(
mac
);
char
ccuid
[
32
]
=
{
0
};
char
pid
[
32
]
=
{
0
};
KK_Get_ccuid
(
ccuid
);
...
...
application/klansdk/kk_data_handle.c
View file @
65c4d534
...
...
@@ -1033,11 +1033,12 @@ void KK_Data_FromMid(void* str,int len, char* chalMark)
INFO_PRINT
(
"offline handle!!!"
);
kk_device_onoffline_handle
(
payload
,
0
);
}
else
if
(
strstr
(
msgtype
->
valuestring
,
"/thing/service/addDeviceToRoom_reply"
)
!=
NULL
){
sleep
(
3
);
INFO_PRINT
(
"addDeviceToRoom_reply handle!!!"
);
device_add_sync
(
payload
);
kk_handle_sync_push_info
();
kk_handle_sync_info
();
}
else
if
(
strstr
(
msgtype
->
valuestring
,
"/thing/service/removeDeviceFromRoom_reply"
)
!=
NULL
){
kk_handle_sync_push_info
();
kk_handle_sync_info
();
}
else
if
(
strstr
(
msgtype
->
valuestring
,
"/thing/event/alarmNotify"
)
!=
NULL
){
INFO_PRINT
(
"alarmNotify handle!!!"
);
cJSON
*
msgId
=
cJSON_GetObjectItem
(
payload
,
"msgId"
);
...
...
application/klansdk/kk_data_handle.h
View file @
65c4d534
...
...
@@ -11,6 +11,5 @@ void KK_Data_FromMid(void* str,int len, char* chalMark);
int
kk_lan_property_syn_deal
(
const
char
*
deviceCode
,
cJSON
*
properties
);
int
send_msg_to_module
(
cJSON
*
root
);
void
device_add_sync
(
cJSON
*
payload
);
void
kk_handle_sync_push_info
(
void
);
#endif
\ No newline at end of file
application/klansdk/kk_lan_main.c
View file @
65c4d534
...
...
@@ -281,14 +281,11 @@ int main(int argc, char* argv[])
if
(
g_sync_flag
&
SYNC_INFO_FLAG
){
DEBUG_PRINT
(
"[SYNC INFO].
\n
"
);
send_data
=
_kk_data_create
(
SYNC_MSG_TYPE
,
s_pid
,
s_ccuid
,
"*"
);
g_sync_flag
&=~
SYNC_INFO_FLAG
;
}
else
if
(
g_sync_flag
&
SYNC_INFO_PUSH_FLAG
){
DEBUG_PRINT
(
"[SYNC INFO PUSH].
\n
"
);
send_data
=
_kk_data_create
(
SYNCPUSH_MSG_TYPE
,
s_pid
,
s_ccuid
,
"*"
);
kk_handle_sync_push_info
();
g_sync_flag
&=~
SYNC_INFO_PUSH_FLAG
;
}
else
{
g_sync_flag
=
0
;
...
...
application/klansdk/kk_lan_sync.c
View file @
65c4d534
...
...
@@ -168,32 +168,34 @@ int kk_sync_actions(cJSON *actions,SYN_SCENE_ACTION **act)
int
i
,
num
=
cJSON_GetArraySize
(
actions
);
int
node
=
-
1
;
int
get_flag
=
0
;
*
act
=
(
SYN_SCENE_ACTION
*
)
malloc
(
sizeof
(
SYN_SCENE_ACTION
)
*
num
);
memset
(
*
act
,
0
,
sizeof
(
SYN_SCENE_ACTION
)
*
num
);
SYN_SCENE_ACTION
*
ptr
=*
act
;
for
(
i
=
0
;
i
<
num
;
i
++
,
ptr
++
){
cJSON
*
item
;
item
=
cJSON_GetArrayItem
(
actions
,
i
);
deviceCode
=
cJSON_GetObjectItem
(
item
,
"deviceCode"
);
if
(
deviceCode
==
NULL
){
continue
;
}
delay
=
cJSON_GetObjectItem
(
item
,
"delay"
);
if
(
delay
==
NULL
){
continue
;
}
epNum
=
cJSON_GetObjectItem
(
item
,
"epNum"
);
if
(
epNum
==
NULL
){
continue
;
}
propertyName
=
cJSON_GetObjectItem
(
item
,
"propertyName"
);
type
=
cJSON_GetObjectItem
(
item
,
"type"
);
propertyValue
=
cJSON_GetObjectItem
(
item
,
"propertyValue"
);
ptr
->
ui_area
=
NULL
;
ptr
->
ui_name
=
NULL
;
ptr
->
ui_room_id
=
NULL
;
ptr
->
delay
=
delay
->
valuestring
;
ptr
->
nodeid
=
kk_lan_db_node_get
(
deviceCode
->
valuestring
,
epNum
->
valueint
);
ptr
->
operate_type
=
"*"
;
//type->valuestring;//根据实际设备调整
ptr
->
operation
=
"*"
;
//propertyValue->valuestring;//
}
...
...
application/klansdk/kk_oldccu_msg.c
View file @
65c4d534
...
...
@@ -460,6 +460,7 @@ void kk_lan_add_scene_notify(const char* scene_id)
debug_log
(
LOG_CRIT_LEVEL
,
"[notify] add scene(%s).
\n
"
,
scene_id
);
kk_handle_sync_push_info
();
kk_handle_sync_info
();
}
//删除场景通知
...
...
@@ -472,6 +473,7 @@ void kk_lan_delete_scene_notify(const char* scene_id)
cJSON_Delete
(
msg
);
kk_handle_sync_push_info
();
kk_handle_sync_info
();
}
//布防撤防状态通知(0-离家布防、1-撤防、2-在家布防、3-区域布防)
...
...
@@ -546,6 +548,7 @@ static int _kk_lan_delete_device(const char *deviceCode)
if
(
num
){
kk_handle_sync_push_info
();
kk_handle_sync_info
();
}
return
0
;
}
...
...
@@ -573,10 +576,4 @@ int kk_lan_device_delete_notify(cJSON *payload)
return
0
;
}
void
device_add_sync
(
cJSON
*
payload
)
{
//NEW_DEVICES
printf
(
"[%s][%d]
\n
"
,
__FUNCTION__
,
__LINE__
);
kk_handle_sync_push_info
();
}
nx5_soc_gw/smarthome_z3gw_a133
View file @
65c4d534
No preview for this file type
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