StNick
(Nickolay Gerasimenko)
July 17, 2017, 10:05pm
1
I have Relay connected via MCP23017 Binding which have ACTIVE Pin state as LOW (0)
but in OH Switch ACTIVE state is HIGH (1)
How can I configure Switch via Item or Sitemap to inverse default behaviour?
So far I emulate state inversion by placing two icon file
lamp-off.png - for YELLOW LED (ON state)
lamp-on.png - for BLACK LED (OFF state)
But it’s sounds like a hack… besides that I still have wrong color for blue slider.
StNick
(Nickolay Gerasimenko)
July 18, 2017, 4:47am
3
namraccr:
How have you configured the default (as described in the docs)?
Sorry, how to do that?
looks like I travel all over docs, but didn’t see such thing.
namraccr
(namraccr)
July 18, 2017, 11:14am
4
From here :
Switch Test2 "Test 2" (Tests) { mcp23017="{ address:21, pin:'B1', mode:'DIGITAL_OUTPUT', defaultState:'LOW'}" }
StNick
(Nickolay Gerasimenko)
July 18, 2017, 11:20am
5
namraccr:
LOW
it’s different thing, but not what I’m asking for.
Let’s gerenralize question without binding to this particular interface.
How to force switch send LOW level when I’m pull slider to right(i.e. turn-on Action) from BasicUI?
StNick
(Nickolay Gerasimenko)
July 19, 2017, 8:42am
6
guys any ideas?
Is this reasonable question?
did you ever figure out how to invert the logic?
StNick
(Nickolay Gerasimenko)
November 7, 2018, 1:31pm
8
For my task I made workaround, As I know there is now such possibility inside OH.
vzorglub
(Vincent Regaud)
November 14, 2018, 9:56am
9
And could you share your workaround, please?
Thanks
Halvhjearne
(Halvhjearne)
December 22, 2018, 12:49pm
10
if you are using the mcp23017 binding, the only way i found, was to either make a second switch and a rule to flip it or you can invert the logic in the binding and recompile it.
StNick
(Nickolay Gerasimenko)
December 22, 2018, 1:59pm
11
yep, it’s what I’ve done.