Skip to content

esp32_camera: Remove remaining references to i2c_pins-option from examples #5115

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

RubenKelevra
Copy link
Contributor

Description:

Small fix for the examples in ESP32_Camera to all show the new i2c:-block + i2c_id: option in ESP32_Camera, instead of the now undocumented i2c_pins: option.

Related issue (if applicable): discussed in #9601

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.

Copy link
Contributor

coderabbitai bot commented Jul 17, 2025

Walkthrough

The ESP32 camera component documentation was updated to replace deprecated inline I²C pin configuration with an explicit i2c component declaration. Example configurations now define the I²C bus separately and reference it by ID within the camera component, aligning with current configuration standards.

Changes

File(s) Change Summary
components/esp32_camera.rst Updated configuration examples to replace inline i2c_pins with explicit i2c component and i2c_id reference; added frame_buffer_location: DRAM in ESP32S3_EYE example.

Suggested labels

current


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8d5f966 and b7b6f4c.

📒 Files selected for processing (1)
  • components/esp32_camera.rst (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • components/esp32_camera.rst

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

netlify bot commented Jul 17, 2025

Deploy Preview for esphome ready!

Name Link
🔨 Latest commit d5a9527
🔍 Latest deploy log https://app.netlify.com/projects/esphome/deploys/6879d8bdcf54e500084a18b0
😎 Deploy Preview https://deploy-preview-5115--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.

@RubenKelevra RubenKelevra force-pushed the fix/esp32_camera_i2c_pins_references branch from 8cc6a99 to 9d6673b Compare July 17, 2025 18:33
@RubenKelevra RubenKelevra requested a review from jesserockz July 17, 2025 18:34
@RubenKelevra RubenKelevra force-pushed the fix/esp32_camera_i2c_pins_references branch from 9d6673b to cee252d Compare July 17, 2025 18:35
@RubenKelevra RubenKelevra force-pushed the fix/esp32_camera_i2c_pins_references branch from cee252d to 8d5f966 Compare July 17, 2025 19:13
…mples

- Remove deprecated configuration option
- Rework example for Freenove ESP32-S3-DevKitC-1 to use new
  `frame_buffer_location: PSRAM` option instead of external
  component
@RubenKelevra RubenKelevra force-pushed the fix/esp32_camera_i2c_pins_references branch from 8d5f966 to b7b6f4c Compare July 17, 2025 19:16
Copy link
Member

@jesserockz jesserockz left a comment

Choose a reason for hiding this comment

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

Please add the entry to the configuration variables list =)

@esphome esphome bot added the current label Jul 18, 2025
@RubenKelevra
Copy link
Contributor Author

@jesserockz wrote:

Please add the entry to the configuration variables list =)

I've added a minimal documentation to the next branch:

#5129

Maybe @MichaKersloot can add some details on when to use? :)

@jesserockz
Copy link
Member

I think it's only when the board doesn't have psram

@RubenKelevra
Copy link
Contributor Author

RubenKelevra commented Jul 18, 2025

Okay, but why then export this as option? Just detect that there's no psram and use dram in this case... or am I missing something?

@MichaKersloot
Copy link

No you do not miss something. To me it looks like there is some detection for PSRAM implemented somewhere (there is a log entry at boot for that). But somehow it does not work for all boards, in my case the TTGO T-journal. So an option to override this was needed for me.

There could be a better fix at a lower level, but that is way beyond my capabilities and this option at least makes the esp32_camera module useable for me now.

I tried to find the original discussion that leaded to this fix, but was unable to find it.

@RubenKelevra
Copy link
Contributor Author

Yeah I did a lot of fixing in the esp32-camera library in the last couple of days, I'll just have a look why it may fail.

I think I spotted the detection somewhere.

Can I mention you for testing with hardware? Because my hardware all got PSRAM.

@RubenKelevra RubenKelevra marked this pull request as draft July 18, 2025 10:31
@RubenKelevra
Copy link
Contributor Author

Let's suspend the PR for this time.

@MichaKersloot
Copy link

I'll be on holydays for a few weeks, so testing would not be possible for a while. Further the camera is in use, so switching between Home Assistent and current master releases of ESPHome is not that easy for me. That's the reason why my patch only applies to official releases and not to the current master.

Postponing this fix would mean ESPHome would not be useable for a couple of boards without my unofficial fix for the time being.

@RubenKelevra
Copy link
Contributor Author

Hey @MichaKersloot I'm not postponing a fix, I just think it should be automatic instead of a user decision.

I'll have a look if there's a detection and maybe it's just broken in the esp32-camera lib, when I'm home. I'm on the go right now.

If that's not possible, it's maybe possible to do this in ESPHome itself.

@MichaKersloot
Copy link

Hmm.. i've read my previous comment and I see it looks a bit grumpy. Sorry! Thank you for your time and effort to fix this. I'll try to make some time next week for this.

@RubenKelevra
Copy link
Contributor Author

No worries!

Enjoy your free time and just let me know if you got really the head and mind free to look at this. :)

I'll just mention you on everything I'll find about that topic.

@RubenKelevra
Copy link
Contributor Author

RubenKelevra commented Jul 18, 2025

@jesserockz alright, after reading the esp32-camera lib source code on that matter:

If we don't specify anything, the default would be PSRAM and there's no detection on steering this decision, not "auto" mode, no fallback.

So I was misremembering things - sorry.

So my suggestion would be to implement this setting like it's currently proposed, and then add in the future a third value, auto - if we implement some kind of automatic detection, which would try PSRAM first and if there's no PSRAM, it would fall back.

@RubenKelevra RubenKelevra marked this pull request as ready for review July 18, 2025 18:10
@RubenKelevra
Copy link
Contributor Author

I'll resubmit this changes for next, as they introduce the option which was just merged.

@RubenKelevra RubenKelevra deleted the fix/esp32_camera_i2c_pins_references branch July 18, 2025 19:37
@github-actions github-actions bot locked and limited conversation to collaborators Jul 20, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants