Skip to content
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

SSDP Discovery Helper #2807

Open
2 tasks done
peternewman opened this issue Mar 18, 2024 · 3 comments
Open
2 tasks done

SSDP Discovery Helper #2807

peternewman opened this issue Mar 18, 2024 · 3 comments
Labels
area/backend Something in the core of companion area/module-api Module related Enhancement New feature or request
Milestone

Comments

@peternewman
Copy link
Contributor

Is this a feature relevant to companion itself, and not a module?

  • I believe this to be a feature for companion, not a module

Is there an existing issue for this?

  • I have searched the existing issues

Describe the feature

Off the back of #2087 , it would be great to do the same sort of thing but for SSDP.

For example Sony Bravia use this which would benefit https://github.com/bitfocus/companion-module-sony-bravia/ . Others have implemented SSDP in other tools to discover it (e.g. home-assistant/core#77772 ).

Here's their relevant code
home-assistant/core@7c460cc#diff-0af27839888d627dfb217e7ae091cd8cc5f24627d03f7f79f130db04d781b3ebR142-R157

So in that case filtering for a particular attribute within a third level hash looks to be sufficient.

Usecases

Similar to the Bonjour stuff, allow the system to suggest suitable/valid hostnames.

In future possibly even suggest modules/connections to add/load similar to #2088 for Bonjour.

@Julusian Julusian added Enhancement New feature or request area/module-api Module related area/backend Something in the core of companion labels Mar 19, 2024
@Julusian
Copy link
Member

I don't expect to look into this myself (not for a while at least) as I don't think I have anything on my network which uses SSDP, so testing anything will be hard.
But If someone else wants to do it I can provide some support/assistance.

It isn't that much code to do, I would do this by copying the bonjour classes/components added in https://github.com/bitfocus/companion/pull/2428/files to make SSDP versions of everything, then redo the implementations to be using SSDP.
A corresponding change is needed in the module-base to allow modules to use this: https://github.com/bitfocus/companion/pull/2428/files

@peternewman
Copy link
Contributor Author

Thanks @Julusian . I'm not sure I've got any SSDP device on my main network either TBH or will either get to it particularly soon.

I assume you mean https://github.com/bitfocus/companion-module-base/pull/57/files for the module-base changes?

I guess with half of this, choosing a suitable SSDP library might be part of the challenge too.

@Julusian
Copy link
Member

Ooh, I do have something which does SSDP, Sonos uses that. So I could look into this and use that module as a reference implementation https://github.com/bitfocus/companion-module-sonos-speakers

I'll add this to my list of things to consider looking into, when I want something new to pick up

@Julusian Julusian added this to the v3.develop milestone Mar 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/backend Something in the core of companion area/module-api Module related Enhancement New feature or request
Projects
Status: No status
Development

No branches or pull requests

2 participants