- Platform information:
- Hardware: CPUArchitecture/RAM/storage i5/16GB/256GB
- OS: _what OS is used and which version_Ubuntu 20.04
- Java Runtime Environment: _which java platform is used and what version_openJDK 11
- openHAB version:3.0.0
- Issue of the topic: Ligth switch that needs to publish a json string at on or off
So I have a Zigbee Blizwolf plugg, a Tasmota 9.2 Coordinator and what to control this by MQTT.
On the “on” action I need to publish a command and a jason string.
so basacly to publish “{“device”:“Plug1”,“send”:{“Power”:“On”}}” to /cmnd/ZBBridge/ZbSend
This did not work:
Thing:
Channells:
Type switch : Plug1 [stateTopic=“stat/ZBBridge/RESULT”, commandTopic=“cmnd/ZBBridge/ZbSend”, on="{“device”:“Plug1”,“send”:{“Power”:“On”}}", off="…"]
Item:
Switch Plug1 “Plug1” {channel=“mqtt:topic:tele:ZBBridge:Plug1”}
Should I define switch as a string??
Thanks