-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unbind do not stop communication (TZ-999) #383
Comments
You are sending commands using a network broadcast address, which is irrelevant to bindings. Binding enables the source device to send APS data without DstAddress and DstEndpoint (i.g. |
thanks for quick reply @lpy4105 , I found that by printing the binding table, where all entries were removed after calling |
I guess you want to read "long" string attribute by |
I am using Arduino IDE not sure if the SDK got updated there. but I will check it. one more thing I need a report command not read only. I will implement and check if it worked. one question: does this mean |
Report should also work in the latest SDK.
"custom_cmds" you are using is a concept in ZCL over the AF and APS layer. The command is sent via APS data service which supports 4 kind of DstAddrMode. Using the network address is just one of them. |
@lpy4105 I tried the write command from the coordinator to end device and it works just fine, however it does not go in the other direction ( from End device to Coordinator) not sure why?! I tried the report from the end point as well and it is not recognized be the coordinator at all not sure why?! @lpy4105 could you please give example of how to use Much thanks @lpy4105 <3 |
Conceptually, the ZCL communications are using server/client model, and don't care about the "device role" (i.e. ZC/ZR/ZED).
You can refer to the HA_thermostat and HA_temperature_sensor examples. Here is the code that send command via Bindings: esp-zigbee-sdk/examples/esp_zigbee_HA_sample/HA_thermostat/main/esp_zb_thermostat.c Lines 60 to 64 in 81ade24
|
So you mean I have to declare a 2 cluster in each side (client and server) so It will be as follows: client <-----------WRT--------- Server Last question, the current implementation suits my application very well, So is there a way to just remove the device from the network instead of trying to replicate everything using the APS commands? Much thanks for your responses. |
Generally speaking, YES.
I think you could try |
I implement it and it works however it seems that it remove the coordinator itself from the network, since when I initiated from the coordinator side while 2 end devices connected none of the devices could communicate. anyhow I found way to implemented, however I am wondering if there is way to send backpack info with the response to any command. for example for write_cmd() the response I receive is 1082262485. which is obtained from last point, for the documentation I could not find something which is very detailed currently I am using : https://zigbeealliance.org/wp-content/uploads/2019/11/docs-05-3474-21-0csg-zigbee-specification.pdf |
esp-zigbee-sdk/components/esp-zigbee-lib/include/zcl/esp_zigbee_zcl_command.h Lines 2016 to 2029 in 81ade24
Or online API reference: https://docs.espressif.com/projects/esp-zigbee-sdk/en/latest/esp32h2/api-reference/zcl/esp_zigbee_zcl_command.html#_CPPv437esp_zb_zcl_write_attr_resp_variable_s |
I am aware about them, but I am not sure how to initiate the response. Shall it go inside the handler for the write response?
my issue I could not find the command, and will it override the automated one. and much thanks for your patience and responses. |
Ahh, the SDK has done that for you, so you don't need to handle them yourself neither initiate the responses. The "write attribute command" and the response are standardized and you couldn't override them. |
Okay, That make sense and meet my understanding, so much thanks, and I will look for work around to implement my application. |
Question
How to stop communication between two devices (coordinator and end device) ?
Additional context.
I am using a modified version of this code implementation in #202, once the end device join the network it can communicate before even binding process. what I am trying to achieve is reading a certain attribute from end device if it meets the requirements it will be kept in the network, otherwise it will be unbinded.
some issue I refered to as well #318 and
to check the issue :
1- I stopped the binding -> still communicate.
2- I implement unbind after binding -> still communicate.
I want to make sure if there is an easier way to implement this, or what I am doing wrong so the communication still on gaining.
coordinator
end device
send message implementation on coordinator
'static void esp_zb_buttons_handler(switch_func_pair_t *button_func_pair) {
if (button_func_pair->func == SWITCH_ONOFF_TOGGLE_CONTROL) {
}
}'
send message implementation on end device
'// done converting to Arduino code
static void esp_zb_buttons_handler(switch_func_pair_t *button_func_pair, char *input_msg) {
if (button_func_pair->func == SWITCH_ONOFF_TOGGLE_CONTROL) {
}
}'
The text was updated successfully, but these errors were encountered: