New Sonoff RF Bridge Board - Need Flashing Help

Maybe you will be able to help me - I can not find anywhere information what to add in the ESPHOME code to add sending data from the sensor (i only found the switch configuration) through the rf 433MHz transmitter so that SONOFF bridge can read it.
Thanks for the help!
My code below

sensor:
  - platform: ultrasonic
    trigger_pin: 33
    echo_pin: 32
    name: "Ultrasonic Sensor"
    update_interval: 5s    
    timeout: 2m
    filters:
    - filter_out: nan

tasmota or esphome?

Youā€™ll need to use a bit of C for that.
See here:

If you only need a threshold you can look into esphome automations and pick some arbitrary codes for ā€œbelowā€ and ā€œaboveā€ threshold. You could also do some intermediate ranges.
For that, see

2 Likes

solved, thanks. I used Mqtt explorer and found all signal needed.
now, how can i create binary sensor?
Payload is

20;3B;EV1527;ID=013771;SWITCH=06;CMD=ON;

Many thanks

Got the board all working, but having a hard time sniffing my remote for my Hunter Fan.

By chance has anyone used the Hunter Fan remote K6266-02? I see the signal, but just canā€™t figure how to get it to transmit properly in esphome.

Using URH
it blips the codes 3 times

here is a zoomed in version of the first bit of code.

looks like it sends
10101010101010101010101
then waits about 5 ms and sends
0001101001101101001101101101001101001001101101101001001001001001001001001101101101001101001101101001001101101101101001101101001001001101101001001001001001001001001101101001001101101101101101101101101000

which is over the 64 character limit for raw.

thanks

possibly this is the raw as wellā€¦

[10:14:23][D][remote.raw:028]: Received Raw: -653, 817, -440, 4511, -641, 390, -410, 393, -404, 396, -407, 395, -405, 392, -407, 393, -407, 393, -407, 395, -405, 395, -405, 395, -405, 395, -5202, 795, -407, 398, -800, 797, -405, 793, -407, 395, -802, 798, -404, 795, -405, 795, -405,
[10:14:23][D][remote.raw:028]: 393, -804, 798, -405, 395, -804, 396, -804, 796, -404, 795, -407, 793, -407, 393, -805, 395, -805, 395, -804, 398, -803, 397, -804, 396, -802, 400, -800, 397, -803, 795, -407, 795, -405, 795, -405, 395, -804, 793, -407, 395, -805, 795, -405, 795, -405,
[10:14:23][D][remote.raw:028]: 397, -803, 395, -804, 796, -405, 794, -407, 796, -404, 793, -405, 395, -805, 795, -407, 795, -405, 397, -800, 398, -802, 398, -802, 795, -407, 795, -407, 393, -802, 400, -803, 395, -804, 398, -802, 398, -802, 398, -801, 399, -802, 395, -805, 795, -405,
[10:14:23][D][remote.raw:041]: 797, -405, 393, -804, 398, -802, 795, -408, 792, -407, 793, -407, 793, -407, 790, -410, 792, -407, 793, -407, 795, -405, 395
[10:14:23][D][remote.raw:028]: Received Raw: 395, -407, 395, -403, 399, -401, 395, -407, 395, -402, 398, -405, 393, -407, 395, -404, 396, -404, 398, -402, 396, -404, 395, -5203, 799, -402, 396, -804, 795, -406, 792, -408, 394, -805, 795, -407, 793, -404, 796, -404, 398, -802, 793,
[10:14:23][D][remote.raw:028]: -407, 397, -803, 395, -805, 795, -407, 795, -405, 795, -404, 396, -802, 398, -802, 397, -803, 397, -802, 398, -805, 395, -805, 397, -802, 396, -804, 795, -405, 795, -406, 794, -405, 397, -803, 795, -405, 397, -802, 795, -406, 794, -406, 397, -802, 395,
[10:14:23][D][remote.raw:028]: -806, 796, -405, 793, -406, 794, -407, 792, -408, 392, -808, 795, -404, 795, -405, 395, -805, 397, -803, 397, -803, 795, -407, 793, -404, 404, -796, 398, -802, 395, -805, 397, -803, 395, -804, 396, -804, 398, -802, 398, -802, 795, -407, 795, -405, 395,
[10:14:23][D][remote.raw:041]: -802, 396, -804, 798, -405, 792, -407, 793, -407, 793, -407, 795, -405, 793, -407, 793, -407, 792, -407, 396
[10:14:23][D][remote.raw:028]: Received Raw: 395, -407, 395, -404, 394, -407, 398, -402, 395, -405, 395, -405, 395, -405, 395, -405, 395, -405, 397, -403, 397, -402, 398, -5202, 795, -407, 398, -800, 795, -407, 792, -405, 398, -802, 795, -407, 793, -407, 793, -405, 395, -804, 796,
[10:14:23][D][remote.raw:028]: -407, 392, -808, 390, -807, 795, -407, 795, -405, 793, -407, 393, -805, 395, -805, 397, -802, 400, -802, 395, -805, 395, -805, 395, -805, 397, -803, 797, -405, 793, -407, 414, -327, 63, -393, 400, -800, 795, -407, 398, -800, 797, -405, 796, -401, 395,
[10:14:23][D][remote.raw:028]: -805, 395, -805, 797, -405, 795, -405, 793, -407, 793, -407, 395, -802, 798, -404, 796, -404, 395, -803, 400, -806, 394, -802, 793, -409, 793, -404, 398, -802, 396, -805, 397, -802, 390, -810, 397, -803, 397, -803, 397, -802, 393, -807, 798, -404, 793,
[10:14:23][D][remote.raw:041]: -407, 393, -805, 397, -803, 795, -407, 795, -405, 795, -404, 796, -404, 795, -405, 795, -405, 793, -407, 795, -405, 395

