- Platform information:
- Hardware: RPi2
- OS: Openhabian 2.4.0-1 (Release Build)
- Java Runtime Environment: OpenJDK Runtime Environment (Zulu126.96.36.199-CA-linux_aarch32hf) (build 1.8.0_222-b178)
- openHAB version: 2.4)I guess_
- Issue of the topic: I cannot make the Thing’s ON/OFF channel send a command message when the state is changed.
- Please post configurations (if applicable):
- Items configuration related to the issue: two Tasmotas as generic MQTT things, linked automatically.
- Services configuration related to the issue: Mosquitto running on another RPi2 and .
I just started playing with OpenHab several days ago. Installed/configured OpenHabian, separate Pi for MQTT broker&databases. Basic functionality works, as far as I can tell.
I have two Tasmotas. One is monitoring some switch. On every switch flip it posts its state to the topic cmnd/custom-topic/SWITCH
Second sits in another room and has a relay attached and is subscribed to the standard cmnd/relay/Power .
What I am trying to achieve is, basically, a wireless/mqtt/openhab switch extender. When switch changes its state, so must do the remote relay. Later I plan to add some more logic to this (that’s why I do not send the right command just from the Switch Tasmota to Relay one), but I decided to start simple.
Switch (controlling) Tasmotas is configured as Generic MQTT Thing. Is has On/Off Switch type channel with state topic and command topic. State topic is cmnd/custom-topic/SWITCH . Command topic is cmnd/relay/Power, with Is command enabled.
Problem is, the command is never published. The state topic is monitored OK, I can see the widget changes accordingly. The relay itself works: I can trigger it from mqtt client. I even created an auxiliary “switch” channel with command topic only for cmnd/relay/Power and I can use it to trigger relay manually. But for the main switch channel, I cannot make the incoming mqtt message to trigger the outbound command.
I found this Trigger a rule by MQTT command? topic but it made things less obvious to me. Before reading it I hoped that there’s something simple that I am missing. But I read about MQTT Bridge publishTrigger and did not understand a bit. What is the purpose of that channel, what will trigger what and generally what would be the use case for this feature – documentation left me puzzled. I played with this option, but it gave me nothing (and I did not really understand what this channel is doing)
PS Pretty much everything was configured from PaperUI.