raycast / extensions

Everything you need to extend Raycast.
https://developers.raycast.com
MIT License
5.36k stars 3.06k forks source link

[Elgato Key Light] Add support for multiple lights #4771

Closed omarshahine closed 1 year ago

omarshahine commented 1 year ago

Extension

https://www.raycast.com/thomas/elgato-key-light

Description

I have two Elgato KeyLights, it would be awesome to have this control a "pair" as I have configured in the Elgato app.

Who will benefit from this feature?

Anyone with a pair of lights

Anything else?

No response

raycastbot commented 1 year ago

Thank you for opening this issue!

🔔 @thomaspaulmann you might want to have a look.

💡 Tip: Once the issue is resolved, comment @raycastbot close this issue to close it.

thomaspaulmann commented 1 year ago

This popped up before and would be indeed nice. Want to help by contributing? Happy to steer you in the right direction.

omarshahine commented 1 year ago

I actually spent a bit of time and am kind of stuck.

bonjour.find can enumerate more than one light. bonjour.findOne just gets one.

The issue is that I can't quite figure out how to store the resulting lights in an array and then return by resolving the promise without doing so too early.

also I found this other NPM package that might help but it doesn't seem to work with me:

https://github.com/NickParks/elgato-light-api

omarshahine commented 1 year ago

@thomaspaulmann I have a working version now. To make it work I added a pref asking the end user how many lights they have. That is needed to get this to work but I am sure that it could be improved to remove this need for a preference. I'll submit a PR.

omarshahine commented 1 year ago

Submitted the pull request https://github.com/raycast/extensions/pull/4821

raycastbot commented 1 year ago

This issue has been automatically marked as stale because it did not have any recent activity.

It will be closed if no further activity occurs in the next 10 days to keep our backlog clean 😊