Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Decouple relay and multiple press action for zigbee light switch? #11743

Answered by P-R-O-C-H-Y
ferbulous asked this question in Q&A
Discussion options

Hi, I’m wondering if these features are supported?
Basically I need to detach a relay from the button and bind the switch to a zigbee light.
This feature is pretty common with aqara switches.
Is there some documentation/example I could refer to get this working?

You must be logged in to vote

Hi @ferbulous,

Yes, these features are supported!

The Arduino-ESP32 Zigbee library does support the functionality you're looking for - binding switches to Zigbee lights and effectively "detaching" the relay from the button. This is exactly what smart switches like Aqara do.

Key Features Available:

  1. Switch-to-Light Binding
    The library provides comprehensive binding capabilities:

    • Automatic binding: Switches can automatically discover and bind to lights
    • Manual binding: You can manually configure which lights the switch controls
    • Multiple binding: One switch can control multiple lights simultaneously
  2. Manual Binding Mode (Key for your use case)
    The library includes a setManualBinding(true)...

Replies: 1 comment

Comment options

Hi @ferbulous,

Yes, these features are supported!

The Arduino-ESP32 Zigbee library does support the functionality you're looking for - binding switches to Zigbee lights and effectively "detaching" the relay from the button. This is exactly what smart switches like Aqara do.

Key Features Available:

  1. Switch-to-Light Binding
    The library provides comprehensive binding capabilities:

    • Automatic binding: Switches can automatically discover and bind to lights
    • Manual binding: You can manually configure which lights the switch controls
    • Multiple binding: One switch can control multiple lights simultaneously
  2. Manual Binding Mode (Key for your use case)
    The library includes a setManualBinding(true) function that allows you to:

    • Disable automatic binding
    • Manually configure which lights the switch controls
    • Store light configurations in NVS (Non-Volatile Storage) so they persist after power loss

Example you can look into is Zigbee_On_Off_MultiSwitch
This example demonstrates exactly what you need:

  • Controls up to 3 different lights independently
  • Uses manual binding mode
  • Stores light configurations in NVS
  • Provides serial commands to configure lights by endpoint and IEEE address
You must be logged in to vote
0 replies
Answer selected by P-R-O-C-H-Y
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
Area: Zigbee Issues and Feature Request about Zigbee

AltStyle によって変換されたページ (->オリジナル) /