Hello all and merry christmas.
I’m at my wits end and have been searching/trying different stuff to try to get mqtt working in OH3.
Background:
I have OH2.5 working via text files and is planning to migrate to OH3 using text files as well.
But trying to migrate so It uses correct OH3 semantics etc and not just copy the whole thing over
But I struggle with MQTT.
In OH2.5 a normal number item would look like this:
Number Melcloud_1_roomTemperature { channel="melcloud:acdevice:XXXX:XXXX:roomTemperature", mqtt=">[broker1:home/openhab/temperature/melcloud1roomtemperature/state:state:*:${state}]" }
Meaning if I change the switch, it will also send this via MQTT outgoing.
Number Melcloud_1_roomTemperature { channel="melcloud:acdevice:xxxx:xxxxx:roomTemperature", channel="mqtt:topic:myAuthentificatedBroker:melcloudMQTT:Melcloud_1_roomTemperature" }
But no values are ever sent out (or in for that matter)
I read somewhere that I could just use normal .items that I used in OH2.5 in OH3.2, but that does not seem to work either.
The reason why I want to do it this way is so I can have power over the mqtt path.
Maybe the only solution is to make rules for every item and path?
Could someone help me troubleshoot (well, maybe not right now since its christmas eve haha) ?
Cheers!
Your Thing melcloudMQTT has a Channel Melcloud_1_powerMQTT which has a single property stateTopic. This means that this Channel, and any Items linked to this Channel, will only receive MQTT messages into openHAB.
In order to send/publish MQTT messages you also need a commandTopic property in your Channel. Any linked Items that you command will then cause an outgoing message to your MQTT broker.
In terms of your Item: you have this linked to a KNX Channel, and your MQTT channel. NOTE: if the Item state is changed via your KNX Channel, this will not be forwarded on to your MQTT Channel because state changes from bindings come in as updates, not commands.
I would have a search around for the follow profile feature in these forums (on phone so tricky to link at the moment) - that may do what you want.
Check the fundamentals first: is openHAB correctly connected to your MQTT broker? Is your MQTT broker running? You could use MQTT Explorer to check the activity at your MQTT broker.