Trädfri lights end up as RGBW group in Domoticz

Xiaomi, Ikea TRÅDFRI, Philips Hue and more.

Moderator: leecollings

Post Reply
Plantje
Posts: 451
Joined: Friday 16 October 2015 7:58
Target OS: Windows
Domoticz version:
Contact:

Trädfri lights end up as RGBW group in Domoticz

Post by Plantje »

I have added some Zigbee lights in Phoscon. After looking for those lights I notice that the lights are correctly found, but the group in Phoscon is interpreted as a Color Switch with subtype RGBWWZ. However, the lights are dimmable, but it is not possible to change the color or tint.
How can I make sure that a group in Phoscon is correctly interpreted in Domoticz?

Or can I group several Zigbee lights into one dimmer switch in Domoticz?
Thorgal789
Posts: 849
Joined: Wednesday 15 August 2018 14:38
Target OS: -
Domoticz version:
Contact:

Re: Trädfri lights end up as RGBW group in Domoticz

Post by Thorgal789 »

All light group are reconized as RGBWWZ.
The problem is in the same group, you can add a dimmable light, a RGB bulb and a plug, not possible to make a group "by type of light", so group created have all options possibles, you just need to use only the supported command by your group or devices that don't support it just no react.

And no, not possible using native domoticz feature (without script) to group dimmable device (or I have never see it)
Plantje
Posts: 451
Joined: Friday 16 October 2015 7:58
Target OS: Windows
Domoticz version:
Contact:

Re: Trädfri lights end up as RGBW group in Domoticz

Post by Plantje »

Yeah but no, but yeah but no....
I think I am not really getting it perhaps. I don't have any RGB bulbs, WW bulbs, just the dimmable bulbs. As far as I can see in Phoscon the "correct" group is created: a group of bulbs that I can dim and switch on and off. I wouldn't know what a group of RGB or WW bulbs in Phoscon would look like, but I can only assume they look different. Wouldn't it be possible to provide a parameter to Domoticz indicating the type of group?
Or the other way around: if I KNOW that a group consists of dimmable bulbs only, can I then not set that group as a dimmable only group? Is there some sort of parameter or otherwise setting in a file that I can update to change the type of group?
Thorgal789
Posts: 849
Joined: Wednesday 15 August 2018 14:38
Target OS: -
Domoticz version:
Contact:

Re: Trädfri lights end up as RGBW group in Domoticz

Post by Thorgal789 »

There is somes issue with that on phoscon too ^^.

It s not possible to know wich one command can work for all device in a group at 100%, it s easy to make phsocon display a bad one too.
And even I make the correct widget (just dimmable), imagine if one day later you add a plug ?

And It's possible for exemple making a group with dimmable light + 1 plug, you can use the on/off for all device, and control the level only for bulb.

It s realy a problem for you having too much command on a device than the device can support ?

I can make like phoscon, and try to reconize the light in the group but it s realy not reliable (already tried at start). But there is perhaps an easier solution (and fiable at 100%) :
I can create group according to group name, something complicated enought to not be used by accident, if you have an idea for exemple

"bablabla corridor" > full command
"-DIM- blabla corridor" > only dimmable
Plantje
Posts: 451
Joined: Friday 16 October 2015 7:58
Target OS: Windows
Domoticz version:
Contact:

Re: Trädfri lights end up as RGBW group in Domoticz

Post by Plantje »

Thorgal789 wrote: Monday 28 September 2020 22:10
It s realy a problem for you having too much command on a device than the device can support ?
No, it is not an issue. Was just wondering what the reasoning is for doing it like it is done now. And basically if you enable all, you cannot miss anything. That's right.
Thanks again for your quick response!
Plantje
Posts: 451
Joined: Friday 16 October 2015 7:58
Target OS: Windows
Domoticz version:
Contact:

Re: Trädfri lights end up as RGBW group in Domoticz

Post by Plantje »

Didn't really take the time to respond yesterday
Thorgal789 wrote: Monday 28 September 2020 22:10 There is somes issue with that on phoscon too ^^.
I don't use Phoscon a lot.... actually only to add new Zigbee devices so I can use them in Domoticz :) But every time when I do use it, it seems to be working fine.
Thorgal789 wrote: Monday 28 September 2020 22:10 It s not possible to know wich one command can work for all device in a group at 100%, it s easy to make phsocon display a bad one too.
And even I make the correct widget (just dimmable), imagine if one day later you add a plug ?
In that case, I would need to review the group that has been created or create a new one. I get your point, but I feel that in case I add a new Zigbee device it is my "responsibility" that things in Phoscon are correct, so that it can be synced with Domoticz. Phoscon is what I use to configure all Zigbee devices, Domoticz is what I use to control (among other) Zigbee devices.
Thorgal789 wrote: Monday 28 September 2020 22:10 And It's possible for exemple making a group with dimmable light + 1 plug, you can use the on/off for all device, and control the level only for bulb.
Does that work well? When I tried changing the tint for the current group, the lights just switched off. Only after setting it back to the standard tint and then switching them on again, I had control again.
Thorgal789 wrote: Monday 28 September 2020 22:10 It s realy a problem for you having too much command on a device than the device can support ?
As mentioned: no it is not a problem at all! What do you call that? I am just splitting hairs here... I am trying to improve my complete setup bit by bit. :)
Thorgal789 wrote: Monday 28 September 2020 22:10 I can make like phoscon, and try to reconize the light in the group but it s realy not reliable (already tried at start). But there is perhaps an easier solution (and fiable at 100%) :
I can create group according to group name, something complicated enought to not be used by accident, if you have an idea for exemple

