Hi All- I am facing problem to configure my relay switch with via RF. I have a RF receiver connected to relay via Arduino Uno module. I am able to turn on and off relay using a arduino code with Sonoff remote. I wanted the control via Homeassistant switch so i bought a Sonoff RF bridge, flashed with Tasmota, enabled MQTT, but i am not able to control or configure HA switch to pass the load to turn on an off. I have gone through so many threads but not able to nail this, any one has a clear steps. Many thanks. One thing i have noticed is via control with Remote the RF code is hex code while what i see in Sonoff bridge is Decimal code…Although i tried permutation and combination in payload…nothing works…heellpppppp
this mite help
Thanks stephen - i did try this, but i am getting a switch state which is dictated by sensor so i have to use remote always. I dont want to use the remote instead toggle of switch in HA to operate,
so what happens
when you use the services call
in the Developer tools
remember to match the topic to your topic
and the code to your code.
Just had a brain fart
in the console of the rf you see something like
MQT: tele/tasmota/RESULT = {"Time":"2020-05-27T18:59:06","RfReceived":{"Data":"0x7028D2","Bits":24,"Protocol":1,"Pulse":238}}
this
{"Data":"0x7028D2","Bits":24,"Protocol":1,"Pulse":238}
is the data you want to send back to the rf bridge
try this
I see this in my sonoff rf console, not sure why there is difference in format
17:03:36.098 MQT: tele/rf-bridge/RESULT = {“Time”:“2021-09-10T17:03:36”,“RfReceived”:{“Sync”:7640,“Low”:270,“High”:750,“Data”:“768858”,“RfKey”:“None”}}
I am finally able to publish via a switch in HA
This is what i could come up with
- platform: mqtt
name: “Bathroom Light”
command_topic: “cmnd/rf-bridge/Backlog”
availability_topic: “tele/rf-bridge/LWT”
payload_available: “Online”
payload_not_available: “Offline”
state_topic: “tele/rf-bridge/RESULT”
value_template: ‘{{value_json.RfCode}}’
payload_on: “RfSync 7640; RfLow 270; RfHigh 750; RfCode #768851”
payload_off: “RfSync 7640; RfLow 270; RfHigh 750; RfCode #768852”
state_on: “#768851”
state_off: “#768852”
optimistic: true
retain: false
qos: 2
Now i am having brain struggle to get a adruino nano code going to get the relays working. I am using Adruino Nano with RF reciever . Figured out that i need to use rc-switch library but since i am noob in programming - not able to figure out code.
… so pointer will help
Can any one direct me to Arduino code?