Skip to content

Update cli.rst to include aioesphomeapi docs #4991

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

Merged
merged 5 commits into from
Jun 19, 2025
Merged

Conversation

shvmm
Copy link
Contributor

@shvmm shvmm commented Jun 11, 2025

Description:

include aioesphomeapi docs related to API based logging and device discovery

Related issue (if applicable): fixes

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

  • esphome/esphome#

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 Jun 11, 2025

Walkthrough

The ESPHome CLI documentation was updated with a new section detailing the logging tools provided by ESPHome. This addition explains the differences between API-based and serial logging, introduces relevant CLI commands for log viewing and device discovery, and provides usage examples and references.

Changes

File Change Summary
guides/cli.rst Added a section on ESPHome logging tools, describing API/serial logging, CLI commands, and examples.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant CLI
    participant ESPHome Device

    User->>CLI: Run aioesphomeapi-logs with device IP
    CLI->>ESPHome Device: Connect via API
    ESPHome Device-->>CLI: Stream logs
    CLI-->>User: Display logs
    User->>CLI: Press CTRL+C to exit
    CLI-->>ESPHome Device: Disconnect

    User->>CLI: Run aioesphomeapi-discover
    CLI->>ESPHome Device: Broadcast discovery request
    ESPHome Device-->>CLI: Respond with device info
    CLI-->>User: Display device summary table
Loading

Suggested reviewers

  • jesserockz

📜 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 bc3539b and 825d042.

📒 Files selected for processing (1)
  • guides/cli.rst (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • guides/cli.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
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (5)
guides/cli.rst (5)

288-292: Fix heading formatting and grammar for logging section

  • Change "logging interface" to plural "logging interfaces" and introduce a colon before enumeration.
  • Ensure the underline length matches the heading text length in reStructuredText.

Suggested diff:

- Using logging tools supplied with ESPHome
- -----------------------------------
+ Using logging tools supplied with ESPHome
+ ========================================
 
- There are two types of logging interface supplied with ESPHome. API and Serial AKA UART logging.
+ There are two types of logging interfaces supplied with ESPHome: API and Serial (UART) logging.

291-296: Improve wording and capitalization in serial and API logging descriptions

  • Lowercase "There" after comma in the serial logging sentence.
  • Replace "crude API based logging uses" with "basic API-based logging use" for clarity.
  • Combine sentences for better flow.
- For serial logging, There are many options including web.esphome.io and ESPHome CLI's ``run``
- command.
+ For serial logging, there are many options including web.esphome.io and the ESPHome CLI ``run`` command.

- For crude API based logging uses, one can use the `aioesphomeapi-logs` command bundled with ESPHome.
- Very useful when an ESP device is located in a remote/inaccessible location.
+ For basic API-based logging use, you can use the ``aioesphomeapi-logs`` command bundled with ESPHome,
+ which is especially useful when an ESP device is located in a remote or inaccessible location.

298-304: Clarify logging command syntax examples

  • Specify “IPv4 or IPv6” in full and note when quoting may be required in some shells.
- aioesphomeapi-logs <IPv4/v6 address>
+ aioesphomeapi-logs <IPv4 or IPv6 address>
+
+.. note::
+   On some shells, you may need to quote IPv6 addresses, e.g.:
+   ``aioesphomeapi-logs "[fe80::1]"``.

312-314: Format keypress instructions with inline literals
Use code formatting for key combinations for consistency:

- Press CTRL+C to exit from the logging view.
+ Press ``CTRL+C`` to exit the logging view.

321-324: Fix apostrophe and suggest using a table for discovery output

  • Remove the stray apostrophe after "devices".
  • Present the fields in a proper reStructuredText table for clarity.
- The response lists info about currently available ESPHome devices'
- ``Status |Name |Address |MAC |Version |Platform |Board``
+ The response lists info about currently available ESPHome devices:
+
+.. list-table::
+   :header-rows: 1
+
+   * - Status
+     - Name
+     - Address
+     - MAC
+     - Version
+     - Platform
+     - Board
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between a103f13 and 785367b.

📒 Files selected for processing (1)
  • guides/cli.rst (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
`**`: - Do not generate or add any sequence diagrams

**: - Do not generate or add any sequence diagrams

  • guides/cli.rst
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: build

Copy link

netlify bot commented Jun 11, 2025

Deploy Preview for esphome ready!

Name Link
🔨 Latest commit 825d042
🔍 Latest deploy log https://app.netlify.com/projects/esphome/deploys/684a8cf0e622be00086447ce
😎 Deploy Preview https://deploy-preview-4991--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.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (5)
guides/cli.rst (5)

289-290: Underline length mismatch for new section
The underline below “Using logging tools supplied with ESPHome” must match its character count exactly to render properly in RST.


291-293: Grammar and capitalization in introduction
Use “interfaces” (plural) instead of “interface” and lowercase “there” in “For serial logging, there are many options…”.


295-297: Inline literal and phrasing for API logging
Replace “For crude API based logging uses, one can use the aioesphomeapi-logs command…” with “For API-based logging, use the aioesphomeapi-logs command…”. Also, use double backticks for inline code.


329-331: Incorrect apostrophe and formatting for device info
Change the apostrophe after “devices” to a colon and consider using an RST list or table directive instead of inline code for the Status | Name | Address | MAC | Version | Platform | Board output.


332-336: Verify “See Also” section styling
Ensure the “See Also” links match the rest of the documentation’s formatting (indentation, link style, hyphen usage).

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 785367b and bc3539b.

📒 Files selected for processing (1)
  • guides/cli.rst (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
`**`: - Do not generate or add any sequence diagrams

**: - Do not generate or add any sequence diagrams

  • guides/cli.rst
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: build

@shvmm shvmm closed this Jun 11, 2025
@jesserockz jesserockz reopened this Jun 11, 2025
@shvmm shvmm marked this pull request as draft June 11, 2025 07:39
@shvmm shvmm marked this pull request as ready for review June 12, 2025 08:16
@jesserockz jesserockz merged commit 2d4a138 into esphome:current Jun 19, 2025
3 checks passed
@shvmm shvmm deleted the patch-4 branch June 19, 2025 06:43
@github-actions github-actions bot locked and limited conversation to collaborators Jun 21, 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.

2 participants