Skip to content

DDF for Tradfri bulb GU10 CWS 345lm #7320

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

Merged

Conversation

bluemoehre
Copy link
Contributor

@bluemoehre bluemoehre commented Oct 26, 2023

First time adding DDF by myself - I hope everything is fine =)

File is based on TRADFRI bulb E27 CWS 806lm since this bulb reports same OTAU image and looks identical in deCONZ.
So I just changed product & model.

Also added Device Request #7319 (dunno if that was required, but it helps with double checking)

@bluemoehre bluemoehre changed the title Add DDF for Tradfri bulb GU10 CWS 345lm #7319 Add DDF for Tradfri bulb GU10 CWS 345lm Oct 26, 2023
@bluemoehre bluemoehre changed the title Add DDF for Tradfri bulb GU10 CWS 345lm DDF for Tradfri bulb GU10 CWS 345lm Oct 26, 2023
@ebaauw
Copy link
Collaborator

ebaauw commented Oct 26, 2023

File is based on TRADFRI bulb E27 CWS 806lm since this bulb reports same OTAU image and looks identical in deCONZ.

In that case, I would simply add the modelid to that DDF, cf. what I did for Hue lights. Of course, we'd need a better filename for the DDF.

@bluemoehre
Copy link
Contributor Author

Of course, we'd need a better filename for the DDF.

Actually I was irritated a lot by the different DDF filenames and the mingling of 1:1 and 1:n configs. It's not very intuitive to find out if a device is already configured or not.
I can imagine that a base that can be extended, such as "Tradfri color light", "Tradfri white light" and "Tradfri controller", could reduce duplication, but on the other hand it increases complexity.
If it is guaranteed that the functionality is the same on all devices using the same image, we could group them according to the image ID.

For now I would go ahead and just keep it simple with a 1:1, due to its very clear, is easy to fix and all the redundancy should not be a huge deal with search/replace in the IDE.
This also corresponds to the docs:

The current implementation uses one directory per vendor and one file per product

But it is up to you guys what u prefer. Of course, I can also change the PR and add the model into the other file.

BTW:
Is there a way to test these changes without compiling the whole thing? I didn't find any documentation about the full workflow. Maybe I missed something?

@ebaauw
Copy link
Collaborator

ebaauw commented Oct 26, 2023

Is there a way to test these changes without compiling the whole thing? I didn't find any documentation about the full workflow. Maybe I missed something?

Just copy the DDF to /usr/share/deCONZ/devices, or wherever deCONZ installs these, and restart deCONZ. Only new items in the API require changes in the C++ code and re-compilation.

@bluemoehre
Copy link
Contributor Author

I added the JSON and now I can control the bulb completely via Phoscon - nice! So I would say DDF works.

Just let me know if I should change this PR to merge the DDFs into a single file.

@bluemoehre bluemoehre mentioned this pull request Nov 20, 2023
1 task
@manup
Copy link
Member

manup commented Nov 28, 2023

In that case, I would simply add the modelid to that DDF, cf. what I did for Hue lights. Of course, we'd need a better filename for the DDF.

Hi yes merging the manufacturer name / model id combo into the existing DDF should be fine.

@bluemoehre
Copy link
Contributor Author

Hey @manup ,

sure I can merge the files + rename it to be more intuitive. But can I also create an array for the fields product (name) & description ? I was reading a while through everything and noticed we do not fulfil the project standards from the docs regarding those fields. Please correct me if I am wrong.

@manup
Copy link
Member

manup commented Nov 29, 2023

The arrays are only needed (and supported) for modelid and manufacturername.
The product and descriptions fields are merely for the generated documentation to show some human readable text :)

@bluemoehre
Copy link
Contributor Author

Okay - I thought it is that column showing the human readable name...

Screenshot 2023-11-30 175541

... but when I checked the Philips light bulbs, I found that it is actually the model ID in the product name column 🤔.

This is confusing and inconsistend vs. the detail page and should to be unified in one or another way.

I would recommend to show the human readable product name in the listing and the human readable product name + model id in the details page. But this is something that is related to Phoscon and is just an ad hoc idea without deeper checks.

@bluemoehre
Copy link
Contributor Author

Files are merged & renamed.

@manup manup added this to the v2.25.0-beta milestone Dec 4, 2023
@manup manup merged commit 93c6247 into dresden-elektronik:master Dec 4, 2023
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.

3 participants