Skip to content
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

How can a single device support multiple device types? (CON-1612) #1342

Open
ethan-jy opened this issue Mar 25, 2025 · 3 comments
Open

How can a single device support multiple device types? (CON-1612) #1342

ethan-jy opened this issue Mar 25, 2025 · 3 comments

Comments

@ethan-jy
Copy link

How can a single device support multiple device types?

We are developing an LED driver with four channels, and we need to implement the following device types:

Mode 1: Extended Color Light — For RGBW and TW color tuning.
Mode 2: Dimmable Light — Each of the four channels can be individually controlled for brightness.
Mode 3: Dimmable Light — All four channels output the same duty cycle simultaneously.
As shown in the figure below:

Image

We have two proposed approaches:

Approach 1:
Use a DIP switch to toggle between modes. Both the Extended Color Light (Mode 1) and Dimmable Light (Modes 2/3) would be implemented on Endpoint 1. Users physically switch the DIP to select Mode 1, 2, or 3.

Approach 2:

Endpoint 1: Implements Extended Color Light (Mode 1).
Endpoints 2–5: Implement Mode 2 (individual channel dimming).
Endpoint 6: Implements Mode 3 (synchronized dimming).
Questions:

Are both approaches valid?
Are there alternative solutions?
Which method is more practical or recommended?
Are there relevant examples for reference?
Thank you for your guidance!

@github-actions github-actions bot changed the title How can a single device support multiple device types? How can a single device support multiple device types? (CON-1612) Mar 25, 2025
@Jerry-ESP
Copy link
Contributor

Hi @ethan-jy ,

I understand that:
Mode 1 is an extended color light in one endpoint
Mode 2 is four dimmable light in four endpoints
Mode 3 is a dimmable light in one endpoint

So for the approach 1, one endpoint is not enough, you can try this method: when device power on, you can read the dip switch state first, the judge the mode, if it is mode one, just create and extended color light endpoint, if mode two, create four dimmable light endpoints, if mode 3, create one dimmable light endpoint.

For approach 2, it is available, but when the device pairing into a ecosystem, for example Apple home, it will show 6 devices in the App, no matter what is the current mode.

@ethan-jy
Copy link
Author

Hi @ethan-jy ,

I understand that: Mode 1 is an extended color light in one endpoint Mode 2 is four dimmable light in four endpoints Mode 3 is a dimmable light in one endpoint

So for the approach 1, one endpoint is not enough, you can try this method: when device power on, you can read the dip switch state first, the judge the mode, if it is mode one, just create and extended color light endpoint, if mode two, create four dimmable light endpoints, if mode 3, create one dimmable light endpoint.

For approach 2, it is available, but when the device pairing into a ecosystem, for example Apple home, it will show 6 devices in the App, no matter what is the current mode.

Thank you very much.
Using a DIP switch to handle this seems like a better choice.

For a device of type "Extended Color Light," if the ColorMode is set to color temperature, there are two scenarios:

Mode 1: Two separate color temperature controls (dual-channel).
Mode 2: Single color temperature control.

Image

Questions:

When the user sets ColorMode to color temperature via a command, how should I handle the mode selection (Mode 1 vs. Mode 2) using a DIP switch?
For Mode 1, should two endpoints be used? Would the mobile app display two endpoints? Would this require the user to re-pair the device?
After the user switches ColorMode via a command, will the ColorMode attribute value be lost if the device loses power?

@Jerry-ESP
Copy link
Contributor

For extended color light, the color mode was switch by command, there are 3 color modes as below:

Image

I think you don't need use the dip switch to switch the color mode.

And the color mode will stay after device power cycle, because its value will be store in the flash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants