Esphome-cc1101 - unable to transmit or receive

So im running this for the esphome-cc1101 433mhz transceiver.

dbuezas/esphome-cc1101 Public

I have connected my my cc1101 as per the YAML, board is below

CC1101 Wireless Transceiver Module with SMA Antenna For Arduino 433MHZ (amptech.co.nz)

to 2x ESP8266 (WeeMos D1 Mini)

So, 1 ESP has 1 cc1101 attached, the other esp also has a cc1101 as above attached.

I have installed the library and flashed the default YAML in the REPO to both ESPs.

When opening one ESP, and choosing the Garage binary sensor,

And on another device opening the other ESP and choosing the Garage Button,

When I press the button, the Garage sensor does not change state.

Any ideas on this one?
This is all stock, untouched configuration from the repo, the library and YAML is all stock.

Thanks!

1 Like

So if I open the LOG on the ESP im using as a receiver, I can see its receiving the RAW code, which seems to spit out a random value each time. The code for the value being sent it.

code: [415,-300,370,-300,375,-300,378,-300,378,-300,379,-300,405]

But still, my output is not activating.

Is there a way to just make this a static code? Like 100?

Thanks

What is your expected result, exaclty?
How do you assess that the binary sensor does not change value on the receiving side?

Im just viewing the entity state in HA

Per ESPHome

Did you check the history of the sensor?

Yes, but not once did it turn on.

Paste the log, please

Ok sorry ive just tried to reporoduce and im no longer getting the code received by the receiver.

In the log of my transmitter, It states to be sending the command.

[23:43:09][D][button:010]: 'Garage' Pressed.
[23:43:09][D][remote_transmitter:075]: Sending remote code...
[23:43:10][D][button:010]: 'Garage' Pressed.
[23:43:10][D][remote_transmitter:075]: Sending remote code...
[23:43:11][D][button:010]: 'Garage' Pressed.
[23:43:11][D][remote_transmitter:075]: Sending remote code...

Ok sorry its receiving now. Here is the log.

[23:50:29][D][remote.raw:041]: Received Raw: 4261
[23:50:30][D][remote.raw:041]: Received Raw: 4236
[23:50:30][D][remote.raw:041]: Received Raw: 4238
[23:50:30][D][remote.raw:041]: Received Raw: 4220
[23:50:30][D][remote.raw:041]: Received Raw: 4221
[23:50:30][D][remote.raw:041]: Received Raw: 4217
[23:50:30][D][remote.raw:041]: Received Raw: 4220
[23:50:31][D][remote.raw:041]: Received Raw: 4203
[23:50:31][D][remote.raw:041]: Received Raw: 4247
[23:50:32][D][remote.raw:041]: Received Raw: 4230
[23:50:32][D][remote.raw:041]: Received Raw: 4246
[23:50:32][D][remote.raw:041]: Received Raw: 4222
[23:50:32][D][remote.raw:041]: Received Raw: 4214
[23:50:33][D][remote.raw:041]: Received Raw: 4238

Thank you!

Transmitter YAML

# https://github.com/dbuezas/esphome-cc1101
esphome:
  name: rf-transmitter
  platform: ESP8266
  board: d1_mini
  includes:
    - cc1101.h
  libraries:
    - SPI
    - "SmartRC-CC1101-Driver-Lib"

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

logger:
api:
ota:

sensor:
  - platform: custom
    lambda: |-
      auto my_sensor = new CC1101(
        D5, // SCK
        D6, // MISO
        D7, // MOSI
        D3, // CSN
        D1, // GDO0
        D2, // GDO2
        200, // bandwidth_in_khz
        433.92 // freq_in_mhz
      );
      App.register_component(my_sensor);
      return {my_sensor};
    sensors:
      id: transciver
      internal: true
remote_transmitter:
  - pin: D1 # This is GDO0
    carrier_duty_percent: 100%

remote_receiver:
  - pin: D1 # This is GDO0
      # on the esp8266 use any of D1,D2,D5,D6,D7,Rx
      # Don't use D3,D4,D8,TX, boot often fails.
      # Can't be D0 or GPIO17 b/c no interrupts
    dump:
      - raw
button:
  - platform: template
    name: Garage
    on_press:
      - lambda: get_cc1101(transciver).beginTransmission();
      - remote_transmitter.transmit_raw:
          code: [415,-300,370,-300,375,-300,378,-300,378,-300,379,-300,405]
      - lambda: get_cc1101(transciver).endTransmission();

Receiver YAML

# https://github.com/dbuezas/esphome-cc1101
esphome:
  name: rf-receiver
  platform: ESP8266
  board: d1_mini
  includes:
    - cc1101.h
  libraries:
    - SPI
    - "SmartRC-CC1101-Driver-Lib"

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

logger:
api:
ota:

sensor:
  - platform: custom
    lambda: |-
      auto my_sensor = new CC1101(
        D5, // SCK
        D6, // MISO
        D7, // MOSI
        D3, // CSN
        D1, // GDO0
        D2, // GDO2
        200, // bandwidth_in_khz
        433.92 // freq_in_mhz
      );
      App.register_component(my_sensor);
      return {my_sensor};
    sensors:
      id: transciver
      internal: true
remote_transmitter:
  - pin: D1 # This is GDO0
    carrier_duty_percent: 100%

remote_receiver:
  - pin: D1 # This is GDO0
      # on the esp8266 use any of D1,D2,D5,D6,D7,Rx
      # Don't use D3,D4,D8,TX, boot often fails.
      # Can't be D0 or GPIO17 b/c no interrupts
    dump:
      - raw
binary_sensor:
  - platform: remote_receiver
    name: Garage
    raw:
      code: [415,-300,370,-300,375,-300,378,-300,378,-300,379,-300,405]

Receiver is pretty random, indeed.
Are you sure it’s wired properly? Otherwise, I’m clueless

I am 100% sure it is wired correctly, ive been over it 3 times haha.

I’m lost.