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

IDevice#discover() reuses cache indefinitely; no obvious way to access IResolvedDevice#resolve() #44

Open
kopiro opened this issue Feb 8, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@kopiro
Copy link
Contributor

kopiro commented Feb 8, 2022

Hello Daniel, awesome work on this library.

I'm currently implementing a porting of your library for homebridge, and I have some questions regarding the IDevice interface and the IResolvedDevice; it looks like that calling .discover() on a pre-found device doesn't actually re-discover it, and it doesn't give me up-to-date informations.

I found that there is a .resolve() method that should do exactly this, but I'm not able to get this sub-class fromt he public methods your provide.

Would you be up for a quick chat regarding your TS interfaces?

@kopiro
Copy link
Contributor Author

kopiro commented Feb 9, 2022

I ended up using always Device::withId() to make sure informations were discovered from scratch instead of re-using the IDeviceInformation; https://github.com/kopiro/homebridge-playstation

Not sure if optimal, but it works.

@kopiro kopiro closed this as completed Feb 9, 2022
@dhleong
Copy link
Owner

dhleong commented Feb 9, 2022

Ah interesting. Your approach should be effectively the same as a more "obvious" API, but in the meantime I'll reopen this—you make a good point that the API doesn't quite work as expected.

@dhleong dhleong reopened this Feb 9, 2022
@dhleong dhleong changed the title Homebridge implementation: question around interfaces IDevice#discover() reuses cache indefinitely; no obvious way to access IResolvedDevice#resolve() Feb 9, 2022
@dhleong dhleong added the enhancement New feature or request label Feb 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants