Skip to content

Allow connecting to chromecast over IPv6#1162

Open
Mathis-6 wants to merge 3 commits intohome-assistant-libs:masterfrom
Mathis-6:master
Open

Allow connecting to chromecast over IPv6#1162
Mathis-6 wants to merge 3 commits intohome-assistant-libs:masterfrom
Mathis-6:master

Conversation

@Mathis-6
Copy link
Copy Markdown

@Mathis-6 Mathis-6 commented Feb 9, 2026

Currently, we can only connect to the chromecasts over IPv4 because socket.AF_INET is hardcoded for the socket.
This PR adds an automatic detection to choose from AF_INET6 or AF_INET, depending if the address contains colons or not

@Mathis-6
Copy link
Copy Markdown
Author

Mathis-6 commented Feb 9, 2026

damn i didn't saw #861 which is much more complete than my PR.
Any reason it didn't get merged yet ?

@elupus
Copy link
Copy Markdown
Collaborator

elupus commented Feb 9, 2026

damn i didn't saw #861 which is much more complete than my PR. Any reason it didn't get merged yet ?

Read the reviews

@elupus
Copy link
Copy Markdown
Collaborator

elupus commented Feb 9, 2026

Ps. This looks much easier to review since its scope is smaller.

@Mathis-6
Copy link
Copy Markdown
Author

Ps. This looks much easier to review since its scope is smaller.

Can it be merged then ?

@elupus
Copy link
Copy Markdown
Collaborator

elupus commented Feb 25, 2026

Any chance you can try to refactor this to use socket.create_connection instead. That also handles both variants and is a bit higher level.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants