Une astuce pour mieux utiliser son Sonoff RF Bridge sous Tasmota : ne pas utiliser de switch pour les télécommandes mais piloter directement les switchs désirés.
Cela permet d'économiser l'utilisation d'un switch virtuel, ça améliore aussi (un peu !) la réactivité, ça simplifie Domoticz et on gagne aussi quelques caractères dans la définitions des rules qui sont limitées à 1 000c par rule (un peu plus en pratique), soit 3 000c au total.
On peut aussi parfois éviter l'utilisation d'un lua pour gérer le switch télécommande.
Exemple avec switch intermédiaire (2 télécommandes : 1 à 4 boutons et 1 à 2 boutons) soit 761 caractères pour rule2
Code : Tout sélectionner
rule2
on rfreceived#Data=9AEE04 do publish domoticz/in {"command":"switchlight","idx":4239,"switchcmd":"Set Level","level":00} endon
on rfreceived#Data=9AEE01 do publish domoticz/in {"command":"switchlight","idx":4239,"switchcmd":"Set Level","level":10} endon
on rfreceived#Data=9AEE08 do publish domoticz/in {"command":"switchlight","idx":4239,"switchcmd":"Set Level","level":20} endon
on rfreceived#Data=9AEE02 do publish domoticz/in {"command":"switchlight","idx":4239,"switchcmd":"Set Level","level":30} endon
on rfreceived#Data=908004 do publish domoticz/in {"command":"switchlight","idx":4299,"switchcmd":"Set Level","level":00} endon
on rfreceived#Data=908001 do publish domoticz/in {"command":"switchlight","idx":4299,"switchcmd":"Set Level","level":10} endon
Exemple avec envoi direct (3 télécommandes à 2 boutons) soit 655 caractères pour rule3
Code : Tout sélectionner
rule3
on rfreceived#Data=A8B6E8 do publish domoticz/in {"command":"switchlight","idx":2289,"switchcmd":"On"} endon
on rfreceived#Data=A8B6E4 do publish domoticz/in {"command":"switchlight","idx":2287,"switchcmd":"On"} endon
on rfreceived#Data=C96CA1 do publish domoticz/in {"command":"switchlight","idx":2024,"switchcmd":"On"} endon
on rfreceived#Data=C96CA2 do publish domoticz/in {"command":"switchlight","idx":2024,"switchcmd":"Off"} endon
on rfreceived#Data=2BDFA4 do publish domoticz/in {"command":"switchlight","idx":1379,"switchcmd":"On"} endon
on rfreceived#Data=2BDFA2 do publish domoticz/in {"command":"switchlight","idx":1379,"switchcmd":"Off"} endon