I know, it’s perhaps not 100% openHAB-related. But…
I have a TP-Link smart WiFi Plug, which I use to switch a Light on and off.
The Light can be triggered via openHAB (UI, rule, whatever) and
I’d like to also trigger the light with my KNX sensor (switch)
and that’s the part of my question: I like the LED on the sensor to indicate, whether the light is on.
So: I configured the TP-Link HS110 as a Thing and I linked the “switch”-channel to an item and I also linked the KNX-channel to the item:
The KNX-channel is configured as follows:
How about a switch-control channel for the knx status (1/0/3) and linking it using the follow-profile to the TP-Link channel?
Something similar to this , except that the first channel ist you TP-Link switching channel.
Not sure if it is the best practice, but i have solved that with an additional channel just for the status LED of my switch, since i am always facing problems when trying to do this in one channel and more than one group adress configured.
My setup (which i think should be logically similar to yours):
Light is connected via mqtt and configured via openHAB
Switch is a configured KNX one and connected to openHAB
Switch has Buttons and Status LEDs available via communication objects
I have a channel that is doing the usual “switch job” and one that is taking care of the status group adress.
hmm… I did the following with the item KNXFlurKeller_FlurLichtRuckmeldung:
the KNX channel is a switch channel with 1/0/3 and the TP-Link channel is with follow for the “Betrieb”-Channel:
But unfortunately, neither the item KNXFlurKeller_FlurLichtRuckmeldung changes according to the “real” items - and of course no telegram is sent to 1/0/3:
2021-01-31 15:49:41.849 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'KNXFlurKeller_FlurLicht' received command ON
2021-01-31 15:49:41.860 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'TPLinkPL12Keller_Betrieb' received command ON
2021-01-31 15:49:41.871 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'KNXFlurKeller_FlurLicht' predicted to become ON
2021-01-31 15:49:41.882 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'TPLinkPL12Keller_Betrieb' predicted to become ON
2021-01-31 15:49:41.889 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'KNXFlurKeller_FlurLicht' changed from OFF to ON
2021-01-31 15:49:41.893 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'TPLinkPL12Keller_Betrieb' changed from OFF to ON
2021-01-31 15:49:43.950 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'KNXFlurKeller_FlurLicht' received command OFF
2021-01-31 15:49:43.956 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'TPLinkPL12Keller_Betrieb' received command OFF
2021-01-31 15:49:43.968 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'KNXFlurKeller_FlurLicht' predicted to become OFF
2021-01-31 15:49:43.974 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'TPLinkPL12Keller_Betrieb' predicted to become OFF
2021-01-31 15:49:43.980 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'KNXFlurKeller_FlurLicht' changed from ON to OFF
2021-01-31 15:49:43.986 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'TPLinkPL12Keller_Betrieb' changed from ON to OFF
That would work also I guess, but if I finally find the time to integrate the “KNX” switch actuator for the cellar, then I have to rework everything… but on the other hand… Why do I need “KNX logic” for something “non KNX”…? need to think about it.
Maybe there was a misunderstanding.
I have no knx logic in place at all.
Just separate (openHAB/Thing) channels for status and command.
In my ets project i have configured the switch and its status led to one group adress like i would have done it anyway in my case.