deconz-rest-plugin icon indicating copy to clipboard operation
deconz-rest-plugin copied to clipboard

Info for FLS-PP lp

Open jokerigno opened this issue 4 years ago • 39 comments

Describe the question or issue you are having

I bought this some time ago to use it inside Home Assistant. I don't understand why there are two lights in HA, while I have one entity in Phoscon app.

This produce an issue: I cannot manage white level correctly because one light in HA is RGB; the other has just brightness.

So for example if I create a light group no white level is present and brightness change level on RGB and White. So it's impossible to have full saturated color.

Please let me know if you need some other info .

Screenshots

Environment

Host system: Unraid Running method: Marthoc Docker container Firmware version: (264A0700) deCONZ version: (2.10.01) Device: ConBee II Do you use an USB extension cable: (yes / no) -- only relevant for ConBee I/II - Yes Is there any other USB or serial devices connected to the host system? If so: Which? No

deCONZ Logs

Additional context

Phoscon image

Home Assistant entity

image

Home Assistant Group light image

jokerigno avatar Mar 09 '21 21:03 jokerigno

@jokerigno Can you show us what the restapi exposes?

Mimiix avatar Mar 10 '21 09:03 Mimiix

Here's the full log taken from Deconz

immagine

https://pastebin.com/SLwKz2jF

Looking at the light there are two lights actually. But why?

immagine

jokerigno avatar Mar 10 '21 09:03 jokerigno

Ah that explains. That's the channels of the device. That's the reason you see 2 devices.

I have to ask @manup or @SwoopX to explain why this is done.

Mimiix avatar Mar 10 '21 09:03 Mimiix

On the REST-API level the FLS-PP lp is indeed presented as two lights for historical reasons to make the white channel controllable separately. In the Phoscon App merges these two two to show a slightly more dense UI.

To get a fully saturated color only the first color light should be used. The dimmable light, which is the white slider in the Phoscon App, needs to be turned off so that it doesn't desaturate the color.

manup avatar Mar 10 '21 21:03 manup

thank you @manup for the feedback but in my humble opinion having 2 different approach in REST-API vs Phoscon does not make any sense. Infact in Phoscon you can still controll white channel separately.

Your suggestion is much more complicated to manage in home assistant UI and via voice control:

  • you cannot create a group light because the white light does not expose white level, just brightness and this means that changing brightness in a group light with change both white and rgb brightness
  • you cannot create template light because as told before white light does not expose white level and this produce error

The only solution is via automation but if not the best approach.

Can we align the same behavior from Phoscon to Rest-Api?

jokerigno avatar Mar 13 '21 14:03 jokerigno

Hi,

can you share your thoughts on my proposal?

jokerigno avatar Mar 18 '21 17:03 jokerigno

[...]having 2 different approach in REST-API vs Phoscon does not make any sense.

Phoscon is just a visual representation, any REST API client is free to present the resources from the API as desired. For example sensors also work this way, in the API they are separated for temperature, humidity etc. but in UIs usually shown as one combined device.

I understand the complications, the problem is that there is no such thing as a real white channel in the API and also not on Zigbee level. In the API there are only color lights and color temperature lights which both don't follow a channel based representation but only have an interface for color temperature in kelvin, xy color coordinates and hue / saturation.

The very first firmware version of the FLS-PP lp didn't have a separate dimable light representing the white channel, the white level was implicitly calculated based from the selected color saturation and brightness. But then we got heaps of complains from people who wanted to control the white channel explicitly. Based on that feedback we introduced the second dimable light endpoint (the only way to implement that in a Zigbee conform way).

This way of representing RGBW has been later copied by various other controllers as well.

To be frank there is no real good solution in the bounds of Zigbee and providing full control.

  • you cannot create a group light because the white light does not expose white level, just brightness and this means that changing brightness in a group light with change both white and rgb brightness
  • you cannot create template light because as told before white light does not expose white level and this produce error

I think this is a current limitation with what HA UI widget provide and that it would be better to have another UI widget that support such multi resource lights in a suitable way.

