How can we update a topic all channels if any one channel update?

   Thing topic CMI_3456 "CMI" @ "keller" {
    Channels:

    Type number : Thv1 [stateTopic="3456/cmi042047/heatpump", transformationPattern="JSONPATH:$.[0].value"]

    Type number : Thr1 [stateTopic="3456/cmi042047/heatpump", transformationPattern="JSONPATH:$.[1].value"]

    Type number : Twpr1 [stateTopic="3456/cmi042047/heatpump", transformationPattern="JSONPATH:$.[2].value"]  

    }  

There is a topic "CMI_3456 ", and three-channel have bound with this topic, now if there is any update of single-channel, I want to publish the whole object, including updated channel value.

Set up a new Item and channel for your publishing, using commandTopic.
Write a rule triggered from any of the input Items changing, calculate your new payload (make a JSON string maybe?) and command your new Item with it.

:wave::wave: Welcome to the openHAB forum.
Maybe I’m missunderstsnding, so let me try to rephrase your request.
You want to publish (what?) if any of those shown channels gets an update?
Since all those channels are bound to the same stateTopic, each new MQTT message on this topic will cause an update of ALL those channels.
Are you trying to publish something else in this event , in this case use @rossko57s advice.

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.