Skip to content

Commit 73ece3a

Browse files
silabs-borislrzr
authored andcommitted
uic: zpc: UIC-3499: Avoid publishing unsupported commands as supported
Some attributes are defined making some commands marked as supported, while they don't do anything / are bugged. We are removing the publishing of those attribute for now, and we expect to support these features in the future. (cherry picked from commit 465b6e248708bc0b578907acb234cc0c3a07095d) Forwarded: #11 Signed-off-by: Philippe Coval <philippe.coval@silabs.com>
1 parent ef497b1 commit 73ece3a

File tree

2 files changed

+16
-8
lines changed

2 files changed

+16
-8
lines changed

Diff for: applications/zpc/components/dotdot_mapper/rules/OnOff_cluster_simulation.uam

-8
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,6 @@ def zbON_OFF_CLUSTER_StartUpOnOff 0x00064003
3333
def zbLEVEL_CLUSTER_LEVEL 0x00080000
3434

3535
scope 0 chain_reaction(1) clear_desired(0) {
36-
r'zbON_OFF_CLUSTER_OnTime = if e'zbON_OFF 0 undefined
37-
r'zbON_OFF_CLUSTER_OffWaitTime = if e'zbON_OFF 0 undefined
38-
r'zbON_OFF_CLUSTER_StartUpOnOff = if e'zbON_OFF 0 undefined
39-
40-
r'zbON_OFF_CLUSTER_GlobalSceneControl = if (
41-
( e'zbON_OFF & e'zbLEVEL_CLUSTER_LEVEL ) &
42-
(1==r'zbON_OFF)) 1 undefined
43-
4436
// When simulating, the Reported value always follows the desired value.
4537
// If no desired exist, start with value 1
4638
r'zbON_OFF = if (simulate_on_off) (d'zbON_OFF or 1) undefined

Diff for: applications/zpc/components/zpc_attribute_store/src/zpc_attribute_store.c

+16
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
#include "attribute_store_helper.h"
3030
#include "attribute_store_configuration.h"
3131
#include "unify_dotdot_attribute_store.h"
32+
#include "dotdot_mqtt.h"
3233

3334
#include "sl_log.h"
3435
#define LOG_TAG "zpc_attribute_store"
@@ -185,6 +186,15 @@ static sl_status_t invoke_update_callbacks_in_network()
185186
return refresh;
186187
}
187188

189+
190+
void disable_unsupported_ucl_commands()
191+
{
192+
// OnOff cluster
193+
uic_mqtt_dotdot_on_off_off_with_effect_callback_clear();
194+
uic_mqtt_dotdot_on_off_on_with_recall_global_scene_callback_clear();
195+
uic_mqtt_dotdot_on_off_on_with_timed_off_callback_clear();
196+
}
197+
188198
sl_status_t zpc_attribute_store_init()
189199
{
190200
sl_status_t status = zpc_attribute_store_register_known_attribute_types();
@@ -204,7 +214,13 @@ sl_status_t zpc_attribute_store_init()
204214
// Configure the Unify DotDot Attribute Store component:
205215
unify_dotdot_attribute_store_set_configuration(&zpc_configuration);
206216

217+
// Mark some command as unsupported by ZPC
218+
// We need to do that here because this component is called after the UCL cluster
219+
// Clear the callbacks we don't need for ZPC only
220+
disable_unsupported_ucl_commands();
221+
207222
// Just simulate an update of the whole Attribute Store.
208223
status |= invoke_update_callbacks_in_network();
224+
209225
return status;
210226
}

0 commit comments

Comments
 (0)