Z-Wave Binding invert_state=false and invert_percent=true

Hello,

i try to switch for testing to openHAB 2 with zwave.
At the moment i make Thing definition in the item File. I have a problem with the Rollershutter.
My Definition works but i need the invert_state=false and invert_percent=true.

My old Definition in 1.8 was:
Rollershutter szSHUTTER “Außenrollo [%d %%]” (gszSHUTTER) {zwave=“4:command=switch_multilevel,invert_state=false,invert_percent=true”}

My new is
Dimmer SZ_Rollershutter “Außenrollo [%d %%]” (G_Schlafzimmer, G_Rollershutter) { channel=“zwave:device:155556ba178:node4:switch_dimmer” }
my second try was
Rollershutter SZ_Rollershutter “Außenrollo [%d %%]” (G_Schlafzimmer, G_Rollershutter) { channel=“zwave:device:155556ba178:node4:switch_dimmer” }

I dont understand how to add the invert parameter and in HABmin under Thing creation is no invert option.
The Problem is that the Icon shows a open Window but its closed and closed when its open.
It is ok when i am in the Room but when it Rain und i try to close the Window but it says its closed … and so on.
I hope someone can help me.
Jörg

Please advise what device this is and what channel you are talking about. I will need to expose this configuration if it doesn’t already exist, but I need to know the device :wink:.

Its the same as in the other threat … the FGRM222 from Fibaro.
Channel is the a little bit confusing.
I use switch_dimmer but in the db and my xml is only. I tested SWITCH_MULTILEVEL just now and it works too.

Sorry - I don’t know what you mean by this?

Hmm i dont know what you mean with channel :slight_smile:
This ?
channel=“zwave:device:155556ba178:node4:switch_dimmer”
or
channel=“zwave:device:155556ba178:node4:switch_multilevel”

Both works … i dont know why. But both not with UP DOWN and HALT like the 1.8 binding
In HABmin its the Linked item:

Channels are what OH2 uses to link to hardware. So the command classes are linked to channels. The picture you showed above is the list of channels available in this device.

I don’t currently have any channels defined for blinds, so we’ll need to do this. In OH2, you MUST use the item type associated with the channel - you can’t select something different or it won’t work.

Ah oky but when i will create the thing with the HABmin ui it will create a switch_dimmer too.
And than the nummeric command work but not the UP DOWN and STOP command like in openHAB 1.8

Ahh ok it cant work at the moment? Can i help to create the right channels for the blinds?

No - but maybe tomorrow if we get the changes into the binding today…

Sure…

This is what the channels look like… If you can define the ones you want, and tell me what they are for, I can add them to the binding, and we can update the database for this device. Along with this, we should look at any configuration that’s needed - like the invert option.

    <!-- Blinds Position -->
    <channel-type id="blinds_position">
        <item-type>Number</item-type>
        <label>Blinds Position</label>
        <description>Indicates the position of the blinds
        </description>
        <category>Door</category>
    </channel-type>

Hmm okay but where i can get such informations or a template where i can write it?
There must be a source or i can write my own ideas?
Is there the same on the db from openHAB 1.8?

Well, you can either use what I put above as the template, or you can look at the ESH documentation.

If you write what you want here, I can add it to the binding once we agree.

The online database is derived from OH1, but enhanced with a LOT more information. I prefer to try and add all new devices there, and then export to both OH1 and OH2 to keep the definitions consistent.

ok I hope it’s no nonsense

   <!-- Invert State -->
    <channel-type id="invert_state">
        <item-type>Rollershutter</item-type>
        <label>Invert State</label>
        <description>Invert the Command UP and DOWN when invert_state is true
        </description>
        <category>Blinds</category>
    </channel-type>

   <!-- Invert Percent -->
    <channel-type id="invert_percent">
        <item-type>Rollershutter</item-type>
        <label>Invert Percent</label>
        <description>Invert Percent Command when 'invert_percent' option is true
        </description>
        <category>Blinds</category>
    </channel-type>

I understand why you need this … for creation off the thing but how will this turn up to down???

Unfortunately, this is configuration, not channel information…

For the channels, we need to define the item types / names etc. Configuration is handled in a totally different way - not through channels.

So, from this I assume you want to be able to invert the percentage and command - that’s fine. However, we still need to define the channels themselves - items are linked to channels, so if you can define the items (names/types etc), then we can make channels…

Hmm okay i am totaly Confused.
I will unterstand this because i have more zwave devices and i will help.
I thougt the Channel-Type was what you need. I Used the example from you aus a Template and modified it with the seh documentation.

My goal is to Say in the items file or in the gui Where the Link will create that up is down and that 100 is 0. so that the Icon is right and when i press up it sends a down Command. At the Moment my rollershutter close my Window when i press up and open it when i press down,

So, in OH2, a binding provides Channels, and items link to channels. What I need to define is the channels - so this is effectively the items if you’re thinking in OH1 terms.

A channel can then have configuration parameters, and this is where we will specify the invert parameters, but the first thing is to define what channels (items) we need.

The template I provided is what I need to add to the binding definitions, and it needs to define the items, and the item types, and item names…

I tried to take a picture of my understanding

I have no idea if my wish is possible.

and i made a second channel-type
`

Number Blinds Position Indicates the position of the blinds Blinds ` But where i need to put the invert stats???

So, the only channel required is blinds position? What about setting the position - is that the same channel? From what I could see in the definition of the FRG222, it looked like the command class to set the position, and to read it back was different? Is that not the case?

Don’t worry about this - I will put the configuration into the channel configuration. In HABmin, the configuration is provided in the channel list.

I can read and set the Position … this works. It is the "SWITCH_MULTILEVEL"
What i know with testing is that i can send nummeric values and the blind goes in his position … not right i need inverted but it works. I recieve a value and openHAB show it.

Ah there is the “SWITCH_BINARY” do you mean this. When i define a Switch and send On it goes up or down and off the other way. The FRG222 stops automaticly

This was my second Problem. The Power / Meter Value and the up down and stop from the other Diskusion.
At the moment i cant send UP and DOWN or STOP the Log show.

09:31:11.209 [WARN ] [ome.core.thing.internal.ThingManager] - Cannot delegate update 'UP' for item 'SZ_Rollershutter' to handler for channel 'zwave:device:155556ba178:node4:switch_dimmer:invert_percent', because no thing with the UID 'zwave:device:155556ba178:node4:switch_dimmer' could be found.
09:31:11.211 [WARN ] [ding.zwave.handler.ZWaveThingHandler] - NODE 4: Command for unknown channel zwave:device:155556ba178:node4:switch_multilevel with UpDownType

Ok, so do I understand then that currently the SWITCH_MULTILEVEL works fine for both setting and reading the position? If so, then I just need to add some configuration parameters to this.

This is because you are trying to address channels that don’t exist.

Yes it retrieves the Positions when i use the wallswitch and i can send a value for the Position.

Ok - sorry, I got confused as you also have another thread on the same topic where you said some of this device wasn’t working.

So, I’ll add a new channel with the invert config and that sounds like everything will be working :slight_smile:.