How to create OH2 Item to send mqtt command to Sonoff 433 RF Bridge

Hi,

I don’t know how to create OH item to send command to Sonoff RF Bridge (Tasmota) and need yours help.

I need to send to rf bridge something like this mosquitto_pub -t /cmnd/bridge/RfKey1 -n and rf bridge transmit learned code in “slot” 1.

Everything works well when i use mosquito_pub but I don’t know how to create OH item to send command to mqtt topic with message null.

pls help.

AD1: I find solution/workaround with MAP transformation.

Switch NAME “Description” { mqtt=">[broker:cmnd/bridge/RfKey1:command:ON:MAP(mytrans.map)]", autoupdate=“false” }

in mytrans.map i put ON=NULL

Have you better solution?

Hello Enris,

this has been discussed in every detail in various tutorials, articles and threads just like this one. Please use the search function t find everything you need.

String BR1_snd1 “RfSend1 [%s]” { mqtt=">[myhome:cmnd/Sonoff_RF1/RfKey1:command:*:Learned sent]" }