Closed GeekyEggo closed 3 years ago
Over the past several months, I have created a variety of plugins for the ESD, all of which utilise a lightweight .NET Standard framework I have written. The framework provides functionality that acts as a wrapper for the communications between plugins and the ESD. The framework is written in C# and aptly named SharpDeck, although not restricted to WIndows as it utilises the .NET Standard framework.
Would it be possible to do this through key bindings instead of having specific support for the StreamDeck? I'd prefer not to have to have something specific to this niche hardware, and to instead offer quick functionality for everyone.
keybinding route makes sense (and could lay a framework for making some actions in DIM scriptable/compatible with other devices, etc.) linking #399
I really like this idea, but it would need something more than mere keyboard shortcut support. Keyboard shortcuts would require either the StreamDeck application to quickly alt-tab to DIM, which means it will have to identify where DIM is currently running, which would not be an easy task. Or, the player would first have to activate and focus DIM before hitting the StreamDeck button, which sort of defeats the niceness of the whole thing. Though, if this is all you got, I'd take it, but then we would need a way to set up keyboard shortcuts in DIM.
Adding a way for DIM to contact a generalized local backend server (security-wise, is it even allowed to do this?), that the StreamDeck plugin sets up, would solve this, and it wouldn't have to be StreamDeck specific either, just document the way the communication works and StreamDeck would just be one implementation, there could be many others.
Want to bump this.
https://twitter.com/LucasFigg/status/1262576437275561984?s=20
We could solve this if DIM supported a URI for each loadout, and attempt to trigger the loadout with a GET request to that URI.
Closing in favor https://github.com/DestinyItemManager/dim-api/issues/16 as this will require use of the DIM api. Linking back to this issue from there.
In light of the DIM API, I wanted to ask if this could be re-opened? I would be happy to implement the bulk of the work on the Stream Deck side of things, going by the assumption it’s possible to leverage the API.
@GeekyEggo it's closed here because the majority of the work requires adding support for moving items and applying loadouts using DIM's logic to the DIM API. Once that's done, we can reopen this for the much smaller work to enable on Stream Deck.
Alternately you could write something that directly uses the Bungie.net API to move items and use the DIM API to just load the loadouts information, but that could be an independent project and not part of DIM.
My apologies @bhollis, I wasn’t sure of the progress of the DIM API.
I’d be happy to look into a plug-in that incorporates both the DIM API and Bungie’s. How would I go about gaining access to DIM’s?
You can get a development token from the DIM developer page if you run it locally, and you can use that for other localhost stuff. I can get you prod tokens later if you ping me on Discord.
Thanks @bhollis, that would be great, I’ve sent you a request on Discord. I’ll look into getting DIM setup locally in the mean time. Appreciate your time!
any updates on this as I just got my streamdeck XL and looking for game integrations.
Hi, for anyone interested in this topic I'm working on a plugin to connect the Stream Deck to DIM / Destiny 2 (I use this plugin when I play D2). The repository is https://github.com/fcannizzaro/com.dim.streamdeck, any suggestion / issue / contribution is welcome 😄
Background
The Elgato Stream Deck is a "USB peripheral providing several dedicated, programmable keys. Each key operates as a separate graphics display that can show the key's function, status, or title."
Earlier this year, the Elgato Stream Deck SDK [ESD SDK] was made publicly available, with plans for "A developer portal [being made] available later this year to let third party developers submit their plugin to the store.".
SDK Capabilities
At it's core, the ESD SDK communicates with plugins via web sockets. Plugins can take the form in any executable, in any language. It is also possible to write plugins in JavaScript. There are a variety of events that occur during communication, including key down / up, key will appear / disappear, etc. Plugins may also provide "profiles", which can define a complete set / screen of plugin buttons.
Suggestion
Functionality
It would be nice if there were integration with DIM, and the Elgato Stream Deck. This could include a variety of actions, including:
Possible implementation
Fundamentally, DIM functionality should be re-used (DRY). A similar approach could be taken to that of the ESD SDK, whereby a web socket is used. The ESD plugin could provide a local web socket server, to which an open instance of DIM could connect to. This would then enable for a set of actions to be "triggered", which would act as a wrapper for pre-existing DIM functionality.