Hi,
I could use some help in configuring my MODBUS binding inputs. I am using a Wellpro WP8026 ADAM and use it to get input of window contacts.
Connection and setup of the Wellpro and modbus binding all work fine.
The only issue I have is the module is I have a closed contact when my window is closed. A closed contact gives a value of 1 on the Wellpro device.
So when I configure my window contacts as follows
Contact ContactDeurKeuken “Deur keuken [%s]” (gRaam) {modbus=“wp8026:8”}
I get OPEN when it’s closed and CLOSED when it’s open (as it reads 1 for closed windows and 0 for open windows).
I tried creating a mapping file raam.map with
1=CLOSED
0=OPEN
and change the config to
Contact ContactRaamTerrasBoven “Raam terras boven [%s]” (gRaam) {modbus="<[wp8026:0:transformation=raam]"}
and multiple syntax variations but it doesn’t seem to work, I’m doing something wrong. I always get an error like
2017-09-09 17:39:00.076 [WARN ] [nding.modbus.internal.Transformation] - Could not transform item state ‘OPEN’ (of type OpenClosedType) to a State! Command as string ‘OPEN’, transformed string ‘raam’, transformation 'raam’
2017-09-09 17:39:00.079 [WARN ] [b.core.events.EventPublisherDelegate] - given new state is NULL, couldn’t post update for ‘ContactRaamTerrasBoven’
Anyone an idea?
I read the modbus binding documentation several times and this is the section I presume is the relevant one, but I can’t figure out how to apply the below info.
The binding documentation mentions
Read
When the binding interprets and converts polled input registers (input) or holding registers (holding) to openHAB items, the process goes like this:
register(s) are first parsed to a number (see below for the details, exact logic depends on valuetype)
2a. if the item is Switch or Contact: zero is converted CLOSED / OFF. Other numbers are converted to OPEN / ON.
2b. if the item is Number: the value is used as is
transformation is done to the value, if configured. The transformation output (string) is parsed to state using item’s accepted state types (e.g. number, or CLOSED/OPEN).
How should I change my contact definition to show an CLOSED window with Wellpro providing 1 as input ?