Issue of the topic: I’d like to forward updates of a Number item to an MQTT topic
Please post configurations (if applicable):
items
Number Buero_Temperature "Temperatur [%.2f °C]" <temperature> (Buero) {channel="mqtt:topic:panic:home_bus_knx_5_0:21", channel="mqtt:topic:panic:home_bus_can_node20:a10" [profile="follow"]}
things
Bridge mqtt:broker:panic [...] {
Thing topic home_bus_knx_5_0 "KNX" @ "Untergeschoss" {
Channels:
Type number : 11 [stateTopic="home/bus/knx/5/0/11"]
Type number : 21 [stateTopic="home/bus/knx/5/0/21"]
// ...
}
Thing topic home_bus_can_node20 "CAN" @ "Node 20" {
Channels:
Type number : a10 [stateTopic="home/can/node20/analog10", commandTopic="home/can/node20/analog10"]
// ...
}
// ...
}
The read-only channel “home_bus_knx_5_0:21” works well, the Item’s state is updated according to the sensor’s changes.
I expected that the changes are forwarded to all channels with “follow” profile, but nothing happens on the
“home_bus_can_node20:a10” channel. I’ve also tried to set postCommand=true on this channel, but it makes no difference.
The problem is not on MQTT side, as publishing from a rule works.
What am I doing wrong?
The goal is to forward data from a KNX bus to a CAN bus (both via an MQTT for reasons).
Your current Buero_Temperature setup has the follow profile listening for state updates coming in on MQTT channel a10. The follow will transform that into a command to the linked Item. If the linked Item has any conventional non-follow links to bindings, the Item command wil be forwarded to the binding, MQTT channel home_bus_knx_5_0:21 in this case.
That means, the documentation here is wrong:
“any state that is sent to an Item will be forwarded from this Item to any linked Channel with the follow Profile”
It is actually not, the configuration works as expected after a restart.
Ah, you may have fallen victim to the annoying bug where openHAB sometimes doesn’t properly register changes made to Things files. You can restart openHAB, or do this.