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

DDF for iluminize Multi 5 (4A) #7977

Merged

Conversation

bluemoehre
Copy link
Contributor

@bluemoehre bluemoehre commented Oct 16, 2024

Controller by iluminize, which can emulate multiple controllers (Dimmer, CCT, RGBW, RGBCCT).

Will solve #7985

All Screenshots

Dimmer

Bildschirmfoto 2024-10-16 um 23 34 06 Bildschirmfoto 2024-10-17 um 16 02 19 Bildschirmfoto 2024-10-16 um 23 34 24 Bildschirmfoto 2024-10-16 um 23 34 38 Bildschirmfoto 2024-10-16 um 23 34 45

CCT

Bildschirmfoto 2024-10-16 um 23 27 38 Bildschirmfoto 2024-10-16 um 23 27 42 Bildschirmfoto 2024-10-16 um 23 28 42 Bildschirmfoto 2024-10-16 um 23 28 51 Bildschirmfoto 2024-10-16 um 23 29 14 Bildschirmfoto 2024-10-16 um 23 29 23 Bildschirmfoto 2024-10-16 um 23 29 34

RGBW

Bildschirmfoto 2024-10-16 um 22 54 23 Bildschirmfoto 2024-10-16 um 22 54 37 Bildschirmfoto 2024-10-16 um 22 54 48 Bildschirmfoto 2024-10-16 um 22 55 01 Bildschirmfoto 2024-10-16 um 22 55 12 Bildschirmfoto 2024-10-16 um 22 55 23

RGBWCCT

Bildschirmfoto 2024-10-16 um 22 59 04 Bildschirmfoto 2024-10-16 um 22 59 13 Bildschirmfoto 2024-10-16 um 22 59 27 Bildschirmfoto 2024-10-16 um 22 59 36 Bildschirmfoto 2024-10-16 um 23 00 19 Bildschirmfoto 2024-10-16 um 23 00 33 Bildschirmfoto 2024-10-16 um 23 00 47

Copy link
Contributor

github-actions bot commented Oct 16, 2024

Hey @bluemoehre, thanks for your pull request!

Tip

Modified bundles can be downloaded here.
Relative expire date

DDB changes

Modified

  • iluminize/led_controller_multi_5.dim.json : LED Controller Multi 5 (DIM mode) ✔️

  • iluminize/led_controller_multi_5.rgbw.json : LED Controller Multi 5 (RGBW mode) ✔️

  • iluminize/led_controller_multi_5.cct.json : LED Controller Multi 5 (CCT mode) ✔️

  • iluminize/led_controller_multi_5.rgbcct.json : LED Controller Multi 5 (RGBCCT mode) ✔️

Validation

Tip

Everything is fine !

🕣 Updated for commit 1adcf5d

@bluemoehre
Copy link
Contributor Author

bluemoehre commented Oct 16, 2024

The device is missing some items because a device with "state/x" or "state/y" need the corresponding cap/color/xy/{red,green,blue}/{x,y} items

That cluster/attribute 0x0300 / 0x003a is not present. How to deal with this conflict?

@ebaauw
Copy link
Collaborator

ebaauw commented Oct 16, 2024

Just define the capabilities with static values.

Copy link
Collaborator

@ebaauw ebaauw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You didn’t post screenshots of the Basic cluster, so I don’t know what ZCL version the device supports, but I would expect it to support attribute reporting.

Did you re-read the endpoints and Simple Descriptor each time after changing the mode? It might not make sense to expose an RGBW light as Extended Color Light. The colour temperatures will be ugly, mixing RGB and W.

