The latest Openhab ver 2.5.10 broke my MQTT V1.1 setup so I decided to start the migration to MQTT V2.5. I created a test install to ensure I fully understand the setup before committing to my working setup. I ran into a problem and would appreciate some help.
Problem: Built a single switch item for a tasmota switch, controlled by MQTT. The openhab switch works properly via sitemap to turn on/off the tasmota switch. Manually switching the tasmota on/off does not update openhab. I added an EXPIRE but it only turns off the openhab switch and does not send an OFF via MQTT. What am I doing wrong?
I did find this same issue with MQTT1.1 but the solution does not fit V2.5.
Environment: Ubuntu 18, server MQTT, Openhab 2.5.10-1 (running stable)
I setup the MQTT system broker connection via PaperUI (Test-openhab) and it’s online.
Bridge mqtt:systemBroker:Test-openhab
{
Thing topic switches "Switches" {
Channels:
Type switch : courtyard "courtyard"
[ stateTopic="tasmota/courtyard/stat/POWER",
commandTopic="tasmota/courtyard/cmnd/POWER",
postCommand=true
]
}
Item:
Switch shelly_courtyard <switch>
{ channel="mqtt:topic:Test-openhab:switches:courtyard",
expire="5s,state=OFF",
autoupdate="false" }