Small side note: The Hue API also delivers the same separation for various controllers following the FLS approach. Meaning than used with a Hue bridge the same issue exist and it would be nice to have such a widget in the repertoire for both APIs.

Can we align the same behavior from Phoscon to Rest-Api?

I would propose to solve this on the client side, by providing a widget which represents the two resources as single light and a slider for white which just controls the brightness of the second resource.

Beside from showing a FLS-PP lp as one light the Phoscon App creates helper groups to support group control of the white channel. For each group like 'Living Room' there are 2 helper groups one for RGB part and one for white channel, making it possible to control a group of FLS there only RGB or white channel is affected.

manup avatar Mar 20 '21 11:03 manup

Thank you @manup for the simple and clear response. I will report this to HA hoping that something can be changed at integration level.

jokerigno avatar Mar 21 '21 23:03 jokerigno

It's funny, as i have one at home right now, mine works as expected in HA. Yes, i have 2 lights in there but the color selector does what you expect it to do.

Mimiix avatar Mar 23 '21 08:03 Mimiix

So you can manage "white" indipendenly? Can you share your code? I tried with light.group but brightness act on both lights. I tested template light but for me it does not work (set color in particular)

PS: sorry for the offtopic but I don't know how to write you.

jokerigno avatar Mar 23 '21 14:03 jokerigno

I just used the sliders on the thing. I am currently testing it before attaching it to some place in my room.

Mimiix avatar Mar 23 '21 14:03 Mimiix

Slider on the thing?

Which slider?

Are you referring to this product? https://zigbee.blakadder.com/dresden_elektronik_FLS-PP.html

jokerigno avatar Mar 23 '21 16:03 jokerigno

Yes. Why would i reply if it isn't the same device :)?

image

That one :)

Mimiix avatar Mar 23 '21 16:03 Mimiix

Ok but still I don't get hit. Sorry. That slide is color temperature, not white level. In my setup doesn't do anything (on the rgb entity).

jokerigno avatar Mar 23 '21 17:03 jokerigno

White level is color temp, right?

Mimiix avatar Mar 23 '21 18:03 Mimiix

Nope. White level is white level and color temp is color temp :)

Or at least for me. Have you tried it?

Let me know if you are able to set a full saturated color via HA ui controlling just one entity.

jokerigno avatar Mar 23 '21 19:03 jokerigno

Hey @Mimiix can I ask you how the white light create by the integration behave?

My light is called Dimmable light 10 and this is attributes:

'10': {'etag': 'f21171ac19122534cd30530fd32c4291', 'hascolor': False, 'lastannounced': '2021-01-14T03:31:35Z', 'lastseen': '2021-02-26T16:43Z', 'manufacturername': 'dresden elektronik', 'modelid': 'FLS-PP3 White', 'name': 'Dimmable light 10', 'powerup': 7, 'state': {'alert': 'none', 'bri': 219, 'on': False, 'reachable': True}, 'swversion': '0214.201000EB', 'type': 'Dimmable light', 'uniqueid': '00:21:2e:ff:ff:05:8f:ea-0b'},

Every time I change brightness via HA I see this error:

