a switch-control channel per switch (please be aware that you’ll need two GA send the state to the wall switch, the first GA is to send the state, the second GA is to receive the command from the wall switch)
link both channels (the wall switch channel and the mqtt actuator channel) to the same Switch Item
The knx channel will receive the command via 4/0/3 (and also 4/0/2, but knx will never send on this GA). openHAB will send the state of the mqtt device via 4/0/2 to knx, so the indicator within the push button will show the state of the mqtt device.
Well, it depends…
The correct setting in knx is, to use unique GA for different functionality.
Given a switch actuator with some CO, 1=switch command, 2=switch state, 3=scene…
and a wall switch with two buttons, each with only one CO.
The first button is used to toggle the actuator, the second button is used to send a central OFF command.
So we need three GA, e.g. 1/0/0 → switch light, 1/0/1 → state of light 2/0/0 → all OFF
You’ll have to configure the actuator as follows:
1 → GA 1/0/0,2/0/0 (so the actuator will receive commands via both GA)
2 → GA 1/0/1 (only the actuator is allowed to send the state)
And the wall switch
1 → GA 1/0/0,1/0/1, (toggle dependent of the current state)
2 → GA 2/0/0 , (send only OFF [0])
So the wall switch 1 will send 1 or 0, depending on its own state.
The actuator will receive the command and will send the new state
The switch will change its state to the real state of the actuator.
The wall switch 2 will send 0 which will result in switching off all linked actuators. The wall switch 1 will receive the new state and change its own state, so it will always send a 1 if the actuator is off.
If you want to use more than one wall switch (“Wechselschaltung”), just copy the configuration from the first wall switch, no additional GA needed.
All wall switches will be notified of changes, regardless if they were issued from another wall switch, from central OFF, or even from a scene command. Keep in mind that these are different GA, and some of them are not simple Bit GA, so you can’t link them to the wall switch, you’ll need the real state of the actuator.
For simple wall switches without any additional actuator link (only send commands to openHAB) you may get away with one GA.
If using an extra CO for the indicator, you will have to configure both COs with the same GA for state.
After a few days of using it like you explained, i have to say, that it is not working as it should.
I can switch the mqtt-relais for my light with openhab-webinterface and with the knx-wall-switch. But i tested it on different times the last few days and often i had to push the knx-switch twice the first time, to switch the light on. After that it works like it should do.
Do i have to add the “<” sign in the knx.things for the second ga (Rückmeldung)?
Now i have it his way like you described:
[ ga="4/0/2+4/0/3" ]
First ga is my switch ga and second ga is my status (Rückmeldung).
Should i connect the status-ga with a led for further investigations?
I flashed the application with ETS to the wall-switch a second time - do i have to put the switch twice for the first time after i did that or will the wall-switch read out the status-ga from openhab? On my knx-only installation, the switch can read out the status without any help - even after flashing it new.