Skip to content

[modbus] Split modbus_server from modbus_controller#6404

Open
exciton wants to merge 14 commits intoesphome:nextfrom
exciton:modbus_overhaul_split_controller_server
Open

[modbus] Split modbus_server from modbus_controller#6404
exciton wants to merge 14 commits intoesphome:nextfrom
exciton:modbus_overhaul_split_controller_server

Conversation

@exciton
Copy link
Copy Markdown
Contributor

@exciton exciton commented Apr 7, 2026

Description

Splits modbus_controller in two to create modbus_server which handles server-mode functionality. See code PR for details.

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 /src/content/docs/components/index.mdx 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 lower_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 /public/images/ folder of this repository.

  4. Use the image in your component's index table entry in /src/content/docs/components/index.mdx.

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

@esphomebot generate image dht22

Note: All images used in ImgTable components must be placed in /public/images/ as the component resolves them to absolute paths.

esphome[bot]
esphome bot previously requested changes Apr 7, 2026
Copy link
Copy Markdown

@esphome esphome bot left a comment

Choose a reason for hiding this comment

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

As this is a feature matched with a PR in https://github.com/esphome/esphome, please target your PR to the next branch and rebase.

@esphome
Copy link
Copy Markdown

esphome bot commented Apr 7, 2026

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.

@esphome esphome bot marked this pull request as draft April 7, 2026 03:45
@netlify
Copy link
Copy Markdown

netlify bot commented Apr 7, 2026

Deploy Preview for esphome ready!

Name Link
🔨 Latest commit 5720bd2
🔍 Latest deploy log https://app.netlify.com/projects/esphome/deploys/69d47dc7be3a3200089c1260
😎 Deploy Preview https://deploy-preview-6404--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[bot]
esphome bot previously requested changes Apr 7, 2026
Copy link
Copy Markdown

@esphome esphome bot left a comment

Choose a reason for hiding this comment

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

As this is a feature matched with a PR in https://github.com/esphome/esphome, please target your PR to the next branch and rebase.

@exciton exciton changed the base branch from current to next April 7, 2026 03:47
@esphome esphome bot added the next label Apr 7, 2026
@esphome esphome bot dismissed their stale review April 7, 2026 03:47

Base branch has been corrected - dismissing previous review.

@exciton exciton marked this pull request as ready for review April 7, 2026 03:47
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 7, 2026

Caution

Review failed

Failed to post review comments

Walkthrough

This PR updates ESPHome documentation infrastructure and content, bumping the version from 2026.3.3 to 2026.4.0-dev, refactoring the schema documentation generator with new registry-matching and reverse-inheritance features, and adding or updating numerous component documentation pages across multiple categories.

Changes

