ESPHome RF Receiver too much noise

I’m trying to build an RF re-transmitter using ESPHome on a D1 mini. I have a 315MHz remote (FCC ID T99058404300) for my fireplace that I’m trying to essentially “clone” so that it can be operated over wifi with home-assistant.

All of my hardware looks correct:

  • Wemos D1 mini ESP8266
  • 315MHz receiver (and transmitter, but I’m not that far into using it yet)
  • Tried both USB power and a good 5v universal AC/DC switching PSU

Following the instructions for RF devices, I’ve come up with the following configuration. Everything seems fine, except there’s way too much noise if I’m looking at raw data (so much output that it’s unreadable). The rc_switch data is randomly coming in slowly, but doesn’t seem to be related to when I’m pressing buttons on the remote that I’m trying to read signals from.

Has anyone successfully set up a ESP8266 to read signals from random RF devices without so much noise so that you can find the correct signals to replicate?

Here’s my current config, pretty much copy/paste from the docs linked above

esphome:
  name: rf_controller
  platform: ESP8266
  board: d1_mini

wifi:
  ssid: "redacted"
  password: "redacted"
  ap:
    ssid: "Rf-Controller Fallback Hotspot"
    password: "redacted"
  
remote_receiver:
  pin: 
    number: D5
  dump: 
    - rc_switch
  tolerance: 50%
  filter: 100us
  idle: 4ms
  buffer_size: 2kb

captive_portal:

logger:
  level: DEBUG

api:

ota:

web_server:
  port: 80

I would like to find a solution for this too. The rf sonoff bridge with 433 devices after flashing with esphome has been quite reliable for me. im looking to do the same with 315 frequency as my gate operates at this frequency.

1 Like

I haven’t been able to find any good configuration or help, so I put this project aside :frowning:

I tried setting up the Sonoff Bridge with ESPhome, but haven’t had any luck with SENDING signals. I’ve got two RF remotes, one from a power strip and one from a power block, that both allow me to RECEIVE signals successfully, in the format of a 26 digit binary number (e.g. 10001000001100100000010100). However, I can’t decipher anything meaningful in the RAW mode and get tons of garbage signal. I dug into this for a bit, but ultimately would need a better receiver set-up, mainly in the form of an arduino with an RF receiver attached to figure out the preamble, duration of each bit, and even the general scheme. Ultimately, I’d love to emulate the remotes of those two power devices and have the ability to buy more RF receivers to send commands to, but I’ve not figured it out yet. Best of luck if you ever re-open this project…

Yeah, I purchased some of these transceivers from AliExpress. They just arrived today and I plugged the receiver module into a breadboard with a Wemos D1 mini and programmed it to the recommended RF values on ESPHome and it just continuously dumps out junk.

13:46:30][D][remote.raw:028]: Received Raw: 1425, -4133, 2209, -1795, 1172, -1827, 2521, -262, 304, -857, 3286, -779, 1215, -760, 2183, -3902, 2263, -658, 467, -458, 392, -1517, 2091, -2161, 2281, -676, 1098, -936, 1055, -1789, 415, -3365, 303, -330, 1326, -1357, 1162, -851, 1036, 
[13:46:30][D][remote.raw:041]:   -902, 1318, -738, 1218
[13:46:31][D][remote.raw:028]: Received Raw: 2254, -1729, 281, -1745, 861, -303, 338, -436, 525, -371, 635, -466, 872, -647, 2248, -276, 256, -759, 1509, -1297, 662, -579, 1185, -1748, 1199, -754, 662, -1372, 501, -384, 1363, -283, 2344, -1118, 1280, -742, 1174, -847, 2198, -1806, 
[13:46:31][D][remote.raw:041]:   1154, -1889, 778
[13:46:31][D][remote.raw:028]: Received Raw: 624, -1338, 2398, -1567, 992, -1036, 1711, -295, 266, -707, 274, -699, 525, -1318, 751, -455, 1382, -661, 1184, -859, 369, -524, 327, -571, 339, -1745, 1375, -988, 1541, -1139, 385, -627, 264, -889, 5869, -429, 1714, -413, 1348, -897, 1826, 
[13:46:31][D][remote.raw:041]:   -2171, 1562, -394
[13:46:31][D][remote.raw:028]: Received Raw: -1744, 697, -4721, 5414, -563, 512, -1438, 303, -1059, 548, -1419, 1491, -1260, 1127, -850, 2267, -717, 3592, -418, 1219, -786, 374, -626, 1665, -3556, 2973, -1803, 2211, -1814, 3730, -2008, 545, -1706, 2217, -802, 1189, -1243, 734, -1624, 
[13:46:31][D][remote.raw:041]:   690, -449, 851, -1217, 4133, -3830, 340, -7385, 372, -1490, 279
[13:46:31][D][remote.raw:041]: Received Raw: 576, -308, 1219, -754, 301, -820, 1060, -804, 4759, -1229, 524, -2491, 1978, -1848, 418, -829, 270, -672, 599, -1260, 1741, -5410, 1291, -699, 253, -736, 3491, -1649, 5130, -627, 294, -1845, 1279
[13:46:31][D][remote.raw:028]: Received Raw: 599, -438, 353, -2062, 295, -765, 359, -626, 2270, -5508, 3424, -1807, 3045, -1954, 1227, -751, 514, -1510, 329, -985, 2169, -320, 2979, -1185, 1192, -833, 1311, -3076, 1859, -838, 279, -640, 274, -919, 264, -513, 2609, -374, 508, -1580, 
[13:46:31][D][remote.raw:028]:   3153, -689, 332, -1771, 1319, -2776, 4233, -3256, 983, -4433, 2303, -2470, 710, -443, 3080, -817, 2990, -675, 841, -2716, 1193, -1753, 1636, -8380, 2191, -816, 3183, -901, 4085, -815, 2261, -4739, 1171, -4864, 414, -380, 2408, -1761, 309, -1753, 3116, 
[13:46:31][D][remote.raw:041]:   -832, 260
[13:46:31][D][remote.raw:041]: Received Raw: 537, -974, 284, -1633, 385, -611, 274, -2963, 1019, -2581, 5052, -3128, 2211, -583, 3367, -1720, 335, -408, 935, -332, 2426, -445, 516, -3179, 1741, -4766, 277, -1962, 632, -4168, 4132, -1918, 2239, -3518, 2534
[13:46:31][D][remote.raw:028]: Received Raw: 561, -1690, 1252, -424, 3412, -253, 1863, -810, 292, -741, 326, -637, 338, -656, 1330, -663, 395, -298, 1455, -1856, 256, -554, 881, -5320, 1408, -5615, 1260, -730, 364, -776, 4079, -756, 259, -758, 284, -469, 1159, -1142, 519, -411, 329, 
[13:46:31][D][remote.raw:041]:   -2678, 1246, -740, 2880, -2017, 494, -481, 4321, -842, 3206, -3757, 1558, -415, 2402, -1653, 2280, -3845, 1180, -432, 396, -1845, 5213, -1786, 302, -3709, 3363, -626, 379, -3335, 3600, -9159, 276, -289
[13:46:31][D][remote.raw:028]: Received Raw: -2888, 902, -1603, 440, -702, 296, -419, 296, -1653, 3539, -658, 1525, -817, 3908, -2420, 5217, -337, 2034, -4559, 2883, -1006, 349, -362, 2191, -411, 346, -725, 3497, -779, 310, -272, 534, -1483, 596, -9426, 409, -618, 2302, -679, 4294, 
[13:46:31][D][remote.raw:041]:   -2510, 327, -4848, 4265, -728, 9182, -739, 890, -2062, 4220, -1910, 2310, -693, 308, -656, 413, -1541, 2325, -782, 264, -526, 4491, -322, 656, -712, 3648, -2242, 337, -4518, 3752, -1458, 1524, -509, 4338, -1647, 1351, -673, 1735, -6176
[13:46:31][D][remote.raw:041]: Received Raw: -470, 602, -416, 2489, -495, 427, -1420, 379, -1808, 363, -1671, 2476, -592, 3492, -3424, 334, -8907, 1466, -2139, 696, -1428, 2326, -2688, 3168, -2791, 328, -565, 2452, -1647, 417, -1652, 1344, -2393
[13:46:31][D][remote.raw:041]: Received Raw: -445, 602, -311, 405, -473, 378, -327, 1663, -1023, 993, -714, 1124, -1022, 1153, -848
[13:46:31][D][remote.raw:041]: Received Raw: -1130, 8255, -2787, 7487, -3661, 3330
[13:46:32][D][remote.raw:028]: Received Raw: 1244, -1012, 706, -3278, 9254, -3666, 267, -351, 3700, -5258, 822, -5188, 5297, -5003, 1407, -3871, 1647, -270, 3383, -530, 3166, -601, 346, -2832, 288, -1601, 299, -3858, 372, -672, 2037, -260, 550, -5095, 5147, -1634, 559, -736, 3349, 
[13:46:32][D][remote.raw:041]:   -7504, 1167, -855, 2115, -1003, 3269, -1590, 538
[13:46:32][D][remote.raw:041]: Received Raw: 538, -635, 351, -373, 2772, -480, 1423, -4750, 3371, -2546, 5981, -769, 1612, -484, 1005, -2105, 280, -719, 1357, -1038, 920, -460, 772, -274, 2397, -7704, 2239, -3789, 257, -691, 1036, -5029
[13:46:33][D][remote.raw:028]: Received Raw: -963, 2361, -533, 3377, -756, 276, -832, 1428, -440, 437, -742, 4111, -6224, 266, -1299, 653, -263, 1679, -1240, 1426, -3412, 839, -1394, 6927, -537, 4415, -9015, 1541, -1590, 2128, -1079, 540, -4210, 270, -3763, 3080, -769, 420, -1653, 
[13:46:33][D][remote.raw:041]:   710, -1104, 3387, -2009, 7769, -1047, 340, -3638, 2251, -3808, 1814, -5210, 1144, -1952, 2352, -330, 935, -3985, 2454, -1807, 385, -1460, 620, -629, 275, -359, 3453, -928, 1425, -453, 781, -307, 697, -9062, 3294, -654, 334
[13:46:33][D][remote.raw:041]: Received Raw: 678, -697, 488, -5175, 446, -3689, 371, -996, 502, -661, 327, -532, 526, -1572, 2380, -1061, 1646, -3911, 7373, -1784, 4089
[13:46:33][D][remote.raw:028]: Received Raw: 268, -1354, 4310, -683, 251, -669, 297, -3694, 1438, -2503, 748, -1230, 284, -1017, 4563, -319, 1259, -2607, 978, -3105, 5495, -556, 2165, -9284, 765, -2812, 1100, -365, 1818, -547, 313, -2985, 5000, -626, 370, -284, 255, -251, 754, -1717, 
[13:46:33][D][remote.raw:028]:   1911, -3340, 475, -721, 267, -803, 1167, -1819, 760, -329, 727, -406, 994, -1000, 422, -1890, 3720, -2770, 456, -558, 2308, -651, 264, -777, 389, -2534, 393, -1762, 1397, -358, 2470, -7734, 3133, -2012, 628, -351, 373, -1895, 2789, -7089, 2040, -1654, 
[13:46:33][D][remote.raw:028]:   3631, -897, 543, -559, 1453, -362, 608, -2203, 631, -999, 1973, -1712, 6196, -702, 1093, -273, 506, -2649, 1366, -255, 1836, -2308, 4050, -1281, 1096, -836, 1968, -7615, 291, -2471, 874, -2713, 1159, -7952, 1487, -535, 2374, -507, 309, -342, 1439, 
[13:46:33](Message skipped because it was too big to fit in TCP buffer - This is only cosmetic)
[13:46:33][D][remote.raw:028]:   -709, 1603, -641, 795, -6653, 2789, -1012, 621, -702, 3198, -833, 1096, -1710, 2083, -2388, 1165, -1001, 2263, -997, 2434, -558, 265, -594, 1853, -1917, 748, -2397, 2541, -2693, 263, -859, 5315, -312, 842, -3556, 1829, -8134, 322, -280, 831, -1638, 
[13:46:33][D][remote.raw:041]:   283, -691, 1483
[13:46:33][D][remote.raw:028]: Received Raw: 7992, -2080, 4461, -1003, 1744, -736, 534, -3610, 454, -2229, 2317, -2538, 362, -3745, 2977, -332, 1224, -4224, 327, -3783, 2256, -1463, 877, -450, 1291, -1244, 555, -8303, 421, -1598, 1561, -674, 602, -7551, 1187, -3225, 1392, -1282, 2550, 
[13:46:33][D][remote.raw:041]:   -7312, 
[13:46:33][D][remote.raw:041]: Received Raw: -6915, 392, -1632, 947, -5444, 1702, -4608, 1840, -524, 2839, -2254, 491, -1897, 338, -5231, 7195, -1715, 904, -1042, 1322, -836, 2182, -4687, 2675, -451, 1328, -1316, 258, -860, 955, -1821, 295, -4192, 2469, -877, 1105, -706, 2254
[13:46:33][D][remote.raw:041]: Received Raw: 926, -605, 901, -654, 3383, -1833, 284, -1506, 997, -4052, 564, -801, 2327, -1551, 2005, -2860, 532, -454, 2286, -1817, 251, -2270, 2059, -387, 1614, -356, 2095, -985, 443, -586, 403, -539, 304
[13:46:33][D][remote.raw:041]: Received Raw: 314, -1167, 1619, -421, 1393, -1004, 2874, -587, 1579, -455, 410, -937, 2085, -1036, 640, -1929, 2126
[13:46:33][D][remote.raw:041]: Received Raw: 629, -313, 2421, -477, 3211, -483, 2291, -6294, 706, -271, 939, -2474, 410, -3364, 455, -8687, 5108, -285, 1931, -480, 1649, -7193, 6188
[13:46:33][D][remote.raw:028]: Received Raw: 1147, -819, 550, -1253, 2682, -2848, 2878, -1268, 2986, -840, 1587, -1660, 3970, -359, 530, -605, 2462, -8793, 5845, -2943, 4349, -3682, 1744, -1048, 575, -512, 9455, -3534, 1304, -1110, 807, -5941, 4324, -1751, 3438, -306, 1403, -8722, 
[13:46:33][D][remote.raw:041]:   280, -996, 1004, -1398, 2342, -733, 828, -5556, 2298, -1649, 1273, -1562, 400, -593, 1538, -408, 1419, -659, 5321, -2722, 422, -591, 569, -1405, 825, -2985, 1067, -1383, 884, -3771
[13:46:34][D][remote.raw:028]: Received Raw: -1091, 760, -712, 800, -4283, 836, -1806, 1737, -422, 1230, -1424, 1661, -4808, 337, -1356, 638, -2119, 857, -653, 343, -552, 946, -309, 1123, -335, 2904, -260, 612, -2693, 2921, -991, 628, -1643, 4192, -1141, 309, -745, 627, -7009, 1269, 
[13:46:34][D][remote.raw:028]:   -1506, 6155, -852, 2413, -552, 366, -4711, 495, -809, 305, -1463, 2606, -4259, 284, -548, 2745, -388, 1130, -629, 1610, -2561, 4035, -333, 476, -1165, 615, -466, 7194, -2898, 1361, -1484, 692, -9420, 5144, -947, 584, -1290, 386, -6079, 1832, -3568, 