"bablabla corridor" > full command
"-DIM- blabla corridor" > only dimmable
Would be worth a shot perhaps...

Looking at this makes me think that in Phoscon a difference is made between a group where you can control intensity only, intensity and saturation or intensity, saturation and colour:
thumbnail_969306_400x320.jpg
thumbnail_969306_400x320.jpg (10.2 KiB) Viewed 848 times
This is just my thinking.... wouldn't it be as easy as "reading" those parameters from Phoscon and depending on the parameters of the group created in Phoscon present the "device" to Domoticz as intensity only, intensity and saturation or intensity, saturation and colour?

Again: I really appreciate everything you've done to make this work! Just some suggestions on how to get it even better :)
Thorgal789
Posts: 849
Joined: Wednesday 15 August 2018 14:38
Target OS: -
Domoticz version:
Contact:

Re: Trädfri lights end up as RGBW group in Domoticz

Post by Thorgal789 »

Yep I know it s possible looking the group JSON, and it s easy (I think looking the "colormode" is enought) but not reliable, I have made a test 5 mn ago, I have take a RGB bulb > RGB group, add a simple dimmable bulb in the same group > still rgb group with color control on phoscon too.
Plantje
Posts: 451
Joined: Friday 16 October 2015 7:58
Target OS: Windows
Domoticz version:
Contact:

Re: Trädfri lights end up as RGBW group in Domoticz

Post by Plantje »

Yeah, I can imagine that since it is a mixed group at that time
Thorgal789
Posts: 849
Joined: Wednesday 15 August 2018 14:38
Target OS: -
Domoticz version:
Contact:

Re: Trädfri lights end up as RGBW group in Domoticz

Post by Thorgal789 »

But if you want, my second solution is still possible (and fast, only 4/5 lines to edit) just give me the sufix or prefix you want to add in the name ?
Plantje
Posts: 451
Joined: Friday 16 October 2015 7:58
Target OS: Windows
Domoticz version:
Contact:

Re: Trädfri lights end up as RGBW group in Domoticz

Post by Plantje »

_dim as suffix would be nice.

Let's see!

Please let me know what I need to do to test it.
Thorgal789
Posts: 849
Joined: Wednesday 15 August 2018 14:38
Target OS: -
Domoticz version:
Contact:

Re: Trädfri lights end up as RGBW group in Domoticz

Post by Thorgal789 »

Done.

To test it, you can edit the file yourself (5 lines to add) but you will have an error the next time you will use "git pull" (can be solved ofc)
Or you can do

Code: Select all

cd Domoticz-deCONZ
git branch beta
git pull
git branch master
Switch branch/update code/return master branch for next time.

Then add _dim as suffix to your group, delete the RGBWW widget and restart the plugin (Hardware/deconz/update)
Plantje
Posts: 451
Joined: Friday 16 October 2015 7:58
Target OS: Windows
Domoticz version:
Contact:

Re: Trädfri lights end up as RGBW group in Domoticz

Post by Plantje »

Let me test that tonight after bring the kids to bed.
Which file has been changed? I am using Windows, so mostly I just go to Github and pull all files manually.
Or I just get all files from this branch and I should be fine :)
Thorgal789
Posts: 849
Joined: Wednesday 15 August 2018 14:38
Target OS: -
Domoticz version:
Contact:

Re: Trädfri lights end up as RGBW group in Domoticz

Post by Thorgal789 »

Plantje
Posts: 451
Joined: Friday 16 October 2015 7:58
Target OS: Windows
Domoticz version:
Contact:

Re: Trädfri lights end up as RGBW group in Domoticz

Post by Plantje »

Hmmm... just tested it, but I must be doing something wrong...
Pulled the plugin.py from Github, put it in C:\Program Files\Domoticz\plugins\deCONZ.
Then in Phoscon I created a new group "Tuin_dim" and in Domoticz I restarted the plugin.

Now, I do see the new group with the added _dim in Domoticz, but it is still recognized as RGBWWZ. Should I have copy pasted al files?

Ok, I have edited the plugin.py myself and set the code in the else to be
kwarg['Type'] = 244
kwarg['Subtype'] = 62
kwarg['Switchtype'] = 7
as well. Now it does work.

For now, I will leave it as such.

Currently there is a different project coming up again. I have a Beelink Z83 that I want to use as my new Domoticz server. I got it up and running, but the only thing lacking is 5Ghz network on the WiFi adapter. Do I need it? No, for sure not! Do I want it? Yes of course! :)
Thorgal789
Posts: 849
Joined: Wednesday 15 August 2018 14:38
Target OS: -
Domoticz version:
Contact:

Re: Trädfri lights end up as RGBW group in Domoticz

Post by Thorgal789 »

No sure you need it ! Can it use the wifi from your network wifi ?

Domoticz itself don't need a big data transmition (no video ?), you have a better range with 2.4Ghz.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest