MQTT to control existing Insteon device

Openhab 2.5.6~S150-1 (Build #150)
running on raspberry pi.
Using MQTT 2.x

Hi All,

My pool light is controlled via a Insteon wall outlet, and this works fine within openhab.

I’ve built a small arduino switch that I would like to use to control this light as well.

I’ve got MQTT setup, and when I turn the insteon switch on/off within the UI, I see the commands published to the MQTT Command Topic

However the issue is when I manually publish commands to the stateTopic for the light I see the UI update the state of the pool light, but the actual insteon device does not change state.

How can I get the insteon device to respond to the MQTT bus commands? I’m pretty sure I had something similar to this working with the 1.x MQTT, however now I can’t get it working.

Thanks everyone, appreciate your thoughts.

MQTT Broket setup via Paper Ui

Pool light Item
Switch Pool_Light "Pool Light" <light> (Outside) ["Lighting"] {insteonplm="41.8D.81:0x000039#topoutlet", channel="mqtt:topic:pool:poollight"}

Pool Light MQTT setup

Thing mqtt:topic:pool "Pool MQTT" (mqtt:broker:bc6c747f){
Channels:
        Type switch : poollight "Pool Light" [ stateTopic="kolcun/outdoor/pool/light", commandTopic="kolcun/outdoor/pool/light/command",on="on", off="off" ]
}

You need to configure the Thing to treat incoming messages as commands. I don’t do .things files so can’t tell you what the name of the property is. This will cause the binding to sendCommand to the Pool_Light Item when it receives the message on the stateTopic. By default it uses postUpdate and postUpdate only updates the Item’s state, it does not go out to any bindings and therefore does not go out to the devices.

So when the binding receives a message it will command the Item with the new state and that command will then go on to the Insteon binding.

NOTE: There is a 2.x version of the Insteon binding. With that binding, you would use the follow profile to cause the Insteon channel to follow the MQTT channel on that Item.

Fantastic - thanks for the quick reply. After a second pass I do see the configuration noted in the documentation.

I added postCommand="true" to my configuration and it now works as I wanted - items sent to the stateTopic are treated as commands.

Thanks!

Thing mqtt:topic:pool "Pool MQTT" (mqtt:broker:bc6c747f){
Channels:
        Type switch : poollight "Pool Light" [ stateTopic="kolcun/outdoor/pool/light", commandTopic="kolcun/outdoor/pool/light/command", on="on", off="off", postCommand="true" ]
}

I’ll have to switch over to the 2.x Insteon binding too - just haven’t got around to that yet.

Not clear what you are expecting here?
The stateTopic that you set in openHAB is usually set to the topic that the target device transmits to report its status.
Since as far as the target device is concerned, that is something that it sends out, I wouldn’t expect it to take any notice at all of you “manually publishing” (I guess with mqtt.fx or something?) to that topic. It simply isn’t listening.