Skip to content

Conversation

@lygris
Copy link

@lygris lygris commented Nov 13, 2025

Description:

Adding docs for CC1101 component

Related issue (if applicable): fixes

Pull request in esphome with YAML changes (if applicable):

Checklist:

  • I am merging into next because this is new documentation that has a matching pull-request in esphome as linked above.
    or

  • I am merging into current because this is a fix, change and/or adjustment in the current documentation and is not for a new component or feature.

  • Link added in /components/index.rst when creating new documents for new components or cookbook.

New Component Images

If you are adding a new component to ESPHome, you can automatically generate a standardized black and white component name image for the documentation.

To generate a component image:

  1. Comment on this pull request with the following command, replacing COMPONENT_NAME with your component name in UPPER_CASE format with underscores (e.g., BME280, SHT3X, DALLAS_TEMP):

    @esphomebot generate image COMPONENT_NAME
    
  2. The ESPHome bot will respond with a downloadable ZIP file containing the SVG image.

  3. Extract the SVG file and place it in the images/ folder of this repository.

  4. Use the image in your component's index table entry in /components/index.rst.

Example: For a component called "DHT22 Temperature Sensor", use:

@esphomebot generate image DHT22

@netlify
Copy link

netlify bot commented Nov 13, 2025

Deploy Preview for esphome ready!

Name Link
🔨 Latest commit 9488c62
🔍 Latest deploy log https://app.netlify.com/projects/esphome/deploys/691d411919f9d500082d2d18
😎 Deploy Preview https://deploy-preview-5614--esphome.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@esphome esphome bot marked this pull request as draft November 19, 2025 02:53
@esphome
Copy link

esphome bot commented Nov 19, 2025

Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍

Learn more about our pull request process.

pin: GPIOXX # CC1101 GDO0
dump: all
```

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need modify the pin config that will fail validation and not work, see: https://esphome.io/components/sx127x/#as-a-transmitter--receiver

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can copy the example from my docs. Claude is really good at it too and can do it in a few seconds.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think fixed it correctly in the latest commit?

output: true
pullup: true
open_drain: true
allow_other_uses: true
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still missing this in remote transmitter:

  eot_level: false
  on_transmit:
    then:
      - sx127x.set_mode_standby
      - remote_transmitter.digital_write: false
      - sx127x.set_mode_tx
  on_complete:
    then:
      - sx127x.set_mode_standby
      - remote_transmitter.digital_write: true
      - sx127x.set_mode_rx

- cc1101.begin_tx:
on_complete:
then:
- cc1101.end_tx:
Copy link
Member

@swoboda1337 swoboda1337 Nov 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You really need to do the same thing as the sx127x when using the same pin:

  eot_level: false
  on_transmit:
    then:
      - sx127x.set_mode_standby
      - remote_transmitter.digital_write: false
      - sx127x.set_mode_tx
  on_complete:
    then:
      - sx127x.set_mode_standby
      - remote_transmitter.digital_write: true
      - sx127x.set_mode_rx

Since the pin is configured as open drain it needs special handling. With open drain it is actively driven low by the chip but passively pulled up by the pull up. In rx the transmitter needs to be set the pin to high. By setting it to high the chip no longer drives the pin and the receiver is able to drive it (only the pullup is connected). Before switching to transmit its best to set the radio to idle, then drive the pin low and only then switch to tx. This avoids transmitting 'on' before remote transmitter starts. When switching to rx it is the same thing in reverse.

What you have won't work without the remote_transmitter.digital_write calls

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had to double check the code because i thought that was still in there by default, but I must have removed the Idle state on transistions from RX>TX and vice versa. I'll get it corrected tomorrow and add an idle state in.

Do you prefer it to be setup like your example or can i just wrap all the code inside of the begin_tx and end_tx to make it simpler on the user config side?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, dont try to call remote transmitter from inside cc1101

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants