I'm a total newcomer into Sonoff and MQTT... I successfully flashed a latest model of RF 433 bridge, and can learn my existing remote I use for some lights and shutters. Keys in the web and via RfKey[x] work fine. However, I would like to integrate the controls into Home assistant via MQTT, and cannot figure how to get the correct codes to send via RfCode.
If I just add a single MQTT command as e.g. 'sonoffhub/cmnd/RfKey1', that works fine, but I can only switch something on or off with a single entry.
I assume I need to configure my MQTT command_topic as 'sonoffhub/cmnd/RfCode' and send different payloads for turning different switches on and off. I just cannot figure out the actual codes... I see for example:
sonoffhub/RESULT {"RfReceived":{"Sync":11410,"Low":370,"High":1070,"Data":"151015","RfKey":1}}
Can I manually convert this to the correct RfCode?
Thanks for any help or pointers on where to read more.
I suppose that You'll need to set these parameters first:
"High":1070 with command
RfHigh | 2..32767 | Set high pulse time in microseconds
"Low":370 -
RfLow | 2..32767 | Set low pulse time in microseconds
"Sync":11410 -
RfSync | 2..32767 | Set start sync pulse time in microseconds
Then send payload which You can get from "Data":"151015"
RfCode | 1..8388607 | Send 24-bit user code using RfSync, RfLow and RfHigh timing
If Your data in hex then use
RfCode | #1..#7FFFFF
Read more You can here : https://github.com/arendst/Sonoff-Tasmota/wiki/Commands
To see other codes from remote You can in Web interface console of Your device. Just open it and press desired button.
Thanks, I understand now... RfHigh, Low and Sync store the settings for my system, and I can just send the correct data via RfCode.
I have a old 433Mhz wireless socket at home and want to control that socket with the Sonoff RF Bridge with Tasmota running. Can someone explain exactly with all the steps what i have to do, to control the socket with the RF Bridge. When i click the Remote of the Socket i receive a message. But how can i send a command that the socket will be switch? Thanks!
There is a another problem. What the Rfbridge shows as monitored code is not really the correct code.
For example: sent Intertechno Code #150555 with Rf-Remote.
RfBridge monitored:
20:35:54 MQT: tele/sonoff-8E8329/RESULT = {"RfReceived":{"Sync":11350,"Low":360,"High":1090,"Data":"15155F","RfKey":"None"}}
Sent this code from RfBridge the poweroutlet didnt react.
Sending the code #150555 with the Rfbridge switches the poweroutlet too.
Maybe this helps to find the "learning bug"
Hi jannnfe,
example for item Switch:
Switch Sideboard "Sideboard" (LR,gLight) [ "Lighting" ]
{ mqtt=">[broker:cmnd/sonoff-8E8329/Backlog:command:ON:RfSync 11320; RfLow 360; RfHigh 1090; RfCode #150151],
[broker:cmnd/sonoff-8E8329/Backlog:command:OFF:RfSync 11320; RfLow 360; RfHigh 1090; RfCode #150154]" }
Thanks but now I've already managed to control my devices. Thanks for your help!
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue will be auto-closed because there hasn't been any activity for a few months. Feel free to open a new one if you still experience this problem.
Most helpful comment
Hi jannnfe,
example for item Switch:
Switch Sideboard "Sideboard" (LR,gLight) [ "Lighting" ]
{ mqtt=">[broker:cmnd/sonoff-8E8329/Backlog:command:ON:RfSync 11320; RfLow 360; RfHigh 1090; RfCode #150151],