home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
73.41k stars 30.65k forks source link

Fibaro Roller Shutter 3 (FGR223) Tilt Entity #64538

Closed spn91 closed 1 year ago

spn91 commented 2 years ago

The problem

Hi, I am using this device to control my venetian blinds. I am able to control up/down and tilt out of the box, but the tilt is listed as separate entity. Shouldn’t this be in the same entity? Searching for issues and PRs I just can find the FGR222. For this device a fix was released to control the tilt via SERVICE COVER.SET_COVER_TILT_POSITION.

I think this is also the problem why I have two separate devices in HomeKit. Reading the code of the homekit integration it should be supported that tilt and up/down are in the same object.

I have attached an output of one of my fibaro nodes and a screenshot of the device in home assistant

node_7.json.txt 32674EEC-1ED3-4EC9-A118-EF7281D3CFBE

What version of Home Assistant Core has the issue?

core-2021.12.10

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

zwave_js

Link to integration documentation on our website

https://www.home-assistant.io/integrations/zwave_js/

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

probot-home-assistant[bot] commented 2 years ago

Hey there @home-assistant/z-wave, mind taking a look at this issue as it has been labeled with an integration (zwave_js) you are listed as a code owner for? Thanks! (message by CodeOwnersMention)


zwave_js documentation zwave_js source (message by IssueLinks)

MartinHjelmare commented 2 years ago

Please create a dump of your Z-Wave network and upload the dump as a text file here.

The dump tool is available in the configuration panel of the Z-Wave JS integration, reached from the integrations page in the Home Assistant GUI.

The network dump will help us troubleshoot your device.

Thanks!

spn91 commented 2 years ago

zwave_js_dump.txt

spn91 commented 2 years ago

@MartinHjelmare could you already find out something?

MartinHjelmare commented 2 years ago

We have support for Fibaro FGR222 in our discovery matching, but that device has the following Command Class data that we match on:

{
  "endpoint": 0,
  "commandClass": 145,
  "commandClassName": "Manufacturer Proprietary",
  "property": "fibaro",
  "propertyKey": "venetianBlindsTilt",
  "propertyName": "fibaro",
  "propertyKeyName": "venetianBlindsTilt",
  "ccVersion": 0,
  "metadata": {
    "type": "number",
    "readable": true,
    "writeable": true,
    "label": "Venetian blinds tilt",
    "min": 0,
    "max": 99
  },
  "value": 0
}

I don't see that Command Class data in your network dump on the Fibaro FGR223 device.

@kpine do you have further insight?

kpine commented 2 years ago

It sounds like this device has different behavior than the 222. From what I'm reading, the blind up/down position is controlled by endpoint 1, and the slat position is controlled by endpoint 2, which matches OP's description "I am able to control up/down and tilt out of the box, but the tilt is listed as separate entity.", since we create a separate entity for each endpoint. If that's the case, to properly support this device the integration would need to manage these two endpoints in a single entity.

It's almost, but not quite, as simple as swapping out the manufacturer proprietary value in the discovery, and replacing it with the endpoint 2 multilevel target value. First, it would need to be confirmed whether tilt levels 0-99 are valid, as that is assumed. Second, unlike the manufacturer proprietary value, the multilevel switch has a targetValue for "set", and a currentValue for "get". The mfg one is a single value for both set and get. The current CoverTiltDataTemplate class doesn't support that distinction. Third, entity discovery for endpoint 2 multilevel switch would need to be blocked (I can't remember if that's handled already by way of handling it as a dependent value) to avoid creating the second cover entity.

kpine commented 2 years ago

On the other hand, both Z-Wave JS and OZW have overrides to force discovery of the Manufacturer Proprietary CC, and that's picked up in the dump:

              "proprietary": {
                "fibaroCCs": [
                  38
                ]
              }

So it's odd that the value is not appearing. Perhaps try a re-interview with debug logs enabled and post the results here.

spn91 commented 2 years ago

Turned on debug logs and re-interviewed one of my FGR223. zwavejs_2022-02-02.log

kpine commented 2 years ago

The log doesn't show anything about the Manufacturer Proprietary CC, which is what the 222 uses to control the tilt. I'm thinking that the OZW and Z-Wave JS device files are incorrect. The Fibaro 223 manual does not list Manufacturer Proprietary CC as a supported CC, but it does for the 222. The OpenHAB database says endpoint 1 is for blind control and endpoint 2 is for lamella (tilt) control, with no supports for Mfg Proprietary (compare to the FGRM-222 entry which does support it).

Could you contact Fibaro support and ask them for the technical details about what the correct way to tilt the blinds is to confirm the actual behavior? Can you use Manufacturer Proprietary CC with the 223, or is the right way to use endpoint 2? Did they make changes in the firmware versions? There is a 5.1 version, which you have, and an older 3.3 version.

TheDK commented 2 years ago

Just FYI: I asked for the same thing in the upstream project as a feature request: https://github.com/zwave-js/zwavejs2mqtt/issues/971

Currently it works as designed:

Oh I completely missed that you have the Roller Shutter 3. We specifically enabled use of the CC in Roller Shutter 2 configurations. AFAIK Roller Shutter 3 uses Multilevel Switch CC, Endpoint 2 for rotating the blinds. For you these are the values starting with 4-38-2-

So it is correct to use endpoint 2...

spn91 commented 2 years ago

But why do we have two separate entities for this? Tilting was always possible for me, my problem is, that in homekit one fibaro is listed as two separate blinds. And it seems that HA is capable of listing the tilt slider within the up/down entity.

Btw: got no useful reply from fibaro yet..

TheDK commented 2 years ago

Best guess: Just the standard way to show to endpoints as two entities (same as with two relay switches on one node / device). I think either the Z-Wave JS integration would have to treat his specific device differently or it would have to be implemented differently by the upstream project (maybe both?). Don't know if it's worth that?

github-actions[bot] commented 2 years ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

spn91 commented 2 years ago

@kpine & @MartinHjelmare do you know how we could achieve, that up/down and tilt is shown in one entity?

I have now bought a qubino flush shutter to try it additionally with it, but also with this two entities are created.

MartinHjelmare commented 2 years ago

Probably add a discovery entry for this device and modify/add a data template for these device kinds. PR is welcome.

It's almost, but not quite, as simple as swapping out the manufacturer proprietary value in the discovery, and replacing it with the endpoint 2 multilevel target value. First, it would need to be confirmed whether tilt levels 0-99 are valid, as that is assumed. Second, unlike the manufacturer proprietary value, the multilevel switch has a targetValue for "set", and a currentValue for "get". The mfg one is a single value for both set and get. The current CoverTiltDataTemplate class doesn't support that distinction. Third, entity discovery for endpoint 2 multilevel switch would need to be blocked (I can't remember if that's handled already by way of handling it as a dependent value) to avoid creating the second cover entity.

folwarczny commented 1 year ago

Anybody found a good solution to it? Or if that have to be two entities, is it possible to have it “nicely” presented as an UI Items?

influenist commented 1 year ago

Hi Guys,

I have 8 of these fibaro modules, same issue. Tilt had not been discovered yet shows up as (2). Which is totally not user friendly and fills the full home screen. Any possibility to merge the 2 entities like venetian blinds behaviour with the roller shutter 2?

TheDK commented 1 year ago

Here's a thread with lots of info on the device: https://community.home-assistant.io/t/fibaro-roller-shutter-3-fgr-223-cannot-get-it-to-work-properly/97577/163?u=namcisum

issue-triage-workflows[bot] commented 1 year ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.