Not really sure how to clean that up. I tried changing the filter, idle and tolerance values but none of them seem to make a difference. I don’t live in a busy area so I don’t expect any traffic on 433MHz band. In fact, I have a RTL-SDR and I’ve tuned 433MHz to watch my door/window sensor triggers and there’s nothing else going on – so I think everything this receiver is spitting out is noise. Maybe the things I bought are junk…

EDIT
I spoke too soon. I just tried using dump: rc_switch and was able to see more clearly:

remote_receiver:
  pin: D5
  dump: rc_switch
  tolerance: 50%
  filter: 10us
  idle: 4ms
  buffer_size: 2kb

Now the captures look more like this:

[14:00:53][D][remote.rc_switch:243]: Received RCSwitch Raw: protocol=3 data='111001000'
[14:01:28][D][remote.rc_switch:243]: Received RCSwitch Raw: protocol=1 data='11111111'
[14:01:28][D][remote.rc_switch:243]: Received RCSwitch Raw: protocol=1 data='11111111111'
[14:01:34][D][remote.rc_switch:243]: Received RCSwitch Raw: protocol=3 data='00010000'
[14:01:59][D][remote.rc_switch:243]: Received RCSwitch Raw: protocol=1 data='11111111'
[14:01:59][D][remote.rc_switch:243]: Received RCSwitch Raw: protocol=1 data='111111111'
[14:02:09][D][remote.rc_switch:243]: Received RCSwitch Raw: protocol=1 data='00000010'
1 Like