2021-03-23 18:57:24 DEBUG (MainThread) [pydeconz.gateway] Sending "put" "{'on': True, 'hue': 7127, 'sat': 118, 'bri': 219}" to "192.168.2.202 /lights/10/state" 2021-03-23 18:57:24 DEBUG (MainThread) [pydeconz.gateway] HTTP request response: [{'error': {'address': '/lights/10/state', 'description': 'parameter, hue, not available', 'type': 6}}, {'error': {'address': '/lights/10/state', 'description': 'parameter, sat, not available', 'type': 6}}, {'success': {'/lights/10/state/on': True}}, {'success': {'/lights/10/state/bri': 219}}] 2021-03-23 18:57:24 DEBUG (MainThread) [pydeconz.websocket] {"e":"changed","id":"10","r":"lights","state":{"alert":null,"bri":219,"on":true,"reachable":true},"t":"event","uniqueid":"00:21:2e:ff:ff:05:8f:ea-0b"} 2021-03-23 18:57:24 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [139885700299600] /lights/10/state parameter, hue, not available Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 141, in handle_call_service await hass.services.async_call( File "/usr/src/homeassistant/homeassistant/core.py", line 1488, in async_call task.result() File "/usr/src/homeassistant/homeassistant/core.py", line 1523, in _execute_service await handler.job.target(service_call) File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 204, in handle_service await self.hass.helpers.service.entity_service_call( File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 642, in entity_service_call future.result() # pop exception if have File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 681, in async_request_call await coro File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 679, in _handle_entity_call await result File "/usr/src/homeassistant/homeassistant/components/light/init.py", line 235, in async_handle_light_on_service await light.async_turn_on(**params) File "/usr/src/homeassistant/homeassistant/components/deconz/light.py", line 202, in async_turn_on await self._device.async_set_state(data) File "/usr/local/lib/python3.8/site-packages/pydeconz/deconzdevice.py", line 38, in async_set_state await self.async_set(field, data) File "/usr/local/lib/python3.8/site-packages/pydeconz/api.py", line 118, in async_set await self._request("put", field, json=data) File "/usr/local/lib/python3.8/site-packages/pydeconz/gateway.py", line 109, in request _raise_on_error(response) File "/usr/local/lib/python3.8/site-packages/pydeconz/gateway.py", line 225, in _raise_on_error raise_error(data["error"]) File "/usr/local/lib/python3.8/site-packages/pydeconz/errors.py", line 58, in raise_error raise cls("{} {}".format(error["address"], error["description"])) pydeconz.errors.RequestError: /lights/10/state parameter, hue, not available

Why it seems that it wants hue values?

jokerigno avatar Mar 30 '21 21:03 jokerigno

That could be related to another issue.

I really am annoyed by the other light(the white channel), because it doesn't seem to turn off properly. No clue whats going on with that. Need to have some look with Manup on it.

Mimiix avatar Mar 31 '21 14:03 Mimiix

Yes definitely is not well managed.Let's hope that will be fixed :)

jokerigno avatar Apr 01 '21 10:04 jokerigno

@jokerigno I spoke to @manup. Users complained that they wanted W seperate. So can't please anyone.

He will check this weekend if the old code is still in the firmware to set the mode (so we have 1 for all , or have W as a seperate light like it is now).

Mimiix avatar Apr 01 '21 14:04 Mimiix

That would be G R E A T !

#fingercrossed

jokerigno avatar Apr 01 '21 14:04 jokerigno

Sorry for my insistence but I was wondering if anyone have an update on this.

jokerigno avatar Apr 12 '21 17:04 jokerigno

@Mimiix any update on this?

jokerigno avatar Apr 19 '21 07:04 jokerigno

I've asked manup.

Mimiix avatar Apr 19 '21 08:04 Mimiix

As there has not been any response in 21 days, this issue has been automatically marked as stale. At OP: Please either close this issue or keep it active It will be closed in 7 days if no further activity occurs.

github-actions[bot] avatar May 11 '21 02:05 github-actions[bot]

It was put in the list for next month

Mimiix avatar May 11 '21 06:05 Mimiix

As there has not been any response in 28 days, this issue will be closed. @ OP: If this issue is solved post what fixed it for you. If it is not solved, request to get this opened again.

github-actions[bot] avatar May 19 '21 02:05 github-actions[bot]

As there has not been any response in 28 days, this issue will be closed. @ OP: If this issue is solved post what fixed it for you. If it is not solved, request to get this opened again.

github-actions[bot] avatar May 27 '21 03:05 github-actions[bot]

@manup Is it possible to get a switch or firmware where the driver could calculate the white channel rather than seperate it? It would be so useful in bigger installations.

akafester avatar Jun 09 '21 17:06 akafester

As there has not been any response in 21 days, this issue has been automatically marked as stale. At OP: Please either close this issue or keep it active It will be closed in 7 days if no further activity occurs.

github-actions[bot] avatar Jul 01 '21 02:07 github-actions[bot]