Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Z
Z3dev-AllToOneFanPanel
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
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
limm
Z3dev-AllToOneFanPanel
Commits
e7d3c114
Commit
e7d3c114
authored
Dec 18, 2020
by
limm
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1,增加绑定解绑操作!
parent
5459550e
Changes
17
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
345 additions
and
195 deletions
+345
-195
Code/KKAllToOneFloorHeatingMG21SDK665/.cproject
Code/KKAllToOneFloorHeatingMG21SDK665/.cproject
+4
-6
Code/KKAllToOneFloorHeatingMG21SDK665/00ikonke-app/common_process.c
...ToOneFloorHeatingMG21SDK665/00ikonke-app/common_process.c
+74
-25
Code/KKAllToOneFloorHeatingMG21SDK665/00ikonke-app/common_process.h
...ToOneFloorHeatingMG21SDK665/00ikonke-app/common_process.h
+9
-3
Code/KKAllToOneFloorHeatingMG21SDK665/00ikonke-app/general/ikk-network.c
...FloorHeatingMG21SDK665/00ikonke-app/general/ikk-network.c
+5
-4
Code/KKAllToOneFloorHeatingMG21SDK665/00ikonke-app/ikk-tokens.h
...KAllToOneFloorHeatingMG21SDK665/00ikonke-app/ikk-tokens.h
+10
-2
Code/KKAllToOneFloorHeatingMG21SDK665/00ikonke-app/ikk-user.c
.../KKAllToOneFloorHeatingMG21SDK665/00ikonke-app/ikk-user.c
+74
-65
Code/KKAllToOneFloorHeatingMG21SDK665/00ikonke-app/uart_handler.c
...llToOneFloorHeatingMG21SDK665/00ikonke-app/uart_handler.c
+126
-71
Code/KKAllToOneFloorHeatingMG21SDK665/00ikonke-app/uart_handler.h
...llToOneFloorHeatingMG21SDK665/00ikonke-app/uart_handler.h
+4
-2
Code/KKAllToOneFloorHeatingMG21SDK665/KKFan_Control_MG21SDK665.isc
...lToOneFloorHeatingMG21SDK665/KKFan_Control_MG21SDK665.isc
+4
-4
Code/KKAllToOneFloorHeatingMG21SDK665/kkAllInOneFloorHeatingMG21SDK665V1-postbuild.py
...G21SDK665/kkAllInOneFloorHeatingMG21SDK665V1-postbuild.py
+2
-2
Code/KKAllToOneFloorHeatingMG21SDK665/kkAllInOneFloorHeatingMG21SDK665V1-postbuild.py.bak
...DK665/kkAllInOneFloorHeatingMG21SDK665V1-postbuild.py.bak
+2
-2
Code/KKAllToOneFloorHeatingMG21SDK665/kkAllInOneFloorHeatingMG21SDK665V1.h
...oorHeatingMG21SDK665/kkAllInOneFloorHeatingMG21SDK665V1.h
+1
-1
Code/KKAllToOneFloorHeatingMG21SDK665/kkAllInOneFloorHeatingMG21SDK665V1.h.bak
...eatingMG21SDK665/kkAllInOneFloorHeatingMG21SDK665V1.h.bak
+1
-1
Code/KKAllToOneFloorHeatingMG21SDK665/kkAllInOneFloorHeatingMG21SDK665V1_endpoint_config.h
...K665/kkAllInOneFloorHeatingMG21SDK665V1_endpoint_config.h
+1
-1
Code/KKAllToOneFloorHeatingMG21SDK665/kkAllInOneFloorHeatingMG21SDK665V1_endpoint_config.h.bak
.../kkAllInOneFloorHeatingMG21SDK665V1_endpoint_config.h.bak
+26
-4
Code/KKAllToOneFloorHeatingMG21SDK665/znet-mfg-token.h
Code/KKAllToOneFloorHeatingMG21SDK665/znet-mfg-token.h
+1
-1
Code/KKAllToOneFloorHeatingMG21SDK665/znet-token.h
Code/KKAllToOneFloorHeatingMG21SDK665/znet-token.h
+1
-1
No files found.
Code/KKAllToOneFloorHeatingMG21SDK665/.cproject
View file @
e7d3c114
This source diff could not be displayed because it is too large. You can
view the blob
instead.
Code/KKAllToOneFloorHeatingMG21SDK665/00ikonke-app/common_process.c
View file @
e7d3c114
...
...
@@ -166,8 +166,8 @@ bool APP_PreCommandHandlerCallback(EmberAfClusterCommand* cmd)
{
uint8_t
datavalue
=
cmd
->
buffer
[
i
+
3
];
iKonkeAfSelfPrint
(
"##### datavalue (%d),%d
\r\n
"
,
datavalue
,
cmd
->
buffer
[
i
+
3
]
);
if
(
(((
datavalue
==
3
)
||
(
datavalue
==
4
)
||
(
datavalue
==
7
)
||
(
datavalue
==
8
))
&&
(
g_sDevice_Info
.
Device_Type
==
Device_Type_Air_Condition
))
||
(((
datavalue
==
1
)
||
(
datavalue
==
2
))
&&
(
g_sDevice_Info
.
Device_Type
==
Device_Type_Floor_Heating
)))
if
(
(((
datavalue
==
3
)
||
(
datavalue
==
4
)
||
(
datavalue
==
7
)
||
(
datavalue
==
8
))
&&
(
endpoint
==
1
))
||
(((
datavalue
==
1
)
||
(
datavalue
==
2
))
&&
(
endpoint
==
2
)))
{
temp_data
=
datavalue
;
Control_MCU
(
&
g_sMsgNode
,
endpoint
,
CMD_SYSTEM
,
temp_data
);
...
...
@@ -282,7 +282,7 @@ bool APP_PreCommandHandlerCallback(EmberAfClusterCommand* cmd)
{
uint8_t
datavalue
=
cmd
->
buffer
[
i
+
3
];
iKonkeAfSelfPrint
(
"#####delay off, datavalue (%d),%d
\r\n
"
,
datavalue
,
cmd
->
buffer
[
i
+
3
]
);
if
(
(
datavalue
>
0
)
&&
(
datavalue
<=
240
)){
if
(
(
datavalue
>
=
0
)
&&
(
datavalue
<=
240
)){
Control_MCU
(
&
g_sMsgNode
,
endpoint
,
CMD_DELAY_OFF
,
datavalue
);
kZclClusterSetPermitReportInfo
(
endpoint
,
ZCL_OPT_TUNNEL_CLUSTER_ID
,
false
,
false
,
false
,
false
);
// if(g_sMsgNode.buffer[POLAD_INDEX] == TP_SUCCESS)
...
...
@@ -378,6 +378,30 @@ bool APP_PreCommandHandlerCallback(EmberAfClusterCommand* cmd)
}
return
false
;
}
BIND_Info_Store
Bind_Addr_Table
=
{
.
addr1
=
{
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
},
.
addr2
=
{
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
},
.
bind_flag1
=
0
,
.
bind_flag2
=
0
};
void
kSetBindConfigInfo
(
BIND_Info_Store
*
info
)
{
halCommonSetToken
(
TOKEN_BINDIND_ADDR_TABLE
,
info
);
}
BIND_Info_Store
kGetBindConfigInfo
(
void
)
{
halCommonGetToken
(
&
Bind_Addr_Table
,
TOKEN_BINDIND_ADDR_TABLE
);
return
Bind_Addr_Table
;
}
void
Reset_Binding_Token
(
void
)
{
memset
(
Bind_Addr_Table
.
addr1
,
0xff
,
EUI64_SIZE
);
memset
(
Bind_Addr_Table
.
addr1
,
0xff
,
EUI64_SIZE
);
Bind_Addr_Table
.
bind_flag1
=
Bind_Addr_Table
.
bind_flag2
=
0
;
kSetBindConfigInfo
(
&
Bind_Addr_Table
);
}
EmberEventControl
ikkGetBindInfoEventControl
;
bool
IS_IEE_Addr_Exist
(
EmberEUI64
addr
)
{
...
...
@@ -393,42 +417,67 @@ bool IS_IEE_Addr_Exist(EmberEUI64 addr)
}
return
false
;
}
void
ikkGetBindInfoEventHandler
(
void
)
{
EmberBindingTableEntry
result
;
static
uint8_t
is_blinding_flag
=
0
;
EmberEUI64
g_Eui64GatewayAddr
;
static
EmberEUI64
g_Eui64BindDeviceAddr
=
{
0xFF
,
0XFF
,
0XFF
,
0XFF
,
0xFF
,
0XFF
,
0XFF
,
0XFF
};
kNwkGetGateWayEui64
(
g_Eui64GatewayAddr
);
emberEventControlSetInactive
(
ikkGetBindInfoEventControl
);
for
(
int
index
=
0
;
index
<
emberAfGetBindingTableSize
();
++
index
)
{
EmberStatus
status
=
emberGetBinding
(
index
,
&
result
);
if
(
status
==
EMBER_SUCCESS
&&
result
.
type
==
EMBER_UNICAST_BINDING
)
{
if
(
result
.
clusterId
==
0xFCC0
)
{
if
(
(
status
==
EMBER_SUCCESS
&&
result
.
type
==
EMBER_UNICAST_BINDING
)
&&
result
.
clusterId
==
0xFCC0
)
{
if
(
memcmp
(
result
.
identifier
,
g_Eui64GatewayAddr
,
EUI64_SIZE
)
!=
0
)
{
memcpy
(
g_Eui64BindDeviceAddr
,
result
.
identifier
,
EUI64_SIZE
);
iKonkeAfSelfPrint
(
"local EP = %d,remote ep = %d
\r\n
"
,
result
.
local
,
result
.
remote
);
if
((
result
.
local
!=
g_sDevice_Info
.
Device_Type
)
&&
(
is_blinding_flag
==
0
))
iKonkeAfSelfPrint
(
"mac=%x-%x-%x-%x
\r\n
"
,
result
.
identifier
[
0
],
result
.
identifier
[
1
],
result
.
identifier
[
2
],
result
.
identifier
[
3
]);
if
((
Bind_Addr_Table
.
bind_flag1
==
0
)
&&
(
memcmp
(
Bind_Addr_Table
.
addr2
,
result
.
identifier
,
EUI64_SIZE
)))
{
memcpy
(
Bind_Addr_Table
.
addr1
,
result
.
identifier
,
EUI64_SIZE
);
if
(
result
.
local
!=
g_sDevice_Info
.
Device_Type
)
{
g_sDevice_Info
.
Binding_Device_SrcEP
[
0
]
=
result
.
local
;
Binging_Info_Notify
(
1
,
result
.
local
);
//bind
Bind_Addr_Table
.
bind_flag1
=
1
;
iKonkeAfSelfPrint
(
"send blind1 info,ep = %d
\r\n
"
,
g_sDevice_Info
.
Binding_Device_SrcEP
[
0
]);
kSetBindConfigInfo
(
&
Bind_Addr_Table
);
}
}
if
((
Bind_Addr_Table
.
bind_flag2
==
0
)
&&
(
memcmp
(
Bind_Addr_Table
.
addr1
,
result
.
identifier
,
EUI64_SIZE
)))
{
memcpy
(
Bind_Addr_Table
.
addr2
,
result
.
identifier
,
EUI64_SIZE
);
if
(
result
.
local
!=
g_sDevice_Info
.
Device_Type
)
{
g_sDevice_Info
.
Binding_Device_SrcEP
=
result
.
local
;
Binging_Info_Notify
(
result
.
local
);
is_blinding_flag
=
1
;
iKonkeAfSelfPrint
(
"send blind info
\r\n
"
);
g_sDevice_Info
.
Binding_Device_SrcEP
[
1
]
=
result
.
local
;
Binging_Info_Notify
(
1
,
result
.
local
);
//bind
Bind_Addr_Table
.
bind_flag2
=
1
;
kSetBindConfigInfo
(
&
Bind_Addr_Table
);
iKonkeAfSelfPrint
(
"send blind2 info,ep = %d
\r\n
"
,
g_sDevice_Info
.
Binding_Device_SrcEP
[
1
]);
}
}
}
else
if
((
!
IS_IEE_Addr_Exist
(
g_Eui64BindDeviceAddr
))
&&
(
is_blinding_flag
))
else
if
((
!
IS_IEE_Addr_Exist
(
Bind_Addr_Table
.
addr1
))
&&
(
Bind_Addr_Table
.
bind_flag1
))
{
is_blinding_flag
=
0
;
g_sDevice_Info
.
Binding_Device_SrcEP
=
0
;
Binging_Info_Notify
(
g_sDevice_Info
.
Binding_Device_SrcEP
);
iKonkeAfSelfPrint
(
"send unblind info
\r\n
"
);
Bind_Addr_Table
.
bind_flag1
=
0
;
Binging_Info_Notify
(
0
,
g_sDevice_Info
.
Binding_Device_SrcEP
[
0
]);
//unbind
iKonkeAfSelfPrint
(
"send unblind1 info,ep = %d
\r\n
"
,
g_sDevice_Info
.
Binding_Device_SrcEP
[
0
]);
g_sDevice_Info
.
Binding_Device_SrcEP
[
0
]
=
0
;
memset
(
Bind_Addr_Table
.
addr1
,
0xff
,
EUI64_SIZE
);
kSetBindConfigInfo
(
&
Bind_Addr_Table
);
}
else
if
((
!
IS_IEE_Addr_Exist
(
Bind_Addr_Table
.
addr2
))
&&
(
Bind_Addr_Table
.
bind_flag2
))
{
Bind_Addr_Table
.
bind_flag2
=
0
;
Binging_Info_Notify
(
0
,
g_sDevice_Info
.
Binding_Device_SrcEP
[
1
]);
//unbind
iKonkeAfSelfPrint
(
"send unblind2 info,ep = %d
\r\n
"
,
g_sDevice_Info
.
Binding_Device_SrcEP
[
1
]);
g_sDevice_Info
.
Binding_Device_SrcEP
[
1
]
=
0
;
memset
(
Bind_Addr_Table
.
addr2
,
0xff
,
EUI64_SIZE
);
kSetBindConfigInfo
(
&
Bind_Addr_Table
);
}
}
}
emberEventControlSetDelayMS
(
ikkGetBindInfoEventControl
,
2000
);
}
bool
emberAfThermostatClusterSetpointRaiseLowerCallback
(
uint8_t
mode
,
...
...
@@ -687,7 +736,7 @@ kk_err_t PrivateClusterHandler(EmberAfClusterCommand* cmd)
else
if
(
cmd
->
apsFrame
->
sourceEndpoint
==
3
)
sDevice_attr_new
.
fan
.
wind_speed
=
dataValue
;
data_type
=
ZCL_ENUM8_ATTRIBUTE_TYPE
;
Control_MCU
(
&
g_sMsgNode
,
cmd
->
apsFrame
->
sourceEndpoint
,
CMD_
CALI_TEMPER
,
dataValue
);
Control_MCU
(
&
g_sMsgNode
,
cmd
->
apsFrame
->
sourceEndpoint
,
CMD_
WIND_SPEED
,
dataValue
);
}
break
;
case
FCC0_ATTR_ON_OFF
:
...
...
Code/KKAllToOneFloorHeatingMG21SDK665/00ikonke-app/common_process.h
View file @
e7d3c114
...
...
@@ -52,12 +52,17 @@ EmberStatus Write_Attr(bool Report,uint8_t ep,uint16_t cluster,uint16_t attr, ui
#define Write_MinTemp_Attr(x,ep,data) Write_Attr(x,ep,ZCL_THERMOSTAT_CLUSTER_ID,ZCL_MIN_HEAT_SETPOINT_LIMIT_ATTRIBUTE_ID,(uint8_t*)data,ZCL_INT16S_ATTRIBUTE_TYPE)
typedef
struct
{
EmberEUI64
addr1
,
addr2
;
uint8_t
bind_flag1
,
bind_flag2
;
}
BIND_Info_Store
;
typedef
struct
{
uint8_t
Device_Type
;
uint8_t
Device_subType
;
uint8_t
Binding_Device_SrcEP
;
uint8_t
is_support_winddirect
;
uint8_t
Binding_Device_SrcEP
[
2
];
uint8_t
mcu_software_version
;
uint8_t
mcu_hardware_version
;
}
DEVICVE_INFO_ST
;
...
...
@@ -65,7 +70,8 @@ typedef struct
extern
DEVICVE_INFO_ST
g_sDevice_Info
;
uint8_t
Read_Zigbee_Version
(
void
);
kk_err_t
PrivateClusterHandler
(
EmberAfClusterCommand
*
cmd
);
BIND_Info_Store
kGetBindConfigInfo
(
void
);
void
Reset_Binding_Token
(
void
);
/**********************common interface*******************************/
uint8_t
Get_Device_Endpoint
(
void
);
uint8_t
Get_Binding_Device_EP
(
void
);
...
...
Code/KKAllToOneFloorHeatingMG21SDK665/00ikonke-app/general/ikk-network.c
View file @
e7d3c114
...
...
@@ -674,12 +674,13 @@ void kNwkFactoryReset(bool is_nwk_indicator)
kk_err_t
kNwkClusterBindingObjIsOK
(
uint8_t
endpoint
,
uint16_t
cluster
)
{
EmberBindingTableEntry
result
;
kNwkGetGateWayEui64
(
g_Eui64GatewayAddr
);
for
(
int
index
=
0
;
index
<
emberAfGetBindingTableSize
();
++
index
)
{
EmberStatus
status
=
emberGetBinding
(
index
,
&
result
);
if
(
status
==
EMBER_SUCCESS
&&
result
.
type
==
EMBER_UNICAST_BINDING
)
{
if
(
result
.
local
==
endpoint
&&
result
.
clusterId
==
cluster
)
{
if
(
result
.
local
==
endpoint
&&
result
.
clusterId
==
cluster
&&
!
MEMCOMPARE
(
result
.
identifier
,
g_Eui64GatewayAddr
,
EUI64_SIZE
)
)
{
return
KET_OK
;
}
}
...
...
@@ -700,7 +701,6 @@ kk_err_t kNwkClusterBindingObjIsOK(uint8_t endpoint, uint16_t cluster )
static
kk_err_t
kNwkClusterBindingObjSet
(
uint8_t
endpoint
,
uint16_t
cluster_id
,
EmberEUI64
eui64
)
{
kk_err_t
err
=
KET_OK
;
EmberStatus
status
=
emberAfPushEndpointNetworkIndex
(
1
);
if
(
status
==
EMBER_SUCCESS
)
{
...
...
@@ -714,7 +714,7 @@ static kk_err_t kNwkClusterBindingObjSet(uint8_t endpoint, uint16_t cluster_id,
if
(
EMBER_SUCCESS
==
status
)
{
if
(
entry
.
type
==
EMBER_UNICAST_BINDING
)
{
if
(
entry
.
local
==
endpoint
&&
entry
.
clusterId
==
cluster_id
)
{
if
(
entry
.
local
==
endpoint
&&
entry
.
clusterId
==
cluster_id
&&
!
MEMCOMPARE
(
entry
.
identifier
,
eui64
,
EUI64_SIZE
)
)
{
valid_index
=
index
;
break
;
}
...
...
@@ -765,7 +765,7 @@ kk_err_t kNwkClusterBindingInspect(void )
for
(
int
ix
=
0
;
ix
<
BINDING_CLUSTER_MAXN
;
++
ix
)
{
if
(
g_lstBindingClusterConf
[
ix
].
cluster
!=
CLUSTER_UNKNOW
)
{
kk_err_t
err
=
kNwkClusterBindingObjIsOK
(
g_lstBindingClusterConf
[
ix
].
endpoint
,
g_lstBindingClusterConf
[
ix
].
cluster
);
if
(
err
==
KET_ERR_NON_EXIST
)
{
if
(
err
!=
KET_OK
)
{
kNwkClusterBindingObjSet
(
g_lstBindingClusterConf
[
ix
].
endpoint
,
g_lstBindingClusterConf
[
ix
].
cluster
,
g_Eui64GatewayAddr
);
}
}
else
{
...
...
@@ -1810,6 +1810,7 @@ void kUserJoinSucceedProcedureEventHandler(void )
default:
break
;
}
}
/** @brief Incoming Packet Filter
*
* ** REQUIRES INCLUDING THE PACKET-HANDOFF PLUGIN **
...
...
Code/KKAllToOneFloorHeatingMG21SDK665/00ikonke-app/ikk-tokens.h
View file @
e7d3c114
...
...
@@ -27,7 +27,8 @@
#define CREATOR_IS_KONKE_GATEWAY (0x0007)
#define NVM3KEY_IS_KONKE_GATEWAY ( NVM3KEY_DOMAIN_USER | 0x0007 )
#define CREATOR_BINDIND_ADDR_TABLE (0x0008)
#define NVM3KEY_BINDIND_ADDR_TABLE ( NVM3KEY_DOMAIN_USER | 0x0008 )
//#define CREATOR_OPTTUNNEL_CMEI_FLG 0x0007
//#define NVM3KEY_OPTTUNNEL_CMEI_FLG ( NVM3KEY_DOMAIN_USER | 0x0007 )
...
...
@@ -40,6 +41,13 @@
#endif
#ifdef DEFINETYPES
typedef
struct
{
EmberEUI64
addr1
;
EmberEUI64
addr2
;
uint8_t
bind_flag1
;
uint8_t
bind_flag2
;
}
BIND_Info
;
typedef
BIND_Info
tokTypeBindInfo
;
//typedef uint8_t tokTypeChunk[33];
#endif //DEFINETYPES
...
...
@@ -51,7 +59,7 @@ DEFINE_BASIC_TOKEN(SINGLE_BOARD_TEST_FLG, uint8_t, 0)
DEFINE_BASIC_TOKEN
(
FULL_DEVICE_TEST_FLG
,
uint8_t
,
0
)
DEFINE_BASIC_TOKEN
(
AGING_TEST_FLG
,
uint8_t
,
0
)
DEFINE_BASIC_TOKEN
(
INDICATOR_NOT_DISTURB_MODE_FLG
,
uint8_t
,
0
)
DEFINE_BASIC_TOKEN
(
BINDIND_ADDR_TABLE
,
tokTypeBindInfo
,
{{
0xFF
,
0xFF
,
0xFF
,
0xFF
,
0xFF
,
0xFF
,
0xFF
,
0xFF
},{
0xFF
,
0xFF
,
0xFF
,
0xFF
,
0xFF
,
0xFF
,
0xFF
,
0xFF
},
0
,
0
})
DEFINE_BASIC_TOKEN
(
NODE_ID
,
uint16_t
,
0xFFFF
)
DEFINE_BASIC_TOKEN
(
IS_KONKE_GATEWAY
,
uint8_t
,
0
)
...
...
Code/KKAllToOneFloorHeatingMG21SDK665/00ikonke-app/ikk-user.c
View file @
e7d3c114
...
...
@@ -135,13 +135,16 @@ SensorStatusSt g_stSensorStatusBuffer = {
};
extern
uint8_t
generatedDefaults
[];
#define Software_Version 0x1
1
#define Software_Version 0x1
2
#define Hardware_Version 0x10
#define MODEID_AIR_MEIDI 0x03008611 //美的线控器
#define MODEID_FAN_Pannel 0x03008604 //新风面板
#define MODEID_ELECTRIC_FLOOR_HEATING 0x03008603 //电地暖
#define MODEID_FAN_CONTROL_PANNEL 0x03008601 //风机盘管
extern
BIND_Info_Store
Bind_Addr_Table
;
void
Rewrite_Modeid
(
uint8_t
*
modeid
,
uint8_t
software
,
uint8_t
hardware
)
{
uint8_t
Modeid_Temp
[]
=
"3AFE101003008611"
;
...
...
@@ -186,6 +189,7 @@ void Rewrite_Modeid(uint8_t *modeid,uint8_t software,uint8_t hardware)
iKonkeAfSelfPrint
(
"Finish Rewrite Modeid :
\r\n
"
);
iKonkeAfSelfPrintBuffer
(
Modeid_Temp
,
sizeof
(
Modeid_Temp
)
-
1
,
1
);
}
typedef
struct
{
_IO
uint8_t
src_endpoint
;
_IO
uint16_t
group_id
;
...
...
@@ -425,6 +429,10 @@ void kUserNetworkStatusNotify(NwkStatusEnum nwkst )
//恢复所有绑定属性上报使能
//kSystemSetupStatusSet(SETUP_STATUS_EXIT, 10);
Push_Netwaork_Status
(
IN_LINE
);
kGetBindConfigInfo
();
iKonkeAfSelfPrint
(
"mac 1,falge=%d mac=%x-%x-%x
\r\n
"
,
Bind_Addr_Table
.
bind_flag1
,
Bind_Addr_Table
.
addr1
[
0
],
Bind_Addr_Table
.
addr1
[
1
],
Bind_Addr_Table
.
addr1
[
3
]);
iKonkeAfSelfPrint
(
"mac 2,falge=%d mac=%x-%x-%x
\r\n
"
,
Bind_Addr_Table
.
bind_flag2
,
Bind_Addr_Table
.
addr1
[
0
],
Bind_Addr_Table
.
addr2
[
1
],
Bind_Addr_Table
.
addr2
[
3
]);
emberEventControlSetActive
(
ikkGetBindInfoEventControl
);
iKonkeAfSelfPrint
(
"Joined Network RandTime(%dms) CurrentTime(%ld)
\r\n
"
,
randTimeMS
,
currentTimeMS
);
...
...
@@ -445,6 +453,7 @@ void kUserNetworkStatusNotify(NwkStatusEnum nwkst )
case
(
ENS_LEAVED
):
{
Push_Netwaork_Status
(
OUT_LINE
);
Reset_Binding_Token
();
//network leave open led blink when humanbody exist
//打开打扰模式,即感应到人后快闪2次
kSetIndicatorNotDisturbModeFlg
(
false
);
...
...
@@ -723,11 +732,11 @@ bool kZclClusterReportChangeCallback(uint8_t endpoint, EmberAfClusterId clusterI
emberEventControlSetInactive
(
kTargetTemperDelayReportAttrEventControl
);
}
//有多控绑定发给其它子设备, 不发给网关
if
(
kZclNodeIsBindNotGatewayIeeeAddress
(
endpoint
,
ZCL_OPT_TUNNEL_CLUSTER_ID
)
==
true
)
{
iKonkeAfSelfPrint
(
"Multi Control,none report gateway!!!
\r\n
"
);
//kOptTunnelReportingPlagiarizeOriginal(endpoint, clusterId, attributeId, CLUSTER_MASK_SERVER);
return
false
;
}
//
if( kZclNodeIsBindNotGatewayIeeeAddress(endpoint, ZCL_OPT_TUNNEL_CLUSTER_ID) == true) {
//
iKonkeAfSelfPrint("Multi Control,none report gateway!!!\r\n");
//
//kOptTunnelReportingPlagiarizeOriginal(endpoint, clusterId, attributeId, CLUSTER_MASK_SERVER);
//
return false;
//
}
//kZclClusterSetPermitReportInfo(endpoint, clusterId, true, false, true, false);
return
true
;
}
...
...
@@ -965,7 +974,9 @@ kk_err_t kUserOODMessageIncoming(uint8_t channel, uint8_t opcode, uint8_t args_i
}
iKonkeAfSelfPrint
(
"--------------------------------------
\r\n
"
);
//test
if
(
g_sDevice_Info
.
mcu_software_version
==
0xff
)
//未读取到版本,重新请求一次
if
(
(
g_sDevice_Info
.
mcu_software_version
==
0xff
)
||
//未读取到版本,重新请求一次
((
g_sDevice_Info
.
Device_Type
==
Device_Type_Air_Condition
)
&&
(
g_sDevice_Info
.
Device_subType
==
0
)
&&
(
sDevice_attr_last
.
air_condition
.
air_brand
==
0xff
)
)
)
//未读到空调品牌
{
Query_MCU_Info
();
Rewite_Attr_Witchout_Report
();
...
...
@@ -974,8 +985,7 @@ kk_err_t kUserOODMessageIncoming(uint8_t channel, uint8_t opcode, uint8_t args_i
case
(
0x00
):
// get the device snap.
{
uint8_t
i
=
0
;
if
(
g_sDevice_Info
.
Device_Type
==
1
)
{
args_in_out
[
i
++
]
=
sDevice_attr_last
.
air_condition
.
error
;
args_in_out
[
i
++
]
=
g_sDevice_Info
.
mcu_software_version
;
args_in_out
[
i
++
]
=
g_sDevice_Info
.
mcu_hardware_version
;
...
...
@@ -990,16 +1000,15 @@ kk_err_t kUserOODMessageIncoming(uint8_t channel, uint8_t opcode, uint8_t args_i
args_in_out
[
i
++
]
=
sDevice_attr_last
.
air_condition
.
lock_flage
;
args_in_out
[
i
++
]
=
sDevice_attr_last
.
air_condition
.
correct_temperature
;
args_in_out
[
i
++
]
=
sDevice_attr_last
.
air_condition
.
screen_save_time
;
args_in_out
[
i
++
]
=
sDevice_attr_last
.
air_condition
.
air_wind_direct
;
args_in_out
[
i
++
]
=
(
g_sDevice_Info
.
is_support_winddirect
)
?
(
sDevice_attr_last
.
air_condition
.
air_wind_direct
)
:
(
0xff
)
;
args_in_out
[
i
++
]
=
sDevice_attr_last
.
air_condition
.
filter_wash_time
>>
8
;
args_in_out
[
i
++
]
=
sDevice_attr_last
.
air_condition
.
filter_wash_time
&
0xff
;
args_in_out
[
i
++
]
=
sDevice_attr_last
.
air_condition
.
no_disturb_mode
;
}
else
if
(
g_sDevice_Info
.
Device_Type
==
2
)
{
//空调线控器
args_in_out
[
i
++
]
=
sDevice_attr_last
.
air_condition
.
air_brand
;
args_in_out
[
i
++
]
=
sDevice_attr_last
.
air_condition
.
air_type
;
args_in_out
[
i
++
]
=
sDevice_attr_last
.
floor_heating
.
error
;
args_in_out
[
i
++
]
=
g_sDevice_Info
.
mcu_software_version
;
args_in_out
[
i
++
]
=
g_sDevice_Info
.
mcu_hardware_version
;
args_in_out
[
i
++
]
=
sDevice_attr_last
.
floor_heating
.
on_off
;
args_in_out
[
i
++
]
=
sDevice_attr_last
.
floor_heating
.
system_type
;
args_in_out
[
i
++
]
=
sDevice_attr_last
.
floor_heating
.
set_temperature
>>
8
;
...
...
@@ -1011,12 +1020,8 @@ kk_err_t kUserOODMessageIncoming(uint8_t channel, uint8_t opcode, uint8_t args_i
args_in_out
[
i
++
]
=
sDevice_attr_last
.
floor_heating
.
correct_temperature
;
args_in_out
[
i
++
]
=
sDevice_attr_last
.
floor_heating
.
screen_save_time
;
args_in_out
[
i
++
]
=
sDevice_attr_last
.
floor_heating
.
no_disturb_mode
;
}
else
if
(
g_sDevice_Info
.
Device_Type
==
3
)
{
args_in_out
[
i
++
]
=
sDevice_attr_last
.
fan
.
error
;
args_in_out
[
i
++
]
=
g_sDevice_Info
.
mcu_software_version
;
args_in_out
[
i
++
]
=
g_sDevice_Info
.
mcu_hardware_version
;
args_in_out
[
i
++
]
=
sDevice_attr_last
.
fan
.
on_off
;
args_in_out
[
i
++
]
=
sDevice_attr_last
.
fan
.
system_type
;
args_in_out
[
i
++
]
=
sDevice_attr_last
.
fan
.
real_temperature
>>
8
;
...
...
@@ -1029,7 +1034,7 @@ kk_err_t kUserOODMessageIncoming(uint8_t channel, uint8_t opcode, uint8_t args_i
args_in_out
[
i
++
]
=
sDevice_attr_last
.
fan
.
filter_wash_time
>>
8
;
args_in_out
[
i
++
]
=
sDevice_attr_last
.
fan
.
filter_wash_time
&
0xff
;
args_in_out
[
i
++
]
=
sDevice_attr_last
.
fan
.
no_disturb_mode
;
}
iKonkeAfSelfPrint
(
"OOOOOOPCODE: 1(%d), 2(%d), 3(%d)
\r\n
"
,
args_in_out
[
1
],
args_in_out
[
2
],
args_in_out
[
3
]);
*
length_in_out
=
i
;
break
;
...
...
@@ -1058,7 +1063,10 @@ kk_err_t kUserOODMessageIncoming(uint8_t channel, uint8_t opcode, uint8_t args_i
args_in_out
[
0
]
=
ERR_NO_COMMAND_FORMAT
;
}
else
{
kSetIndicatorNotDisturbModeFlg
(
mode
);
Set_No_Disturb_Mode
(
mode
);
if
(
channel
==
0
)
Set_No_Disturb_Mode
(
g_sDevice_Info
.
Device_Type
,
mode
);
else
Set_No_Disturb_Mode
(
channel
,
mode
);
args_in_out
[
0
]
=
ERR_NO_NONE
;
}
iKonkeAfSelfPrint
(
"Disturb Mode(%d)
\r\n
"
,
mode
);
...
...
@@ -1106,6 +1114,7 @@ void kkSystemSetUpEventHandler(void )
{
case
SETUP_STATUS_INIT
:
if
(
emberAfNetworkState
()
==
EMBER_JOINED_NETWORK
)
{
}
else
{
}
iKonkeAfSelfPrint
(
"System setup event.
\r\n
"
);
...
...
@@ -1317,7 +1326,7 @@ void Process_Device_TypeCallback(uint8_t device_type,uint8_t device_subtype)
{
case
Device_Type_Air_Condition
:
{
modeid
=
MODEID_
FAN_CONTROL_PANNEL
;
modeid
=
MODEID_
AIR_MEIDI
;
}
break
;
case
Device_Type_Floor_Heating
:
...
...
Code/KKAllToOneFloorHeatingMG21SDK665/00ikonke-app/uart_handler.c
View file @
e7d3c114
This diff is collapsed.
Click to expand it.
Code/KKAllToOneFloorHeatingMG21SDK665/00ikonke-app/uart_handler.h
View file @
e7d3c114
...
...
@@ -94,6 +94,8 @@ typedef struct
uint16_t
screen_save_time
;
//屏保时间
int8_t
correct_temperature
;
//温度校准值
uint8_t
no_disturb_mode
;
//勿扰模式
uint8_t
air_brand
;
//空调品牌
uint8_t
air_type
;
//空调类型
}
__attribute__
((
packed
))
AIR_ATTR_ST
;
typedef
struct
{
...
...
@@ -163,8 +165,8 @@ typedef struct
uint8_t
uiPaload
[
50
];
}
DATA_FIELDED
;
void
Query_MCU_Info
(
void
);
void
Binging_Info_Notify
(
uint8_t
device_type
);
void
Set_No_Disturb_Mode
(
uint8_t
mode
);
void
Binging_Info_Notify
(
uint8_t
bind_or_unbind
,
uint8_t
device_type
);
void
Set_No_Disturb_Mode
(
uint8_t
channel_id
,
uint8_t
mode
);
void
Set_LCD_OFF
(
void
);
void
Set_OTA_CMD
(
uint8_t
OTA_Status
);
void
Rewite_Attr_Witchout_Report
(
void
);
...
...
Code/KKAllToOneFloorHeatingMG21SDK665/KKFan_Control_MG21SDK665.isc
View file @
e7d3c114
...
...
@@ -103,8 +103,8 @@ useHwConfigurator=true
--version:2
}
{setupId:token
application=PATH(
ABSOLUTE):D:\Users\11730\SimplicityStudio\v4_workspace\KKAllToOneThermostatPanelMG21SDK665\00ikonke-app\
ikk-tokens.h
manufacturing=PATH(
ABSOLUTE):D:\Users\11730\SimplicityStudio\v4_workspace\KKAllToOneThermostatPanelMG21SDK665\00ikonke-app\
ikk-mfgtokens.h
application=PATH(
ISC_RELATIVE):00ikonke-app/
ikk-tokens.h
manufacturing=PATH(
ISC_RELATIVE):00ikonke-app/
ikk-mfgtokens.h
}
{setupId:zclAfv2
intMap:ManufacturingCode = 4712
...
...
@@ -157,7 +157,7 @@ beginAttrList:REPORTABLE
cl:0xFCC0, at:0x100C, di:server, mf:0x0000
endAttrList:REPORTABLE
beginAttributeDefaults
cl:0x0000, at:0x0001, di:server, mf:0x0000 => 0x1
0
cl:0x0000, at:0x0001, di:server, mf:0x0000 => 0x1
1
cl:0x0000, at:0x0003, di:server, mf:0x0000 => 0x10
cl:0x0000, at:0x0004, di:server, mf:0x0000 => Konke
cl:0x0000, at:0x0005, di:server, mf:0x0000 => 3AFE101003008611
...
...
@@ -796,4 +796,4 @@ AppPluginOption(efr32~family[M]~series[2]~device_configuration[1]~performance[A]
AppPluginOption(efr32~family[M]~series[2]~device_configuration[1]~performance[A]~radio[020]~flash[768K]~temp[I]~package[M]~pins[32]~!module+iar):EMBER_AF_PLUGIN_REPORTING_TABLE_SIZE,50
AppPluginOption(efr32~family[M]~series[2]~device_configuration[1]~performance[A]~radio[020]~flash[768K]~temp[I]~package[M]~pins[32]~!module+iar):EMBER_AF_PLUGIN_OTA_CLIENT_POLICY_HARDWARE_VERSION,0x10
AppPluginOption(efr32~family[M]~series[2]~device_configuration[1]~performance[A]~radio[020]~flash[768K]~temp[I]~package[M]~pins[32]~!module+iar):EMBER_AF_PLUGIN_OTA_CLIENT_POLICY_IMAGE_TYPE_ID,17061
AppPluginOption(efr32~family[M]~series[2]~device_configuration[1]~performance[A]~radio[020]~flash[768K]~temp[I]~package[M]~pins[32]~!module+iar):EMBER_AF_PLUGIN_OTA_CLIENT_POLICY_FIRMWARE_VERSION,0x1
1
AppPluginOption(efr32~family[M]~series[2]~device_configuration[1]~performance[A]~radio[020]~flash[768K]~temp[I]~package[M]~pins[32]~!module+iar):EMBER_AF_PLUGIN_OTA_CLIENT_POLICY_FIRMWARE_VERSION,0x1
2
Code/KKAllToOneFloorHeatingMG21SDK665/kkAllInOneFloorHeatingMG21SDK665V1-postbuild.py
View file @
e7d3c114
...
...
@@ -90,14 +90,14 @@ def GBL():
def
OTA
():
if
not
'"
%
PROJECT_DIR
%
\
..
\\
..
\\
..
\\
..
\\
..
\\
..
\\
SiliconLabs
\\
SimplicityStudio
\\
v4
\\
developer
\\
sdks
\\
gecko_sdk_suite
\\
v2.6
\\
protocol
\\
zigbee
\\
tool
\\
image-builder
\\
image-builder-windows.exe" --create "
%
TARGET_BPATH
%
.ota" --version 0x1
1
--manuf-id 0x1268 --image-type 17061 --tag-id 0x0000 --tag-file "
%
TARGET_BPATH
%
.gbl" --string "EBL kkAllInOneFloorHeatingMG21SDK665V1"'
:
if
not
'"
%
PROJECT_DIR
%
\
..
\\
..
\\
..
\\
..
\\
..
\\
..
\\
SiliconLabs
\\
SimplicityStudio
\\
v4
\\
developer
\\
sdks
\\
gecko_sdk_suite
\\
v2.6
\\
protocol
\\
zigbee
\\
tool
\\
image-builder
\\
image-builder-windows.exe" --create "
%
TARGET_BPATH
%
.ota" --version 0x1
2
--manuf-id 0x1268 --image-type 17061 --tag-id 0x0000 --tag-file "
%
TARGET_BPATH
%
.gbl" --string "EBL kkAllInOneFloorHeatingMG21SDK665V1"'
:
sys
.
exit
(
0
)
print
(
" "
)
print
(
"This creates a ZigBee OTA file if the OTA Client Policy Plugin has been enabled."
)
print
(
"It uses the parameters defined there. "
)
print
(
" "
)
# wine needed by postbuild script under studio for mac/linux
IMAGE_BUILDER
=
'"
%
PROJECT_DIR
%
\
..
\\
..
\\
..
\\
..
\\
..
\\
..
\\
SiliconLabs
\\
SimplicityStudio
\\
v4
\\
developer
\\
sdks
\\
gecko_sdk_suite
\\
v2.6
\\
protocol
\\
zigbee
\\
tool
\\
image-builder
\\
image-builder-windows.exe" --create "
%
TARGET_BPATH
%
.ota" --version 0x1
1
--manuf-id 0x1268 --image-type 17061 --tag-id 0x0000 --tag-file "
%
TARGET_BPATH
%
.gbl" --string "EBL kkAllInOneFloorHeatingMG21SDK665V1"'
.
replace
(
"
\t
"
,
"
\\
t"
)
IMAGE_BUILDER
=
'"
%
PROJECT_DIR
%
\
..
\\
..
\\
..
\\
..
\\
..
\\
..
\\
SiliconLabs
\\
SimplicityStudio
\\
v4
\\
developer
\\
sdks
\\
gecko_sdk_suite
\\
v2.6
\\
protocol
\\
zigbee
\\
tool
\\
image-builder
\\
image-builder-windows.exe" --create "
%
TARGET_BPATH
%
.ota" --version 0x1
2
--manuf-id 0x1268 --image-type 17061 --tag-id 0x0000 --tag-file "
%
TARGET_BPATH
%
.gbl" --string "EBL kkAllInOneFloorHeatingMG21SDK665V1"'
.
replace
(
"
\t
"
,
"
\\
t"
)
WINE_CMD
=
WINE
.
replace
(
"cmd /C "
,
""
)
if
not
"echo"
in
IMAGE_BUILDER
else
WINE
OTA_COMMAND
=
WINE_CMD
+
IMAGE_BUILDER
OTA_COMMAND
=
OTA_COMMAND
.
replace
(
"
%
PROJECT_DIR
%
"
,
PROJECT_DIR
)
...
...
Code/KKAllToOneFloorHeatingMG21SDK665/kkAllInOneFloorHeatingMG21SDK665V1-postbuild.py.bak
View file @
e7d3c114
...
...
@@ -90,14 +90,14 @@ def GBL():
def OTA():
if not '"%PROJECT_DIR%\..\\..\\..\\..\\..\\..\\SiliconLabs\\SimplicityStudio\\v4\\developer\\sdks\\gecko_sdk_suite\\v2.6\\protocol\\zigbee\\tool\\image-builder\\image-builder-windows.exe" --create "%TARGET_BPATH%.ota" --version 0x1
0
--manuf-id 0x1268 --image-type 17061 --tag-id 0x0000 --tag-file "%TARGET_BPATH%.gbl" --string "EBL kkAllInOneFloorHeatingMG21SDK665V1"':
if not '"%PROJECT_DIR%\..\\..\\..\\..\\..\\..\\SiliconLabs\\SimplicityStudio\\v4\\developer\\sdks\\gecko_sdk_suite\\v2.6\\protocol\\zigbee\\tool\\image-builder\\image-builder-windows.exe" --create "%TARGET_BPATH%.ota" --version 0x1
1
--manuf-id 0x1268 --image-type 17061 --tag-id 0x0000 --tag-file "%TARGET_BPATH%.gbl" --string "EBL kkAllInOneFloorHeatingMG21SDK665V1"':
sys.exit(0)
print (" ")
print ("This creates a ZigBee OTA file if the OTA Client Policy Plugin has been enabled.")
print ("It uses the parameters defined there. ")
print (" ")
# wine needed by postbuild script under studio for mac/linux
IMAGE_BUILDER = '"%PROJECT_DIR%\..\\..\\..\\..\\..\\..\\SiliconLabs\\SimplicityStudio\\v4\\developer\\sdks\\gecko_sdk_suite\\v2.6\\protocol\\zigbee\\tool\\image-builder\\image-builder-windows.exe" --create "%TARGET_BPATH%.ota" --version 0x1
0
--manuf-id 0x1268 --image-type 17061 --tag-id 0x0000 --tag-file "%TARGET_BPATH%.gbl" --string "EBL kkAllInOneFloorHeatingMG21SDK665V1"'.replace("\t", "\\t")
IMAGE_BUILDER = '"%PROJECT_DIR%\..\\..\\..\\..\\..\\..\\SiliconLabs\\SimplicityStudio\\v4\\developer\\sdks\\gecko_sdk_suite\\v2.6\\protocol\\zigbee\\tool\\image-builder\\image-builder-windows.exe" --create "%TARGET_BPATH%.ota" --version 0x1
1
--manuf-id 0x1268 --image-type 17061 --tag-id 0x0000 --tag-file "%TARGET_BPATH%.gbl" --string "EBL kkAllInOneFloorHeatingMG21SDK665V1"'.replace("\t", "\\t")
WINE_CMD = WINE.replace("cmd /C ","") if not "echo" in IMAGE_BUILDER else WINE
OTA_COMMAND = WINE_CMD + IMAGE_BUILDER
OTA_COMMAND = OTA_COMMAND.replace("%PROJECT_DIR%", PROJECT_DIR)
...
...
Code/KKAllToOneFloorHeatingMG21SDK665/kkAllInOneFloorHeatingMG21SDK665V1.h
View file @
e7d3c114
...
...
@@ -344,7 +344,7 @@
#define CUSTOMER_APPLICATION_VERSION EMBER_AF_PLUGIN_OTA_CLIENT_POLICY_FIRMWARE_VERSION
// User options for plugin OTA Bootload Cluster Client Policy
#define EMBER_AF_PLUGIN_OTA_CLIENT_POLICY_IMAGE_TYPE_ID 17061
#define EMBER_AF_PLUGIN_OTA_CLIENT_POLICY_FIRMWARE_VERSION 1
7
#define EMBER_AF_PLUGIN_OTA_CLIENT_POLICY_FIRMWARE_VERSION 1
8
#define EMBER_AF_PLUGIN_OTA_CLIENT_POLICY_HARDWARE_VERSION 16
#define EMBER_AF_PLUGIN_OTA_CLIENT_POLICY_EBL_VERIFICATION
#define EMBER_AF_PLUGIN_OTA_CLIENT_POLICY_DELETE_FAILED_DOWNLOADS
...
...
Code/KKAllToOneFloorHeatingMG21SDK665/kkAllInOneFloorHeatingMG21SDK665V1.h.bak
View file @
e7d3c114
...
...
@@ -344,7 +344,7 @@
#define CUSTOMER_APPLICATION_VERSION EMBER_AF_PLUGIN_OTA_CLIENT_POLICY_FIRMWARE_VERSION
// User options for plugin OTA Bootload Cluster Client Policy
#define EMBER_AF_PLUGIN_OTA_CLIENT_POLICY_IMAGE_TYPE_ID 17061
#define EMBER_AF_PLUGIN_OTA_CLIENT_POLICY_FIRMWARE_VERSION 1
6
#define EMBER_AF_PLUGIN_OTA_CLIENT_POLICY_FIRMWARE_VERSION 1
7
#define EMBER_AF_PLUGIN_OTA_CLIENT_POLICY_HARDWARE_VERSION 16
#define EMBER_AF_PLUGIN_OTA_CLIENT_POLICY_EBL_VERIFICATION
#define EMBER_AF_PLUGIN_OTA_CLIENT_POLICY_DELETE_FAILED_DOWNLOADS
...
...
Code/KKAllToOneFloorHeatingMG21SDK665/kkAllInOneFloorHeatingMG21SDK665V1_endpoint_config.h
View file @
e7d3c114
...
...
@@ -42,7 +42,7 @@
// Generated attributes
#define GENERATED_ATTRIBUTES { \
{ 0x0000, ZCL_INT8U_ATTRIBUTE_TYPE, 1, (ATTRIBUTE_MASK_SINGLETON), { (uint8_t*)0x01 } },
/* 0 / Basic / ZCL version*/
\
{ 0x0001, ZCL_INT8U_ATTRIBUTE_TYPE, 1, (ATTRIBUTE_MASK_SINGLETON), { (uint8_t*)0x1
0
} },
/* 1 / Basic / application version*/
\
{ 0x0001, ZCL_INT8U_ATTRIBUTE_TYPE, 1, (ATTRIBUTE_MASK_SINGLETON), { (uint8_t*)0x1
1
} },
/* 1 / Basic / application version*/
\
{ 0x0002, ZCL_INT8U_ATTRIBUTE_TYPE, 1, (ATTRIBUTE_MASK_SINGLETON), { (uint8_t*)0x01 } },
/* 2 / Basic / stack version*/
\
{ 0x0003, ZCL_INT8U_ATTRIBUTE_TYPE, 1, (ATTRIBUTE_MASK_SINGLETON), { (uint8_t*)0x10 } },
/* 3 / Basic / hardware version*/
\
{ 0x0004, ZCL_CHAR_STRING_ATTRIBUTE_TYPE, 33, (ATTRIBUTE_MASK_SINGLETON), { (uint8_t*)&(generatedDefaults[0]) } },
/* 4 / Basic / manufacturer name*/
\
...
...
Code/KKAllToOneFloorHeatingMG21SDK665/kkAllInOneFloorHeatingMG21SDK665V1_endpoint_config.h.bak
View file @
e7d3c114
...
...
@@ -141,8 +141,16 @@ const EmberAfGenericClusterFunction emberAfFuncArrayFanControlClusterServer[] =
{ 0x0019, (EmberAfAttributeMetadata*)&(generatedAttributes[22]), 4, 15, (CLUSTER_MASK_CLIENT| CLUSTER_MASK_INIT_FUNCTION| CLUSTER_MASK_DEFAULT_RESPONSE_FUNCTION), emberAfFuncArrayOtaBootloadClusterClient, }, \
{ 0x0201, (EmberAfAttributeMetadata*)&(generatedAttributes[32]), 8, 12, (CLUSTER_MASK_SERVER| CLUSTER_MASK_ATTRIBUTE_CHANGED_FUNCTION), emberAfFuncArrayThermostatClusterServer, }, \
{ 0xFCC0, (EmberAfAttributeMetadata*)&(generatedAttributes[50]), 13, 16, (CLUSTER_MASK_SERVER), NULL, }, \
{ 0x0000, (EmberAfAttributeMetadata*)&(generatedAttributes[0]), 9, 0, (CLUSTER_MASK_SERVER), NULL, }, \
{ 0x0003, (EmberAfAttributeMetadata*)&(generatedAttributes[9]), 1, 2, (CLUSTER_MASK_CLIENT), NULL, }, \
{ 0x0003, (EmberAfAttributeMetadata*)&(generatedAttributes[10]), 2, 4, (CLUSTER_MASK_SERVER| CLUSTER_MASK_INIT_FUNCTION| CLUSTER_MASK_ATTRIBUTE_CHANGED_FUNCTION), emberAfFuncArrayIdentifyClusterServer, }, \
{ 0x0004, (EmberAfAttributeMetadata*)&(generatedAttributes[12]), 2, 3, (CLUSTER_MASK_SERVER| CLUSTER_MASK_INIT_FUNCTION), emberAfFuncArrayGroupsClusterServer, }, \
{ 0x0005, (EmberAfAttributeMetadata*)&(generatedAttributes[14]), 6, 8, (CLUSTER_MASK_SERVER| CLUSTER_MASK_INIT_FUNCTION), emberAfFuncArrayScenesClusterServer, }, \
{ 0x0006, (EmberAfAttributeMetadata*)&(generatedAttributes[20]), 2, 3, (CLUSTER_MASK_SERVER| CLUSTER_MASK_INIT_FUNCTION| CLUSTER_MASK_ATTRIBUTE_CHANGED_FUNCTION), emberAfFuncArrayOnOffClusterServer, }, \
{ 0x0019, (EmberAfAttributeMetadata*)&(generatedAttributes[22]), 4, 15, (CLUSTER_MASK_CLIENT| CLUSTER_MASK_INIT_FUNCTION| CLUSTER_MASK_DEFAULT_RESPONSE_FUNCTION), emberAfFuncArrayOtaBootloadClusterClient, }, \
{ 0x0202, (EmberAfAttributeMetadata*)&(generatedAttributes[40]), 3, 4, (CLUSTER_MASK_SERVER| CLUSTER_MASK_ATTRIBUTE_CHANGED_FUNCTION), emberAfFuncArrayFanControlClusterServer, }, \
{ 0x0402, (EmberAfAttributeMetadata*)&(generatedAttributes[43]), 4, 8, (CLUSTER_MASK_SERVER), NULL, }, \
{ 0xFCC0, (EmberAfAttributeMetadata*)&(generatedAttributes[50]), 13, 16, (CLUSTER_MASK_SERVER), NULL, }, \
{ 0x0021, (EmberAfAttributeMetadata*)&(generatedAttributes[26]), 6, 27, (CLUSTER_MASK_CLIENT), NULL, }, \
}
...
...
@@ -151,8 +159,8 @@ const EmberAfGenericClusterFunction emberAfFuncArrayFanControlClusterServer[] =
#define GENERATED_ENDPOINT_TYPES { \
{ (EmberAfCluster*)&(generatedClusters[0]), 12, 71 }, \
{ (EmberAfCluster*)&(generatedClusters[12]), 9, 63 }, \
{ (EmberAfCluster*)&(generatedClusters[21]),
2, 12
}, \
{ (EmberAfCluster*)&(generatedClusters[
23
]), 1, 27 }, \
{ (EmberAfCluster*)&(generatedClusters[21]),
10, 63
}, \
{ (EmberAfCluster*)&(generatedClusters[
31
]), 1, 27 }, \
}
...
...
@@ -175,7 +183,7 @@ const EmberAfGenericClusterFunction emberAfFuncArrayFanControlClusterServer[] =
#define ATTRIBUTE_SINGLETONS_SIZE (90)
// Total size of attribute storage
#define ATTRIBUTE_MAX_SIZE
173
#define ATTRIBUTE_MAX_SIZE
224
// Array of endpoints that are supported
#define FIXED_ENDPOINT_ARRAY { 1, 2, 3, 242 }
...
...
@@ -317,8 +325,22 @@ const EmberAfGenericClusterFunction emberAfFuncArrayFanControlClusterServer[] =
{ EMBER_ZCL_REPORTING_DIRECTION_REPORTED, 2, 0xFCC0, 0x100A, CLUSTER_MASK_SERVER, 0x0000, 1, 65534, 0 }, \
{ EMBER_ZCL_REPORTING_DIRECTION_REPORTED, 2, 0xFCC0, 0x100B, CLUSTER_MASK_SERVER, 0x0000, 1, 65534, 0 }, \
{ EMBER_ZCL_REPORTING_DIRECTION_REPORTED, 2, 0xFCC0, 0x100C, CLUSTER_MASK_SERVER, 0x0000, 1, 65534, 0 }, \
{ EMBER_ZCL_REPORTING_DIRECTION_REPORTED, 3, 0x0006, 0x0000, CLUSTER_MASK_SERVER, 0x0000, 1, 0, 0 }, \
{ EMBER_ZCL_REPORTING_DIRECTION_REPORTED, 3, 0x0202, 0x0000, CLUSTER_MASK_SERVER, 0x0000, 1, 0, 0 }, \
{ EMBER_ZCL_REPORTING_DIRECTION_REPORTED, 3, 0x0402, 0x0000, CLUSTER_MASK_SERVER, 0x0000, 1, 0, 0 }, \
{ EMBER_ZCL_REPORTING_DIRECTION_REPORTED, 3, 0xFCC0, 0x1000, CLUSTER_MASK_SERVER, 0x0000, 1, 65534, 0 }, \
{ EMBER_ZCL_REPORTING_DIRECTION_REPORTED, 3, 0xFCC0, 0x1001, CLUSTER_MASK_SERVER, 0x0000, 1, 65534, 0 }, \
{ EMBER_ZCL_REPORTING_DIRECTION_REPORTED, 3, 0xFCC0, 0x1002, CLUSTER_MASK_SERVER, 0x0000, 1, 65534, 0 }, \
{ EMBER_ZCL_REPORTING_DIRECTION_REPORTED, 3, 0xFCC0, 0x1003, CLUSTER_MASK_SERVER, 0x0000, 1, 65534, 0 }, \
{ EMBER_ZCL_REPORTING_DIRECTION_REPORTED, 3, 0xFCC0, 0x1004, CLUSTER_MASK_SERVER, 0x0000, 1, 65534, 0 }, \
{ EMBER_ZCL_REPORTING_DIRECTION_REPORTED, 3, 0xFCC0, 0x1005, CLUSTER_MASK_SERVER, 0x0000, 1, 65534, 0 }, \
{ EMBER_ZCL_REPORTING_DIRECTION_REPORTED, 3, 0xFCC0, 0x1006, CLUSTER_MASK_SERVER, 0x0000, 1, 65534, 0 }, \
{ EMBER_ZCL_REPORTING_DIRECTION_REPORTED, 3, 0xFCC0, 0x1007, CLUSTER_MASK_SERVER, 0x0000, 1, 65534, 0 }, \
{ EMBER_ZCL_REPORTING_DIRECTION_REPORTED, 3, 0xFCC0, 0x1008, CLUSTER_MASK_SERVER, 0x0000, 1, 65534, 0 }, \
{ EMBER_ZCL_REPORTING_DIRECTION_REPORTED, 3, 0xFCC0, 0x1009, CLUSTER_MASK_SERVER, 0x0000, 1, 65534, 0 }, \
{ EMBER_ZCL_REPORTING_DIRECTION_REPORTED, 3, 0xFCC0, 0x100A, CLUSTER_MASK_SERVER, 0x0000, 1, 65534, 0 }, \
{ EMBER_ZCL_REPORTING_DIRECTION_REPORTED, 3, 0xFCC0, 0x100B, CLUSTER_MASK_SERVER, 0x0000, 1, 65534, 0 }, \
{ EMBER_ZCL_REPORTING_DIRECTION_REPORTED, 3, 0xFCC0, 0x100C, CLUSTER_MASK_SERVER, 0x0000, 1, 65534, 0 }, \
}
#define EMBER_AF_GENERATED_REPORTING_CONFIG_DEFAULTS_TABLE_SIZE (
41
)
#define EMBER_AF_GENERATED_REPORTING_CONFIG_DEFAULTS_TABLE_SIZE (
55
)
#endif // SILABS_AF_ENDPOINT_CONFIG
Code/KKAllToOneFloorHeatingMG21SDK665/znet-mfg-token.h
View file @
e7d3c114
...
...
@@ -15,7 +15,7 @@
// Token header for the Reporting plugin.
// Custom MFG token header file
#include "
../../KKAllToOneThermostatPanelMG21SDK665/
00ikonke-app/ikk-mfgtokens.h"
#include "00ikonke-app/ikk-mfgtokens.h"
#ifdef CUSTOM_TOKEN_HEADER
#include CUSTOM_TOKEN_HEADER
...
...
Code/KKAllToOneFloorHeatingMG21SDK665/znet-token.h
View file @
e7d3c114
...
...
@@ -19,7 +19,7 @@
#include "../../../../../../SiliconLabs/SimplicityStudio/v4/developer/sdks/gecko_sdk_suite/v2.6/protocol/zigbee/app/framework/plugin/reporting/reporting-tokens.h"
// Custom token header file
#include "
../../KKAllToOneThermostatPanelMG21SDK665/
00ikonke-app/ikk-tokens.h"
#include "00ikonke-app/ikk-tokens.h"
#ifdef CUSTOM_TOKEN_HEADER
#include CUSTOM_TOKEN_HEADER
...
...
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