Cohort / File(s) Summary
Version Metadata
data/version.yaml
Updated release and version fields to 2026.4.0-dev and 2026.4 respectively.
Schema Documentation Generator
script/schema_doc.py
Major refactoring introducing component-to-registry matching (COMPONENT_REGISTRIES, title_to_registry_key()), reverse-extends propagation via fill_reverse_extends(), revised link-conversion logic (removed anchor generation, now handles external/absolute/same-page links only), refined set_schema_doc() with property tracking (props_created, props_refined, props_skipped), new parse_file() consolidation, and updated title-breaking rules for backticked headings.
New Component Documentation
src/content/docs/components/climate/mitsubishi_cn105.mdx, src/content/docs/components/sensor/hdc2080.mdx, src/content/docs/components/sensor/number.mdx, src/content/docs/components/sensor/spa06.mdx, src/content/docs/components/modbus_server.mdx, src/content/docs/components/text_sensor/text.mdx
Added six new component documentation pages with configuration examples, feature descriptions, and cross-references.
Changelog Updates
src/content/docs/changelog/2026.3.0.mdx
Removed multiple changelog entries (esp32_hosted, ethernet, rp2040, modbus, ledc, audio, etc.) and replaced with single socket PCB use-after-free fix entry.
ESP32/Ethernet Component Docs
src/content/docs/components/esp32.mdx, src/content/docs/components/ethernet.mdx
Added ESP32 partition, SRAM1, and signed OTA verification options; expanded Ethernet docs to cover RP2040 support with platform-specific wiring and configuration examples.
Alarm & Media Player Docs
src/content/docs/components/alarm_control_panel/index.mdx, src/content/docs/components/media_player/index.mdx
Added MQTT command format documentation for alarm control panel; marked media_url as templatable and added new media_player.enqueue action.
Modbus & Remote Receiver/Transmitter Docs
src/content/docs/components/modbus.mdx, src/content/docs/components/modbus_controller.mdx, src/content/docs/components/remote_receiver.mdx, src/content/docs/components/remote_transmitter.mdx
Updated Modbus documentation structure (server moved to separate page); added brennenstuhl remote codec support with trigger and action documentation.
Display Component Docs
src/content/docs/components/display/mipi_rgb.mdx, src/content/docs/components/display/tm1637.mdx
Changed MIPI RGB hsync/vsync pins to optional; added raw segment buffer API documentation for TM1637.
LVGL Component Docs
src/content/docs/components/lvgl/index.mdx, src/content/docs/components/lvgl/widgets.mdx
Updated to LVGL v9 with new options (rotary_sensitivity, rotation, bottom_layer, new theme dict format), reorganized styling sections, introduced universal widget actions (lvgl.widget.redraw, lvgl.widget.focus), updated asset imports, and refined widget property documentation.
Sensor Component Docs
src/content/docs/components/sensor/index.mdx, src/content/docs/components/sensor/atm90e32.mdx, src/content/docs/components/sensor/bme680.mdx, src/content/docs/components/sensor/bme680_bsec.mdx, src/content/docs/components/sensor/bme68x_bsec2.mdx, src/content/docs/components/sensor/bmp581.mdx, src/content/docs/components/sensor/cm1106.mdx, src/content/docs/components/sensor/dsmr.mdx, src/content/docs/components/sensor/ens160.mdx, src/content/docs/components/sensor/ezo.mdx, src/content/docs/components/sensor/filter/..., src/content/docs/components/sensor/gdk101.mdx, src/content/docs/components/sensor/scd30.mdx, src/content/docs/components/sensor/ufire_ec.mdx, src/content/docs/components/sensor/xiaomi_miscale.mdx, src/content/docs/components/sensor/internal_temperature.mdx
Updated lambda examples to use get_state()/get_raw_state() API instead of direct property access; added SPI support to BMP581; extended internal_temperature to include nRF52 and LN882H; added optional thermal_mbus_id parameter to DSMR.
Text & Number Component Docs
src/content/docs/components/text/index.mdx, src/content/docs/components/number/index.mdx
Added cross-references to corresponding text/number sensor pages.
IR/RF & VBus Docs
src/content/docs/components/ir_rf_proxy.mdx, src/content/docs/components/vbus.mdx
Added optional receiver_frequency parameter to IR/RF proxy; added DeltaSol CS4 support to VBus with new sensor keys and binary sensor models.
Component Index & Guides
src/content/docs/components/index.mdx, src/content/docs/cookbook/index.mdx, src/content/docs/cookbook/lvgl.mdx, src/content/docs/guides/setting_up_rmt_devices.mdx
Updated component index with new entries; added introductory text to cookbook; refactored LVGL cookbook examples (meter needle styling, thermometer configurations); added rolling-code handling guide.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~50 minutes

Possibly related PRs

Suggested labels

has-parent, next

Suggested reviewers

  • jesserockz
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The PR title clearly summarizes the main change: splitting modbus_server from modbus_controller. This is concise, specific, and directly reflects the primary objective of the changeset.
Description check ✅ Passed The PR description explains that modbus_controller is being split into two components with modbus_server handling server-mode functionality, and references the corresponding code PR. This is clearly related to the changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

Comment @coderabbitai help to get the list of available commands and usage tips.

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.

1 participant