I didn’t have much luck with ESPHome dumping raw codes, and it was really hard to distinguish between noise and valid messages.

To decode a device’s protocol (i.e. pulse length, zero bit, one bit, sync bit, etc.), the best method I have found is to use Universal Radio Hacker and an RTL-SDR dongle. There is a great tutorial here.

Universal Radio Hacker allows me to capture and visualise the signals sent by a 433MHz remote, for example, and then figure out the protocol. It even has an autodetect feature, so it can sometimes figure out the protocol on its own.

After determining the protocol, I then move to ESPHome and set up a binary sensor (via remote receiver) with the relevant protocol settings. I usually create an associated switch (via remote transmitter) using the exact same protocol setup. With a 433MHz transmitter attached, I can then send out the same codes I am expecting to receive. Once again, using Universal Radio Hacker, I can confirm that the codes being sent from my switch within HA match up with the codes that were sent by the remote.

2 Likes

This is amazing. Thank you so much! I purchased a cheap $10 RTL-SDR dongle and dove into this today.

Turns out the remote that I have that is both listed online and stamped on the parts inside that says it’s 433MHz is actually sending 315MHz signals. No wonder I could not get anything useful from a esphome receiver.

My next step will be to see if I can replicate sending the same codes that I’m seeing.

1 Like

Now that I’ve got the codes, it turns out they’re too long! esphome says they must be 64bits, but URH is giving me 182. This mystery keeps going.

I’m facing the same problem!


remote_receiver:
  dump: rc_switch
  pin: 
    number: D1
# Settings to optimize recognition of RF devices
  tolerance: 25%
  filter: 35us
  idle: 3ms
  buffer_size: 1kb

I found that the above worked well for me! I got all the numbers from using a SDR and URH as mentioned above. This should at least give you some codes from the device. I used the above to create a smart doorbell. I just brought a cheap 433 doorbell from Amazon. Didn’t worry too much about it’s internal protocol, I think they are all very similar.
Hopefully the above helps anyone trying to do similar to me and ends up on this page!

2 Likes

Using URH and other tools, seems to output codes in hex. Problem is that esphome expects the codes to be numbers … ?

In case it helps, the actual frequency that this remote works on is 314.88Mhz. Also, the remote does not send single commands, it sends its current state (flame height, fan speed, rear burner off/on, etc.)