Zigbee example door lock open-close

Sanyidev
Posts: 7
Joined: Mon Sep 18, 2023 12:38 pm

Zigbee example door lock open-close

Postby Sanyidev » Tue Oct 10, 2023 1:54 pm

Hello There,

This might be an easy question - I am just trying to make examples work. The HA_ light and switch examples are fine.
Then I compiled and flashed esp_zigbee_customized_devices/customized_server what is a light implementing controller. I would like that to be a door controller. I have a couple of door sensors and I would like to catch when those send an open or a close Zigbee message.

My question is: how to modify this example to make it work? I guess that a callback needs to be added, just not sure what or where to find it in the documentation or in an example.

At the moment I see that the connection is established after network steering if I push the button for pairing on any sensor:
I (1551) ESP_HA_ON_OFF_LIGHT: Network steering started
I (65621) ESP_HA_ON_OFF_LIGHT: ZDO signal: NWK Device Associated (0x12), status: ESP_OK
I (65831) ESP_HA_ON_OFF_LIGHT: ZDO signal: ZDO Device Update (0x30), status: ESP_OK
I (66351) ESP_HA_ON_OFF_LIGHT: New device commissioned or rejoined (short: 0x519f)
I (67781) ESP_HA_ON_OFF_LIGHT: ZDO signal: ZDO Device Authorized (0x2f), status: ESP_OK
I (67861) ESP_HA_ON_OFF_LIGHT: ZDO signal: NWK Permit Join (0x36), status: ESP_OK

Thank you

bidrohini
Posts: 202
Joined: Thu Oct 27, 2022 12:55 pm

Re: Zigbee example door lock open-close

Postby bidrohini » Tue Oct 10, 2023 3:49 pm

Have you checked this document fully?
https://docs.espressif.com/projects/esp ... _lock.html

Sanyidev
Posts: 7
Joined: Mon Sep 18, 2023 12:38 pm

Re: Zigbee example door lock open-close

Postby Sanyidev » Wed Oct 11, 2023 4:28 am

Thank you for that.

My question is a bit different: where / how should a callback be added? I just look for a way to do a printf when anything is sent by the door sensor.

Who is online

Users browsing this forum: MicroController and 201 guests