Wow! This thread and in particular @mateine and @schmurtz have been amazing and really pushing the boundaries of this!

Iā€™ve successfully managed to flash RFLink onto my Sonoff RF bridge R2 v2.0 using the handy github tools posted here but I seem to be having issues reading the logs?

Device is connected to my MQTT broker - and on the home page itā€™s showing signals as recieved

but Iā€™m not able to see anything in any of my logs? I presume this is because the ā€œSuccessfully Decodedā€ box is completely empty - is that an issue with my settings or is it an issue with the soldering of my resistors?

Thanks!

1 Like

Thereā€™s been a slight update - overnight a lot more RF signals have been received and now some have been decoded! Still struggling to get it to decode my RF remote however - am I best just using the raw RF from something like ESPHome or can I tinker to get this to work?

And sorry for the spamā€¦ one further update! I decided to try ESPHome - and I think Iā€™m having similar issues to the previous posterā€¦ my raw data is being received like this - does this look right from a trace perspective @mateine? Thanks!

Received Raw: -580, 381, -390, 369, -405, 388, -385, 382, -390, 384, -388, 383, -388, 384, -390, 381, -391, 383, -391, 381, -390, 381, -3865, 769, -393, 381, -772, 385, -774, 386, -772, 385, -774, 383, -776, 384, -774, 383, -776, 384, -773, 386, -774,
383, -775, 385, -774, 769, -390, 384, -774, 383, -778, 775, -382, 382, -775, 770, -391, 381, -775, 771, -390, 382, -774, 768, -393, 766, -393, 767, -390, 767, -391, 769, -390, 381, -777, 770, -389, 381, -776, 770, -390, 769, -391, 766, -391, 383, -774,
769, -392, 768, -390, 384, -774, 769, -390, 384, -773, 770, -390, 381, -776, 386, -772, 385, -772, 764, -400, 767, -390, 381, -777, 386, -771, 771, -391, 767, -390, 767, -393, 770, -389, 767, -391, 766, -392, 768, -390, 770, -390, 767, -392, 767, -390,
768, -390, 767, -393, 769, -388, 764, -396, 766, -393, 767, -391, 766, -393, 381, -774, 772, -389, 768

It looks like the bridge is working fine, but the first part of the signal looks odd.
Does your rf device respond if you send the same raw sequence out?
If it does, then you can use raw codes, if it doesnā€™t, your device may be using more than one frequency to communicate (see FSK), in which case, youā€™ll need another kind of rf module to communicate with it (e.g cc1101).

Also:

  • do you see the same raw codes each time? Otherwise it could be a rolling code system.
  • what kind of device is it?

You seem to ve enjoying this, so I recommend you get an RTL-SDR to reverse engineer the signal directly in your pc :slight_smile:

Thanks @mateine! Turns out after a bit of tinkering Iā€™ve been able to get the raw signal working fine! The device responds as expected - although from the remote the codes are slightly different all the time but I guess no validation of rolling codes so not an issue at my end.

The device is actually a bioethanol stove - Planika PrimeFire

Will definitely look up an RTL-SDR however as having great fun with thisā€¦

1 Like

Home assistant controlling fire via rf: wife should be proud :grin:

Back to the original topic for a second, portisch not compatible with the new chip. Would it be possible in theory to take the portisch code and modify it to work on the new chip?

2 Likes

Portisch hasnā€™t been updated in a number of years Iā€™m afraid so unless someone wants to take up the mantle itā€™s looking unlikely

Yes, thatā€™s why I was asking if modifying the code would work in theory, if I should start looking into it, or would it need completely different code starting from scratch.

There is a topic about this over on github
The poster of this post says he was able to flash a modified version of Portish. Unfortunately there are no details, but you may find more info in the post.

Hi together, first of all, Iā€™m a beginner and excuse me for my bad english, Iā€™m a german person. I tried with no success to sniff the remote signal from Gumax. Iā€™ve 2 Sonoff bridges R2.2 and a R1, but Iā€™m not sure, if they already ok, or if they are damaged them with cutting and soldering. I flashed with portish, but I donā€™t receive any signal (from no remote) @Expello, do you have success with copying the signal from the remote? Can you give me a hint, or the signal. Maybe there is no need for me, to sniff the signal. Thank you in advance.

@mateine

I have Sonoff RF Bridge version 2.2 flashed with tasmota and still the original rf firmware and I do receive signals from the motion sensor translated to mqtt.
But the bridge is very slow with a delay of minimum 2 secs between motion detection and the flashing of the red and then almost immediately the blue led.
I suspect the the factory firmware only relays received RF data once the transmitting device stops.

If I do the hardware hack will this solve the delay.
Any ideas about this?

By the way is there a tool (HW or SW or both) to measure the RF signal which is sent by the device.?

For those who wanted the ā€œoscilloscopeā€ for the esphome raw dumps:
https://dbuezas.github.io/esphome-remote_receiver-oscilloscope/

2 Likes

I am not sure if this is tasmota or the decoder chip. What I can say for sure is that hardware mod + esphome have no delay, it is instantaneous. I donā€™t know if hardware mod + tasmota removes the delay or not.
To measure the signal sent by the device, you can hook an oscilloscope or digital analyzer to the pins of the ICs that the hardware mod connects to.

@mateine
Iā€™ve a 433Mhz RF STX882 en SRX882 and a NodeMCU ESP8266.
I will flash tasmota on it and do some testing to see what that gives.
I can do this only the end of the week but I keep you informed.