Closed legomind closed 3 years ago
Sounds like #46138. Can you please attach a network dump.
I swear I looked for existing issues. :-) Anyway here is the dump. https://drive.google.com/file/d/1XTTWaKXqrfBAUy5q0aaZ-2-Dja56qzs0/view?usp=drivesdk
It was closed, no worries. 😄 Just referencing it for more info.
Also affects the FGRGBWM442 device (the zwave plus version of this device).
Has anyone used these devices in other z-wave software? What was your experience? How are the controls presented?
Same issue here with my old fibaro rgbw (v1). Only 5 light switch and use it is very... random! This module worked well on OpenZwave on Jeedom (french automation software).
Thanks :) zwave_js_dump.zip
This module worked well on OpenZwave on Jeedom (french automation software).
How did it work on Jeedom? Did you have multiple light "entities" (or whatever the equivalent)? Did one of them support RGB, and the others did not?
This module worked well on OpenZwave on Jeedom (french automation software).
How did it work on Jeedom? Did you have multiple light "entities" (or whatever the equivalent)? Did one of them support RGB, and the others did not?
Sorry, I am unable to answer. I was only using it in automation, not in a dashboard :(
Has anyone used these devices in other z-wave software? What was your experience? How are the controls presented?
Well with the old zwave integration in home assistant, it presented as 1 RGB light entity, and one monochrome light entity for the white channel.
I think this post shows what we could expect from this RGBW controller : https://community.home-assistant.io/t/fibaro-rgbw-with-ha-and-lovelace/205539/14
Also affects the FGRGBWM442 device (the zwave plus version of this device).
@Kurisutian The FGRGBWM442 is different enough from the V1, so it would be useful if you also provided a network dump, it might be a different problem.
Here's a dump of my personal opinions and thoughts on this issue (see disclaimers).
Going back to what I said in the other issue, the problem with this device is that it is a multi-channel device, and the endpoint (root, 0) that advertises color support (Color Switch CC) does not have the required value for lights (Switch Multilevel CC). Because of that it doesn't look like a light so HA doesn't create an entity. The remaining endpoints (1-5) look like lights, but none of them support color.
The linked fix in zwavejs2mqtt seems to workaround this by associating the endpoint 1's switch multilevel value with endpoint 0's color switch value. I don't really know if this is the right fix, doesn't feel like it but maybe... seems like it's works?. To do something like this would require some new functionality in HA, as it rare to consider values on other endpoints. In fact, in zwave or ozw it would have been impossible because endpoints were their own HA Devices. Solving this the same way in HA would require a device specific handler and more complicated logic because it's definitely not standard behavior.
It sounds like this device worked fine in OZW, and you ended up with six light entities, one of those controlling RGBW. OZW handles multi-channel devices differently than zwave-js. By default, OZW will expose the root endpoint and all others as individual values. By default, zwave-js will hide the root endpoint (0) values if it thinks they are mirrored by endpoint 1. This is because it's what the spec requires, and zwave-js is much more spec compliant than ozw so this might be a result of that.
I've also looked at the OpenHAB report for the device (Endpoints tab), and it looks like they create a switch_dimmer and color_color channel for the root endpoint. Endpoint 1 is ignored. Endpoints 2-5 are switch_dimmer channels. I've hardly used OpenHAB, but I think channels are similar to entities. I also looked at some random SmartThings/Hubitat handlers, and they treat the endpoints roughly the same.
Based on this post and the sources above, I am guessing the endpoints have the following functionality:
So we have at least two different implementations exposing the root endpoint for light and RGB control, and we have zwave-js being one that doesn't. It's more than likely the device is not spec compliant, and OZW is more relaxed than zwave-js in that regards. In the previously closed issue, I suggested enabling a compatibility flag in zwave-js to allow the root device to be preserved, but it was reported not to work, which surprised me based on what is working with OZW and presumably OpenHAB.
If it is indeed the case that the problem cannot be addressed in node-zwave-js with a compat flag or some other means, then that leaves the aforementioned device specific handler to be implemented by HA. Either to associate endpoint 0 and 1 together, like zwavejs2mqtt seems to do (?), or more drastically implement individual control of the 4 endpoints to control the RGB values (does it work? who knows).
It would really be useful if someone could contact Fibaro and ask for the exact behavior of each of the endpoints to set the record straight. I know they aren't very forthcoming though with support email if you don't use their hub. ☹️ Or perhaps someone who owns the device and knows z-wave more than I do will set me straight.
That's all I've got. Good luck!
Disclaimers:
Here's a dump from me, regarding the 442 Device. zwave_js_dump.zip
@kpine I agree with everything you said based off of my experience with this device. Personally, I am planning on replacing these devices, because they have always performed slowly. However, because these devices are not performing according to spec maybe we should look at a different solution that is not specific to the zwave_js integration.
Tonight, I will attempt to setup a light Template that will manage controlling each channel of this device. Perhaps that should be the workaround for this trouble making device.
Ok, so I was able to get this device to behave exactly as it did with the ozw integration, using a template light. One RGB light entity combining the RGB channels, and one monochrome light entity for the white channel: As you can see in the config below, I have not implemented white value or color temp. I will experiment with that later.
Its not pretty, and it is my first time messing with scripts or templates, so improvements are welcome:
Template config:
light:
- platform: template
lights:
corys_bedroom_indirect_lighting:
friendly_name: Corys Bedroom Indirect Lighting
level_template: >-
{%- set entity_ids = [
'light.corys_bedroom_indirect_lighting_red',
'light.corys_bedroom_indirect_lighting_green',
'light.corys_bedroom_indirect_lighting_blue',
'light.corys_bedroom_indirect_lighting_white',
'light.corys_bedroom_indirect_lighting_all'
]%}
{{[state_attr(entity_ids[0], 'brightness') | int,
state_attr(entity_ids[1], 'brightness') | int,
state_attr(entity_ids[2], 'brightness') | int] | max }}
value_template: '{{ states("light.corys_bedroom_indirect_lighting_all") }}'
#temperature_template: ''
color_template: >-
{%- set entity_ids = [
'light.corys_bedroom_indirect_lighting_red',
'light.corys_bedroom_indirect_lighting_green',
'light.corys_bedroom_indirect_lighting_blue',
'light.corys_bedroom_indirect_lighting_white',
'light.corys_bedroom_indirect_lighting_all'
]%}
{%- set rgb = [(state_attr(entity_ids[0], 'brightness') | int) / 255,
(state_attr(entity_ids[1], 'brightness') | int) / 255,
(state_attr(entity_ids[2], 'brightness') | int) / 255] %}
{%- set maxc = rgb | max %}
{%- set minc = rgb | min %}
{%- if minc == maxc %}
{% set h,s,v = [0.0, 0.0, maxc] %}
{%- else %}
{%- set v = maxc %}
{%- set s = (maxc - minc) / maxc %}
{% set r,g,b = rgb %}
{% set rc = (maxc - r) / (maxc - minc) %}
{% set gc = (maxc - g) / (maxc - minc) %}
{% set bc = (maxc - b) / (maxc - minc) %}
{%- if r == maxc %}
{%- set h = bc - gc %}
{%- elif g == maxc %}
{% set h = 2.0 + rc - bc %}
{%- else %}
{%- set h = 4.0 + gc - rc %}
{%- endif %}
{%- set h = (h/6.0) % 1.0 %}
{%- endif %}
{% set h,s,v = [(h * 360) | round(3), (s * 100) | round(3), (v * 100) | round(3) ] %}
{{ [h, s] }}
turn_on:
service: light.turn_on
data:
entity_id: light.corys_bedroom_indirect_lighting_all
turn_off:
service: light.turn_off
entity_id: light.corys_bedroom_indirect_lighting_all
set_level:
service: script.mux_light_set_level
data:
brightness: '{{ brightness }}'
entity_ids:
- light.corys_bedroom_indirect_lighting_red
- light.corys_bedroom_indirect_lighting_green
- light.corys_bedroom_indirect_lighting_blue
- light.corys_bedroom_indirect_lighting_white
- light.corys_bedroom_indirect_lighting_all
set_color:
service: script.mux_light_set_color
data:
h: '{{ h }}'
s: '{{ s }}'
brightness: '{{ state_attr("light.corys_bedroom_indirect_lighting", "brightness") }}'
entity_ids:
- light.corys_bedroom_indirect_lighting_red
- light.corys_bedroom_indirect_lighting_green
- light.corys_bedroom_indirect_lighting_blue
- light.corys_bedroom_indirect_lighting_white
- light.corys_bedroom_indirect_lighting_all
Script Config:
script:
mux_light_set_level:
alias: Mux Light Set Level
mode: parallel
sequence:
- alias: Log
service: system_log.write
data:
level: info
message: 'set_level called {{ brightness }}'
- alias: 'Restore last state if off'
choose:
conditions: '{{ states(entity_ids[4]) == "off" }}'
sequence:
- alias: 'Restoring last state'
service: light.turn_on
data:
entity_id: '{{ entity_ids[4] }}'
- delay:
milliseconds: 1000
- alias: 'Set Red Channel Brightness'
choose:
conditions: '{{ states(entity_ids[0]) == "on" }}'
sequence:
- service: light.turn_on
data:
brightness: '{{ brightness }}'
entity_id: '{{ entity_ids[0] }}'
- alias: 'Set Green Channel Brightness'
choose:
conditions: '{{ states(entity_ids[1]) == "on" }}'
sequence:
- service: light.turn_on
data:
brightness: '{{ brightness }}'
entity_id: '{{ entity_ids[1] }}'
- alias: 'Set Blue Channel Brightness'
choose:
conditions: '{{ states(entity_ids[2]) == "on" }}'
sequence:
- service: light.turn_on
data:
brightness: '{{ brightness }}'
entity_id: '{{ entity_ids[2] }}'
mux_light_set_color:
alias: Mux Light Set Color
mode: parallel
variables:
rgb: >-
{%- set brightness = brightness if brightness is not none else 255 %}
{%- set h = h/360.0 %}
{%- set s = s/100.0 %}
{%- set v = 1.0 %}
{%- if s == 0.0 %}
{%- set r = v %}
{%- set g = v %}
{%- set b = v %}
{%- else %}
{%- set i = (h * 6.0) | int %}
{%- set f = (h * 6.0) - i %}
{%- set p = v * (1.0 - s) %}
{%- set q = v * (1.0 - s*f) %}
{%- set t = v * (1.0 - s * (1.0 - f)) %}
{%- set i = i%6 %}
{%- if i == 0 %}
{%- set r = v %}
{%- set g = t %}
{%- set b = p %}
{%- elif i == 1 %}
{%- set r = q %}
{%- set g = v %}
{%- set b = p %}
{%- elif i == 2 %}
{%- set r = p %}
{%- set g = v %}
{%- set b = t %}
{%- elif i == 3 %}
{%- set r = p %}
{%- set g = q %}
{%- set b = v %}
{%- elif i == 4 %}
{%- set r = t %}
{%- set g = p %}
{%- set b = v %}
{%- elif i == 5 %}
{%- set r = v %}
{%- set g = p %}
{%- set b = q %}
{%- endif %}
{%- endif %}
{%- set r = r * brightness %}
{%- set g = g * brightness %}
{%- set b = b * brightness %}
{{ [r, g, b] }}
sequence:
- alias: log
service: system_log.write
data:
level: info
message: 'set_color: brightness ({{ brightness }}) hs ({{ h }}, {{ s }}) rgb ({{ rgb[0] }}, {{ rgb[1] }}, {{ rgb[2] }} )'
- alias: Set Red Channel
choose:
- conditions: '{{ rgb[0] > 0 }}'
sequence:
- service: light.turn_on
data:
entity_id: '{{ entity_ids[0] }}'
brightness: '{{ rgb[0] }}'
default:
- service: light.turn_off
data:
entity_id: light.corys_bedroom_indirect_lighting_red
- alias: Set Green Channel
choose:
- conditions: '{{ rgb[1] > 0 }}'
sequence:
- service: light.turn_on
data:
entity_id: '{{ entity_ids[1] }}'
brightness: '{{ rgb[1] }}'
default:
- service: light.turn_off
data:
entity_id: '{{ entity_ids[1] }}'
- alias: Set Blue Channel
choose:
- conditions: '{{ rgb[2] > 1 }}'
sequence:
- service: light.turn_on
data:
entity_id: '{{ entity_ids[2] }}'
brightness: '{{ rgb[2] }}'
default:
- service: light.turn_off
data:
entity_id: '{{ entity_ids[2] }}'
Apparently, light templates do not currently support setting multiple attributes in the same service call as other light platforms. So while the template workaround works fine for the frontend, It will not work as a proper workaround for zwave_js integration not exposing the root endpoint.
Wanted to add that the Zooz ZEN31 is an Dimmer RGBW device based on the Fibaro the FCC ID: 2AA9MFGRGBW442 IC: 20430-FGRGBW442 and with Version 2021.4.4 and ZWave2Mqtt installed I'm having the same issues as described here.
Hello,
Maybe some info that can help: For me, using Home assistant 2021.4.5 and ZwaveJS 0,1,19 it works with colorwheel for the 442, but not for the 441.
442:
Regards,
Bart.
@bart1970 How did you get this to appear with the 442 device? What Firmware does the device run on? I have the same one but do not see a color wheel whatsoever...
@bart1970 How did you get this to appear with the 442 device? What Firmware does the device run on? I have the same one but do not see a color wheel whatsoever...
@Kurisutian I have 442 firmware 5.0 Just updated to Home assistant: 2021.4.6 and zwave-js 0.1.20 before I saw your questions.
Now, I still have a color wheel, but
@bart1970 I never had a color wheel or just don't find it. Where can I check for one or how can it be added? 🤔
@Kurisutian I never did anything for it as far as I remember, For all RGB nodes, it was always just there.
@bart1970 thanks. I checked again and sometime during the last upgrades it must have changed here as well. I found it, however it does not do anything. Lights are still off no matter what I do. Did they actually work for you? Mine remain switched off...
@Kurisutian On, off and brightness works. for both the 441 and the 442.
Still in trouble with this 442 integration :(
My config:
My config in dev tools:
When I add light.controleur_rgb_brasero
on lovelace with standard light card, I have access to on/off (working), brightness (not working) and color wheel (not working).
I test with sliders:
light.controleur_rgb_brasero_2
> Red > Workinglight.controleur_rgb_brasero_3
> Green> Workinglight.controleur_rgb_brasero_4
> Blue > Workinglight.controleur_rgb_brasero_5
> White > Can't test, I've only RGB led stripes, not RGBWI've no idea on what is light.controleur_rgb_brasero_6
to light.controleur_rgb_brasero_9
, just receive an error when trying to call light.turn_on
services, with or not any data like brightness.
Anyone manage to make color wheel working atm ?
Me with the same issue.
same issue here
I'm searching a way to correctly use my first gen fibaro RGBw. I see I'm not alone.. I hope it can be solved 😭
Same issue here with the 421
Same issue with 421!
same ^^
I am still convinced this is a node-zwave-js problem. If someone with zwavejs2mqtt standalone (not addon) wants to prove or disprove my theory, it's not difficult to try.
mkdir store/config
.store/config
directory. wget https://raw.githubusercontent.com/kpine/node-zwave-js/ba8398af8acf0e11b61099dfcce9cc64b933275c/packages/config/config/devices/0x010f/fgrgbw.json
CNTRLR [Node 007] User-provided device config loaded
. That means the modified file was loaded and is overriding the packaged version. If instead you see CNTRLR [Node 007] Embedded device config loaded
, it means your setup is incorrect, and it's still using the packaged config file.Hello @kpine, Running zwave-js (not the MQTT version) from the store, but trying to help.
1-Did that 2- Running Z-Wave JS version 0.1.28 (latest available) 3-4. Created bash shell in the zave-js container, moved the existing devices/0x010f/fgrgbw.json and wget your version in. 5- restarted. Got the message: 2021-07-05T07:03:48.069Z CONFIG Device configuration files on disk changed - regenerating index... 2021-07-05T07:03:54.577Z CONFIG Device index regenerated so assume update worked (I don't know how to check further) 6 reinterviewed fibaro RGBW 441 nodes (node 7 and 18)
I do have a working color wheel for the 442 version.
Hello, @kpine,
Moved over to zwavejs2mqtt (from the store, with disable MQTT Gateway). Tried adding the new file. Now I get: 2021-07-05T10:42:39.361Z CONFIG Error parsing config file fgrgbw.json: Could not parse config file /data/store /templates/master_template.json: ENOENT: no such file or directory, open '/dat a/store/templates/master_template.json' Import stack: in #state_after_power_failure_off_prev in /data/store/config/fgrgbw.json
@bart1970 I'm not sure your first attempt worked. The dump file does not show that the compat flag was enabled. I don't trust the addon to not wipe out the changes.
Regarding the second attempt, based on the error message it seems like template files do not fallback to the packaged version. There are two options.
You can delete param 16 from the config file that references the template. You'll just be missing access to that config parameter for the time being. Delete these lines from fgrgbw.json
:
"16": {
"$import": "../templates/master_template.json#state_after_power_failure_off_prev"
},
You can download master_template.json
into your store directory as store/templates/master_template.json
and try again. So you'll have two files:
store/config/fgrgbw.json
store/templates/master_template.json
Hello @kpine
New attempt. I commented out the 3 lines with // For the two 441 nodes, I now get: 2021-07-05T18:12:00.629Z CNTRLR [Node 007] User-provided device config loaded
Re-interviewed nodes and restarted home assistant server.
For both nodes, a new entity appears: light.rgbw_controller and that contains the color wheel!
The dump:, zwave_js_dump_without_template.txt
How do we get the correct file in node-zwave-js?
The addition of the compat flag has added the missing Multilevel Switch value IDs for endpoint 0, as expected. Now HA is able to create a light entity with the matching color functionality.
Submit a Bug Report here. You can reference this issue.
Added:
@Kurisutian, for the 442, I would like to help you, but not sure where to start. Have you:
I currently have replaced it with a Shelly RGBW device to get the stripes working at all. But I intended to use the 442 controller as soon as it is working since I wanted to also use it as a zwave repeater. Last time I checked the was no color wheel at all which is about 2 months ago.
I'll set it up again to check it and get back to you right away. Perhaps tomorrow depending on how much time I have 😉
@bart1970, so I have installed the device again and after some struggling it was recognized and everything. However when controlling it through the app and turning the device on I get a color wheel but the LEDs remain turned off... I'm currently checking the other entities I got for the device but so far no luck... what can I do to provide whatever data is needed so you might have an idea which helps me and works. I would prefer this one over my shelly rgbw device which I use and know is working as a possible replacement if this device won't work...
@Kurisutian I definitly no specialist on HA or Zwave-js. What I do see that:
What we could check is:
Do the individual colors work?
Regards
Bart.
@bart1970 Well, I'm no expert either, that's for sure. ;-) Here's what I did: I completely re-added the device and had it re-interviewed two times. So I'm sure everything detectable is there. What I can see is this:
The first switch when enabled did create a color wheel (only as long as the switch is turned on) but no light turned on. So I played with the other switches and suddenly the light came on. So generally speaking the LED stripes work. However once turned on the other switches I was no longer able to do anything. The color wheel was not working at all and turning off any of the switches also did not work any longer. As soon as I turned them off they went back to the on state automatically. So I only could turn off the LEDs by switching the fuse off and on again. That's how far I got. The device seems to work as a repeater and also is detected alive and available but controlling it in any way seems not to work properly at all.
I did not change the default configuration of the device so is there anything in particular that would be of interest for you?
Thanks for helping me out with this.
@Kurisutian My color wheel is also only there when the switch is on.
Stupid question, but asking anyway., Do you take your time? Default, it takes at least 3 seconds for the device to do the full transition. See the settings how long it takes: My switch also first turns of, and after a view seconds turns on again.
With the other switches, I can set the individual colors. Use the brightness slider. Does that work?
Must be honest, sometimes I need to press the color wheel several times. Then it looks that is doesn't react.
@bart1970 There's no such thing as stupid questions. :wink: Well, call me crazy but I checked again today and for whatever reason it is working now. :see_no_evil: So maybe it took a while to get completely recognized from the system or whatever. Anyway, right now it seems to work. Thank you so much for your efforts and willingness to help. I highly appreciate it! Glad to have another repeater in my ZWave network now. :partying_face:
So for Fibaro RGBW devices looks to be solved. 442 working now, 441 when we get a new release of zwave-js. So this can be closed?
For me isn't solved unfortunately. My 441 still refuse to works as expected. With the latest release that bumps zwave-js 7.12 another entity is appeared.. but is not functional and no color wheel on the other one. ( I obviously rebooted ha, Zwavejs, reloaded integration, reinterviewed the device, checked the parameters). Suggestions? zwave_dump.zip
For me the update zwave-js 7.12 didn't solve the problem, I have 2 441 devices and don't get them to work, also not functional and no color wheel
@skywalker-750 Did you re-interview the nodes after updating?
@kpine I did and my 441 still doesn't have a color wheel.
The problem
I have multiple fibaro rgbw (v1) devices on my network. zwavejs detects them properly, however home assistant only recognizes a monochrome light entity for each channel, and does not create an entity that allows for choosing colors.
Issue is described here: https://github.com/zwave-js/zwavejs2mqtt/issues/351
What is version of Home Assistant Core has the issue?
core-2021.3.1
What was the last working version of Home Assistant Core?
core-2021.1.1
What type of installation are you running?
Home Assistant Container
Integration causing the issue
zwave_js
Link to integration documentation on our website
https://www.home-assistant.io/integrations/zwave_js/
Example YAML snippet
Anything in the logs that might be useful for us?