Skip to content
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

Using Fibaro FGR222 in ventian Blind Mode is not responding correct values #115632

Open
skipper2020 opened this issue Apr 15, 2024 · 10 comments
Open

Comments

@skipper2020
Copy link

skipper2020 commented Apr 15, 2024

The problem

Hello,
I use several Fibaro fgr222 roller shutter modules in venetian blind mode. In the module you can only set whether it reports changes to the standard value (multilevel switch), but then only the position value of the blind and not the opening angle of the slats. Or it can report to the manufacturer's proprietary attribute with both values (Property 145).
When the module is configured to report to the proprietary attribute it works for reporting the opening angle of the slats, but not for the position of the blinds. I looked at the adjustments in discovery.py. There is an adjustment, but the value for the primary value does not match the attributes in the MANUFACTURER_PROPRIETARY Class. I tried to adapt the code, but since I'm not a Python developer it doesn't seem to work and I need help here.
I have already successfully created an adjustment to detect whether the module is running in Venetian blind mode.
See my code after the text.

Best regards
Timo

Part of the discovery.py

ZWaveDiscoverySchema(
        platform=Platform.COVER,
        hint="shutter_tilt",
        manufacturer_id={0x010F},
        product_id={0x1000, 0x1001},
        product_type={0x0301, 0x0302},
        primary_value=ZWaveValueDiscoverySchema(
            command_class={CommandClass.MANUFACTURER_PROPRIETARY},
            property={"fibaro"},
            property_key={"venetianBlindsPosition"},
            endpoint={0},
            type={ValueType.NUMBER},
        ),
        data_template=CoverTiltDataTemplate(
            current_tilt_value_id=ZwaveValueID(
                property_="fibaro",
                command_class=CommandClass.MANUFACTURER_PROPRIETARY,
                endpoint=0,
                property_key="venetianBlindsTilt",
            ),
            target_tilt_value_id=ZwaveValueID(
                property_="fibaro",
                command_class=CommandClass.MANUFACTURER_PROPRIETARY,
                endpoint=0,
                property_key="venetianBlindsTilt",
            ),
        ),
        required_values=[
            ZWaveValueDiscoverySchema(
                command_class={CommandClass.CONFIGURATION},                                      
                property={10},                                                                  
                endpoint={0},                                                                    
                value={2},
            )
        ],
    ),

What version of Home Assistant Core has the issue?

core-2024.4.1

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Container

Integration causing the issue

Z-Wave JS

Link to integration documentation on our website

https://github.com/home-assistant/core/tree/dev/homeassistant/components/zwave_js

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

@home-assistant
Copy link

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!

Code owner commands

Code owners of zwave_js can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign zwave_js Removes the current integration label and assignees on the issue, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


zwave_js documentation
zwave_js source
(message by IssueLinks)

@MartinHjelmare MartinHjelmare changed the title Using Fibaro FGR222 in ventian Blind Mode is not responing correct values Using Fibaro FGR222 in ventian Blind Mode is not responding correct values Apr 15, 2024
@MartinHjelmare
Copy link
Member

Please download diagnostics of your Z-Wave device and attach it as a text file here by dragging and dropping the file in a comment.

The diagnostics tool is available by clicking the three dots menu of the Z-Wave device in the device page in the Home Assistant GUI.

Thanks!

@skipper2020
Copy link
Author

Here you have a diagnostic file of one of my fgr modules they are all the same firmware and all in the same configuration.
zwave_js-32b45b91c71ede80825663ac98c3f313-Raffstore_2-d7352ff29f3e711cb7ca04c539e6fa96.json

@MartinHjelmare
Copy link
Member

It's not clear what's not working in your experience. Please clarify that. I can see that the _target_position_value won't be set correctly in the entity with this combination of discovery template and cover entity. It expects to use a Multilevel Switch command class for cover position.

self._target_position_value = target_value or self.get_zwave_value(
TARGET_VALUE_PROPERTY, value_property_key=current_value.property_key
)

@skipper2020
Copy link
Author

If the configuration property 10 is set to the value 2 (as in my case) then the module reports exclusively to the Manufactory Proprietary attribute of the device.
However, if you choose a different configuration, you will not get the position of the slats and the blinds when you ajust them.
In my opinion, discovery.py needs to be adjusted so that the primary value would be set by the manufacturer proprietary properties.
There are two values in the property: "venetianBlindsPosit" which represents the position of the blinds and "venetianBlindsTilt" which represents the opening angle of the slats.
This property has just the ability of set and don't differ between current and target value.

Hence my query as to how I can customize this so that I can test this configuration.

Thanks for the support.
best regards

@MartinHjelmare
Copy link
Member

Right, but when you say "it doesn't seem to work", what doesn't seem to work?

I think we need a way to customize the target position value in the CoverTiltDataTemplate.

@skipper2020
Copy link
Author

skipper2020 commented Apr 15, 2024

Ah I understand what you mean.
I don't get the position in HA in which hight are my blinds.
Yeah sounds like a way to have the position in the CoverTiltDataTemplate.

Would it be possible like this code? But I don't know what is necessary to do in the CoverTiltDataTemplate

ZWaveDiscoverySchema(
        platform=Platform.COVER,
        hint="shutter_tilt",
        manufacturer_id={0x010F},
        product_id={0x1000, 0x1001},
        product_type={0x0301, 0x0302},
        primary_value=CoverTiltDataTemplate(
            current_tilt_value_id=ZwaveValueID(
                property_="fibaro",
                command_class=CommandClass.MANUFACTURER_PROPRIETARY,
                endpoint=0,
                property_key="venetianBlindsPosition",
            ),
            target_tilt_value_id=ZwaveValueID(
                property_="fibaro",
                command_class=CommandClass.MANUFACTURER_PROPRIETARY,
                endpoint=0,
                property_key="venetianBlindsPosition",
            ),
        ),
        data_template=CoverTiltDataTemplate(
            current_tilt_value_id=ZwaveValueID(
                property_="fibaro",
                command_class=CommandClass.MANUFACTURER_PROPRIETARY,
                endpoint=0,
                property_key="venetianBlindsTilt",
            ),
            target_tilt_value_id=ZwaveValueID(
                property_="fibaro",
                command_class=CommandClass.MANUFACTURER_PROPRIETARY,
                endpoint=0,
                property_key="venetianBlindsTilt",
            ),
        ),
        required_values=[
            ZWaveValueDiscoverySchema(
                command_class={CommandClass.CONFIGURATION},                                      
                property={10},                                                                  
                endpoint={0},                                                                    
                value={2},
            )
        ],
    ),

@MartinHjelmare
Copy link
Member

No, that won't work. I think you'll need to learn some Python to solve this.

@skipper2020
Copy link
Author

Yeah that's why I need some help ;-)

@MartinHjelmare
Copy link
Member

I don't have time to tell you exactly how to solve this. If you want to try and solve this you should first read the relevant code and understand how it works. The relevant code is in cover.py, discovery.py and discovery_data_template.py.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants