Couldn’t really find what I was looking and imagine this has happened to others.
I have a WaterCop Water Shutoff Valve. Was able to get it connected and found in the z-wave database.I added it as a simple switch. Here’s where it gets a little weird.
When you switch the valve ON it actually is closing the valve. When you switch the valve OFF it opens the valve. Not a huge deal as I can just switch things around in a rule but in the sitemap it shows as “ON” when closed and “OFF” when open.
Can this be changed in the binding? Is there something you add to a switch to change the on/off?
I have a similar problem, where I would need some help.
I’m using a MCP23017 as outputs to drive a relay board. It’s a low trigger board - so a low level output will close and trigger the relay. It’s working fine but due to this, it’s working reverse.
So I created a second switch and a rule to get the inverse result, e.g:
Switch Output1 … = the switch I will work in my openhab environment
Switch InvertedOutput1 … = the switch which works with the MCP23017 and the relay board
My switches with the correct output (= Output1: switch closed --> relay closed) are in a group, e.g. gOutputs. My rule reacts to changed of this group.
With triggeringItem.name and triggeringItem.state I get the values and would like to forward the opposite reaction to my corresponding switch InvertedOutputX
But I would like to create only one rule for all the members of this group.
For this I would like to add a String in front of the Switch item in my rule.
So I tried to use SendCommand(“Inverted”+triggeringItem.name, OFF/ON), but it’s not working.
Yes, you’re absolutely right - sendCommand is correct - but that’t not my fault.
I don’t really have more information about the binding - like mentioned is it a binding for the I2C Port Expander MCP23017 working on Raspberry Pi3.
Here is my rule:
rule “MCP23017 Switch Ausgänge invertieren”
Member of gAusgaenge changed
if(triggeringItem.state == ON)
2019-02-04 19:23:57.043 [ERROR] [ntime.internal.engine.RuleEngineImpl] - Rule ‘MCP23017 Switch Ausgänge invertieren’: An error occurred during the script execution: Could not invoke method: org.eclipse.smarthome.model.script.actions.BusEvent.sendCommand(java.lang.String,java.lang.String) on instance: null