Hello all,
I am trying to control a 16:1 multiplexer and I am using the GPIO binding for the Openhabianpi. The thing is that I know how to toggle the gpio pins on and off and I am currently able to select a single input which I have given. But as soon as I want to select another input channel, then it doesn’t work.
Lets start with the code, it is in demo.items.
Group:Switch:OR(ON,OFF) ch0 “Channel0”
Switch select0 “SELECT0” (ch0) { gpio= “pin:19 activelow:yes initialValue:low” }
Switch select1 “SELECT1” (ch0) { gpio= “pin:5 activelow:yes initialValue:low” }
Switch select2 “SELECT2” (ch0) { gpio= “pin:6 activelow:yes initialValue:low” }
Switch select3 “SELECT3” (ch0) { gpio= “pin:13 activelow:yes initialValue:low” }
Switch enable “Enable” (ch0) { gpio= “pin:18 activelow:yes initialValue:low” }
Group:Switch:OR(ON,OFF) ch1 “Channel1”
Switch select4 “SELECT4” (ch1) { gpio= “pin:19 activelow:yes initialValue:high” }
Switch select5 “SELECT5” (ch1) { gpio= “pin:5 activelow:yes initialValue:low” }
Switch select6 “SELECT6” (ch1) { gpio= “pin:6 activelow:yes initialValue:low” }
Switch select7 “SELECT7” (ch1) { gpio= “pin:13 activelow:yes initialValue:low” }
Switch enable1 “Enable1” (ch1) { gpio= “pin:18 activelow:yes initialValue:low” }
The gpio pins are controlling the 4 select pins. So in the UI if I toggle the channel 1, then the MUX is selecting my first input, however, as soon as I toggle the channel 2, the MUX doesn’t select the input at the second channel.
I am thinking that I will have to make some kind of rule or add a method in the demo.items. Can someone suggest a possible solution?
Thank you!