Hallo zusammen!
Für den Shelly i3 mit Tasmota Firmware schreibe ich hier mein MQTT Template für die Einbindung in FHEM. Es ist an "tasmota_2channel_spit" angelehnt. Getestet mit Tasmota 9.2.0.
# shelly i3 3 channel input switches
name:tasmota_3channel_split
filter:TYPE=MQTT2_DEVICE:FILTER=readingList=.*(tele|cmnd|stat).*
desc:shelly i3 3 channel device flashed with Tasmota. <br>NOTE: a second and third device will be created for the second and third channel
order:A_03
par:CMNDTOPIC;Command topic prefix, without trailing /;{ AttrVal("DEVICE","readingList","") =~ m,([^:]*)\b(tele|cmnd|stat)(/.*)?/LWT:, ? "${1}cmnd$3" : undef }
par:STATTOPIC;ack topic prefix, without trailing /;{ AttrVal("DEVICE","readingList","") =~ m,([^:]*)\b(tele|cmnd|stat)(/.*)?/LWT:, ? "${1}stat$3" : undef }
par:CALLSPEECHRECOGN;Set this to 0 to not set any speech recogn. related attributes;{ 1 }
par:SETCHANNELINFO;Set this to 0 to not set any speech recogn. related attributes;{ 1 }
set DEVICE attrTemplate tasmota_basic_state_power1 \CALLSPEECHRECOGN=0
copy DEVICE DEVICE_CH2
deleteattr DEVICE_CH2 alias
attr DEVICE_CH2 readingList \
STATTOPIC/POWER2:.* state
attr DEVICE_CH2 jsonMap POWER1:0 POWER2:0 POWER3:0
attr DEVICE_CH2 setList \
off:noArg CMNDTOPIC/POWER2 0\
on:noArg CMNDTOPIC/POWER2 1\
toggle:noArg CMNDTOPIC/POWER2 2
attr DEVICE_CH2 setStateList on off toggle
copy DEVICE_CH2 DEVICE_CH3
attr DEVICE_CH3 readingList \
STATTOPIC/POWER3:.* state
attr DEVICE_CH3 setList \
off:noArg CMNDTOPIC/POWER3 0\
on:noArg CMNDTOPIC/POWER3 1\
toggle:noArg CMNDTOPIC/POWER3 2
attr DEVICE,DEVICE_CH2,DEVICE_CH3 model tasmota_3channel_split
setreading DEVICE,DEVICE_CH2,DEVICE_CH3 attrTemplateVersion 20210305
option:{SETCHANNELINFO}
set DEVICE attrTemplate set_associatedWith \CHANNELS=3
option:{ CALLSPEECHRECOGN }
set DEVICE,DEVICE_CH2,DEVICE_CH3 attrTemplate speechcontrol_type_switch
In der Tasmota Config für den i3 musste ich allerdings drei GPIO Pins als Pseudo-Relais setzen, da sonst alle Eingänge über MQTT immer nur als "POWER" gesendet werden.
Meine GPIO Config ist:
template {"NAME":"Shelly i3","GPIO":[224,0,0,0,0,0,0,0,193,194,192,225,226,4736],"FLAG":0,"BASE":18}