Skip to content

Make Ethernet the priority connection - #31

Merged
Bunton33 merged 4 commits into
betafrom
claude/cast-pro1-ethernet-stp-boot
Nov 24, 2026
Merged

Bunton33 merged 4 commits into
betafrom
claude/cast-pro1-ethernet-stp-boot

Conversation

@Bunton33

@Bunton33 Bunton33 commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Version: 26.11.24.2

What does this implement/fix?

Ethernet is now the priority. A UniFi user's CAST PRO-1 wouldn't stay on Ethernet until they turned off STP, and once it ran WiFi and Ethernet together, Music Assistant streamed over WiFi and Line In stuttered.

  • Boot: boot now watches the cable link. With the link up it waits up to 60 s for an IP (an STP port holds traffic about 30 s), or 5 min if WiFi was never set up, so a new unit no longer falls back to the hotspot and reboots. With no cable it falls back after 10 s, not 20 s.
  • Takeover: once Ethernet has been up 30 s and the speaker has been idle 30 s, WiFi turns off. Home Assistant is disconnected first, and the device dials it back over Ethernet with api: outgoing_connection (HA 2026.10+), which reconnects in about 15 s.
  • Fallback: if Home Assistant doesn't reconnect within 5 minutes (another VLAN, older HA, Docker without port 6054), WiFi comes back, and the unit stays on both and keeps retrying WiFi like before. Unplugging the cable resets this. Units that have never seen Home Assistant (Music Assistant only) skip the check.

Types of changes

  • Bugfix (fixed change that fixes an issue)
  • New feature (thanks!)
  • Breaking change (repair/feature that breaks existing functionality)
  • Dependency Update - Does not publish
  • Other - Does not publish
  • Website of github readme file update - Does not publish
  • Github workflows - Does not publish

Checklist / Checklijst:

  • The code change has been tested and works locally
  • The code change has not yet been tested

Compiles on ESPHome 2026.12-dev (static RAM +636 B). Not run on hardware yet. To bench it:

  • On a UniFi port with STP on and Edge off, factory reset with the cable in. It should reboot once at most, then stay on Ethernet.
  • Take a unit set up on WiFi, add the cable, and wait about a minute while idle. Network Connection should read "Ethernet", and HA should stay connected with no manual change.
  • Put the wired port on a VLAN HA can't reach, and check that WiFi comes back after 5 minutes.

If user-visible functionality or configuration variables are added/modified:

  • Added/updated documentation for the web page

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Bunton33 Bunton33 added the bugfix Something isn't working label Nov 17, 2026
@coderabbitai

coderabbitai Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: aae0134b-20b9-4319-91e7-7c624e6f2c84
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Bunton33 Bunton33 changed the title Wait for Ethernet behind a switch port running STP Make Ethernet the priority connection Nov 17, 2026
Bunton33 and others added 2 commits November 24, 2026 09:32
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Bunton33
Bunton33 merged commit c0e4edc into beta Nov 24, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants