To control a Shelly (in this example Shelly Plus 1) using MQTT simply use these files:
shelly.things:
Thing mqtt:topic:m25entrancelight (mqtt:broker:mosquitto) {
Channels:
Type switch : switch "M25EntranceLight" [
stateTopic="bridge/m25/wifi/m25entrancelight/status/switch:0",
transformationPattern="JSONPATH:$.output",
commandTopic="bridge/m25/wifi/m25entrancelight/rpc",
formatBeforePublish="{\"src\":\"MQTT\",\"method\":\"Switch.Set\", \"params\":{\"id\":0,\"on\":%s}}",
on="true",
off="false"
]
}
shelly.items:
Switch M25EntranceLightSwitch "M25 Entrance Light Switch" <switch> { channel="mqtt:topic:m25entrancelight:switch" }