devices/iluminize/led_controller_multi_5.cct.json Outdated Show resolved Hide resolved
devices/iluminize/led_controller_multi_5.cct.json Outdated Show resolved Hide resolved
devices/iluminize/led_controller_multi_5.cct.json Outdated Show resolved Hide resolved
"status": "Gold",
"subdevices": [
{
"type": "$TYPE_COLOR_TEMPERATURE_LIGHT",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That type should only expose ct; not xy nor hue/sat nor effect (for colorloop).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I checked this again, but the controller does provide these as shown in the screenshot.

In terms of colorspaces it is absolutely possible to convert CCT into HUE and XY. So maybe it is just the first we see doing it?

For the effects I wonder anyhow why there shouldn't be some on dimmable & CCT controllers. Candle / fire flicker would be possible =)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you expose xy, the type should be Extended Color Light, not Color Temperature Light. However, API clients will expect the light to display colours when you're exposing xy. I don't see any additional value in exposing xy on a CCT light, as it wouldn't enable anything that isn't already enabled through ct. I do see issues with sending the wrong message that the light would expose colours.

Yes, in theory it's possible to express ct value as xy (but, obviously not the other way around). In practice setting ct will drive the WW/CW channels, whereas setting xy will drive the RGB channels, resulting in a different experience.

The only standard effect is colorloop, which is only available on lights supporting colors through hs (as it loops hue values). Hue-specific effects like candle are exposed over the manufacturer-specific 0xFC03 cluster, which this controller doesn't implement.

devices/iluminize/led_controller_multi_5.cct.json Outdated Show resolved Hide resolved
"static": 0
},
{
"name": "config/bri/couple_ct",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does the controller support this? I’d default it to false. Also, I would expect it to support execute_if_off as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you could tell me the cluster + attribute address I will re-check.

BTW: I find it very hard with the DDF editor to match against the controller. My workflow is always drop everything in, then compare endpoints if active. It takes too long and easily causes to miss something. Is there a better way to match the written path vs available clusters/addresses?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It’s a bit in the Options attribute, as is execute_if_off. In the Level Control cluster, hence config/bri. The Color Control cluster has the same attribute, but only with the execute_if_off bit. These are documented (briefly) in the item’s JSON file.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I double checked, but it is as displayed in the screenshots:

Level Control Options bitmap is: 0x01
Color Control Options bitmap is: 0x01

do I need to adjust something?

Copy link
Collaborator

@ebaauw ebaauw Nov 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does the light actually change brightness when off when the Execute If Off bit in the Level Control cluster is set, and colour (temperature) when the but in Color Control is set?

Does the light actually change colour temperature when changing brightness while the Couple Color Temp to Level bit is set?

"default": true
},
{
"name": "config/color/xy/startup_x",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are only supported on Hue lights.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(… same as below)

"default": "0xffff"
},
{
"name": "config/color/xy/startup_y",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are only supported on Hue lights.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I already talked to the manufacturer and they told me, they have been adding that on purpose to fulfill some Apple requirements. Else it wont be compatible with Home Kit. Anyhow, if it won't cause problems, I can remove it.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added what? HomeKit doesn’t have poweron settings, and certainly not for colour. I’ve seen some vendors that (illegally) expose the Hue Manufacturer Code 0x100B in the Node Descriptor (also missing from the screenshots), so the Hue bridge exposes them to HomeKit. In that case, they might expose the Hue-specific attributes for poweron xy as well. However, they are not in the screenshots? Do you see them in the GUI? And do they work?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

Yep, that's why I talked to them … They said they could provide a “real” firmware without hacks, but the conversation fizzled out - didn't get a reply anymore.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So they (illegally) pretend to be a Hue light, so the Hue bridge exposes it to HomeKit. Do they implement the manufacturer-specific versions of 0x0003 and 0x0004 (Hue Startup Current X and Hue Startup Current Y)? If you set these, and power cycle the light, does it come up with the specified colour?

@bluemoehre
Copy link
Contributor Author

@ebaauw Seems like my idea to copy from another DDF was not the best. Since we have the bot checking DDF files. Are you able to add these hints/rules to it? Then we can run it vs all existing files and do a clean up? This way the next person won't trap into the same problems.

@bluemoehre
Copy link
Contributor Author

bluemoehre commented Oct 17, 2024

You didn’t post screenshots of the Basic cluster, so I don’t know what ZCL version the device supports, but I would expect it to support attribute reporting.

I already mounted it behind a wall ... but I gonna try to upload these as well.

Did you re-read the endpoints and Simple Descriptor each time after changing the mode? It might not make sense to expose an RGBW light as Extended Color Light. The colour temperatures will be ugly, mixing RGB and W.

Since re-reading didn't work all time, causing deCONZ to show old stuff, I deleted the node from the network and then hard reset the controller each time.

@bluemoehre
Copy link
Contributor Author

bluemoehre commented Oct 17, 2024

added Basic cluster for Dimmer Mode (2nd image in PR description)

@ebaauw
Copy link
Collaborator

ebaauw commented Oct 17, 2024

@Zehir maintains the DDF validator; I haven’t looked into its internals. It does check for mandatory items, but I don’t think it currently checks for superfluous or deprecated items. Of course, the validator cannot check against the actual device features.

I often copy an existing DDF as a start to create new DDF, but I do check the validity and appropriateness of each item in the GUI. There’s also some hidden (from API clients) capabilities that change the API behaviour, like using Move to Level (with On/Off) or Off with Effect. You need to check in the GUI if the device supports these. There’s a brief description in each item’s JSON file (under devices/generic/items/*_item.json) but there’s definitely room to improve the documentation. The use of the red, green, and blue points, to specify what colors the light can display, is best explained in the Hue API documentation.

@ebaauw
Copy link
Collaborator

ebaauw commented Oct 17, 2024

added Basic cluster for Dimmer Mode (2nd image in PR description

ZCL Version 3 is Zigbee 3 and should support attribute reporting.

@bluemoehre
Copy link
Contributor Author

ZCL Version 3 is Zigbee 3 and should support attribute reporting.

So we need to additionally add some reporting config everywhere?

Copy link
Collaborator

@SwoopX SwoopX left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi and thank you for your contribution 👍

We would like to ask you to create a new device support request (new issue -> device support) in this repository and to link it against your pull request. Please also make sure one device support PR only covers one device. This fosters consistency, allowing everybody to find device related information at the very same place and helps expediting searches if required. Furthermore, it enables the devs to check and verify if a DDF is created correctly or if any changes/optimizations are necessary.

Thank you very much for your support!

@bluemoehre
Copy link
Contributor Author

We would like to ask you to create a new device support request (new issue -> device support) in this repository and to link it against your pull request.

done

@SwoopX
Copy link
Collaborator

SwoopX commented Oct 20, 2024

Thanks a lot 👍

@SwoopX SwoopX linked an issue Oct 20, 2024 that may be closed by this pull request
1 task
@manup
Copy link
Member

manup commented Nov 4, 2024

@ebaauw is the PR ready for merging?

@manup manup added this to the v2.29.1-beta milestone Nov 4, 2024
@ebaauw
Copy link
Collaborator

ebaauw commented Nov 4, 2024

I suppose so. I don't have the device so I cannot validate the DDF.

@bluemoehre
Copy link
Contributor Author

@ebaauw it would help (me) to understand the status of an issue, if you could resolve all started conversations, where you think it now looks good. This prevents to miss something we had been discussing without having a solution. (Additionally I am not sure if someone could merge with unsolved discussions.)

I will also check myself everything here and in other tickets …

@ebaauw
Copy link
Collaborator

ebaauw commented Nov 4, 2024

Since the DDF (by design) won't affect any other devices, merging an incomplete or even wrong DDF would cause no harm, other than the device not working as expected.

The idea of a DDF, particularly of the capabilities items, is to indicate what actually works for this device, not just what attributes it advertises. Checking this requires trying out the features in the GUI, and visually checking the light's reaction. Support for attribute reporting can be checked by the GUI showing the changed values automatically (without having to re-read the attributes), through the deCONZ log, or using a Zigbee sniffer.

So for example, if the DDF advertises the device supports Execute If Off, the deCONZ REST API assumes it does, and will happily send a Move to Level while the device is off, and update state/bri accordingly (rather than raising an API error that the light is off). If the light subsequently is turned on, but doesn't reflect the changed brightness it doesn't live up to the promise the DDF makes to API clients.

@manup manup merged commit 5bf4142 into dresden-elektronik:master Nov 8, 2024
1 check passed
Copy link
Contributor

github-actions bot commented Nov 8, 2024

This pull request is now merged. The new DDB files have been uploaded to the store.

DDB Files

Modified

  • iluminize/led_controller_multi_5.dim.json : LED Controller Multi 5 (DIM mode) : with hash (e808f2d67a)

  • iluminize/led_controller_multi_5.cct.json : LED Controller Multi 5 (CCT mode) : with hash (ce87fb2f2a)

  • iluminize/led_controller_multi_5.rgbcct.json : LED Controller Multi 5 (RGBCCT mode) : with hash (5d806336f5)

  • iluminize/led_controller_multi_5.rgbw.json : LED Controller Multi 5 (RGBW mode) : with hash (0603a8231d)

🕣 Updated for commit 5bf4142

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

Successfully merging this pull request may close these issues.

iluminize Multi 5 (4A)
4 participants