Sonoff issues

Hello, I’ve been struggling with this issue for weeks.

I’ve installed many Sonoff devices, I made the following configurations:

mqtt.cfg:

raspberrypi.url=tcp://127.0.0.1:1883
raspberrypi.clientId=openHAB2
raspberrypi.user=openhabian
raspberrypi.pwd=password

sonoff.items:

Switch Abajur_light “Abajur” (LR, gLight)
{ mqtt=">[raspberrypi:tasmota/sonoff-abajur/cmnd/POWER:command:*:default],
<[raspberrypi:tasmota/sonoff-abajur/cmnd/POWER:state:default]" }

Switch Sala_estar_light “Sala de estar” (LR, gLight)
{ mqtt=">[raspberrypi:tasmota/sonoff-sala/cmnd/POWER1:command:*:default],
<[raspberrypi:tasmota/sonoff-sala/cmnd/POWER1:state:default]" }

Switch Sala_jantar_middle_light “Sala de Jantar meio” (LR, gLight)
{ mqtt=">[raspberrypi:tasmota/sonoff-sala/cmnd/POWER2:command:*:default],
<[raspberrypi:tasmota/sonoff-sala/cmnd/POWER2:state:default]" }

Switch Sala_jantar_edge_light “Sala de Jantar pontas” (LR, gLight)
{ mqtt=">[raspberrypi:tasmota/sonoff-sala/cmnd/POWER3:command:*:default],
<[raspberrypi:tasmota/sonoff-sala/cmnd/POWER3:state:default]" }

Switch Sacada_light “Sacada” (LR, gLight)
{ mqtt=">[raspberrypi:tasmota/sonoff-sala/cmnd/POWER4:command:*:default],
<[raspberrypi:tasmota/sonoff-sala/cmnd/POWER4:state:default]" }

Switch Banheiro_corredor_light “Banheiro corredor” (LR, gLight)
{ mqtt=">[raspberrypi:tasmota/sonoff-banheirocorredor/cmnd/POWER:command:*:default],
<[raspberrypi:tasmota/sonoff-banheirocorredor/cmnd/POWER:state:default]" }

Switch Quarto_crianca_light “Quarto criancas” (LR, gLight)
{ mqtt=">[raspberrypi:tasmota/sonoff-quartocrianca/cmnd/POWER:command:*:default],
<[raspberrypi:tasmota/sonoff-quartocrianca/cmnd/POWER:state:default]" }

Switch Espelho_banheirocorredor_light “Banheiro corredor espelho” (LR, gLight)
{ mqtt=">[raspberrypi:tasmota/sonoff-espelho-banheirocorredor/cmnd/POWER:command:*:default],
<[raspberrypi:tasmota/sonoff-espelho-banheirocorredor/cmnd/POWER:state:default]" }

Switch Cozinha_mesa_light “Cozinha mesa” (LR, gLight)
{ mqtt=">[raspberrypi:tasmota/sonoff-cozinha/cmnd/POWER1:command:*:default],
<[raspberrypi:tasmota/sonoff-cozinha/cmnd/POWER1:state:default]" }

Switch Lavanderia_light “Lavanderia” (LR, gLight)
{ mqtt=">[raspberrypi:tasmota/sonoff-cozinha/cmnd/POWER2:command:*:default],
<[raspberrypi:tasmota/sonoff-cozinha/cmnd/POWER2:state:default]" }

Switch Cozinha_light “Cozinha” (LR, gLight)
{ mqtt=">[raspberrypi:tasmota/sonoff-cozinha/cmnd/POWER3:command:*:default],
<[raspberrypi:tasmota/sonoff-cozinha/cmnd/POWER3:state:default]" }

Switch Espelho_banheirosuite_light “Banheiro suite espelho” (LR, gLight)
{ mqtt=">[raspberrypi:tasmota/sonoff-espelho-banheirosuite/cmnd/POWER:command:*:default],
<[raspberrypi:tasmota/sonoff-espelho-banheirosuite/cmnd/POWER:state:default]" }

Switch Escritorio_light “Escritório” (LR, gLight)
{ mqtt=">[raspberrypi:tasmota/sonoff-escritorio/cmnd/POWER:command:*:default],
<[raspberrypi:tasmota/sonoff-escritorio/cmnd/POWER:state:default]" }

Switch Entrada_suite_light “Entrada suíte” (LR, gLight)
{ mqtt=">[raspberrypi:tasmota/sonoff-entradasuite/cmnd/POWER:command:*:default],
<[raspberrypi:tasmota/sonoff-entradasuite/cmnd/POWER:state:default]" }

Switch Suite_light “Suíte” (LR, gLight)
{ mqtt=">[raspberrypi:tasmota/sonoff-suite/cmnd/POWER:command:*:default],
<[raspberrypi:tasmota/sonoff-suite/cmnd/POWER:state:default]" }

Switch Corredor_light “Corredor” (LR, gLight)
{ mqtt=">[raspberrypi:tasmota/sonoff-corredor/cmnd/POWER:command:*:default],
<[raspberrypi:tasmota/sonoff-corredor/cmnd/POWER:state:default]" }

the sitemap is:

Frame label=“Luzes” {
Switch item=Abajur_light label="Abajur"
Switch item=Sala_estar_light label="Sala de estar"
Switch item=Sala_jantar_middle_light label="Sala de Jantar meio"
Switch item=Sala_jantar_edge_light label="Sala de Jantar pontas"
Switch item=Sacada_light label="Sacada"
Switch item=Banheiro_corredor_light label="Banheiro corredor"
Switch item=Quarto_crianca_light label="Quarto criancas"
Switch item=Espelho_banheirocorredor_light label="Banheiro corredor espelho"
Switch item=Cozinha_mesa_light label="Cozinha mesa"
Switch item=Lavanderia_light label="Lavanderia"
Switch item=Cozinha_light label="Cozinha"
Switch item=Espelho_banheirosuite_light label="Banheiro suite espelho"
Switch item=Escritorio_light label="Escritório"
Switch item=Entrada_suite_light label="Entrada suíte"
Switch item=Suite_light label="Suíte"
Switch item=Corredor_light label=“Corredor”
} // Luzes

I can see from the Sonoff’s Console that all the devices are correctly subscribed at MQTT. However only two switches are really working: the Abajur_light and Quarto_crianca_light. The others doesn’t work at all, even if only I have copied and pasted the mqtt commands, changing them according to the topics…

I’m using the 4CH Sonoff in two places, the others are the the Basic and TH versions.

I’d appreciate any help.

Paulo