PhantomBot StreamDeck Interface


#21

I have a “todo” list. I have been able to figure out how to read the Stream Deck configuration files, writing them is something different as they do strange things with folders but otherwise it is fairly straight forward.

One idea that I have had is an “easy” button to have the application fill in a menu [folder] with all of the commands that are configured. Unfortunately, I am not sure how to add an item to the configuration bar in Stream Deck and I believe that part is locked off. The configuration files that drive the buttons on the Deck at least are in an “easy to read” JSON (JavaScript Object) format.

Will add a “todo” to consider making the configuration all managed in a GUI instead of the text file.

Thanks for the suggestion. I cannot promise I will add it or when, my spare time has been whacked pretty hard. My goal at first was just get something mostly usable out there, including for myself since I picked up a Stream Deck :smiley:

Related, you can see what has been done and what I am dreaming of here.


#22

Oh, so if I’m understanding correctly, although you might not be able to do the config change inside the Stream Deck App, you could do it by editing the Stream Deck Config file itself. If so, that’s pretty cool. The obvious barriers there are “replacing” buttons that might already exist. But I’m sure you have already thought of that. Maybe just part of your GUI design includes reading in the current config and have a display similar to the stream deck app and show what buttons already have config options on them.

And excuse my limited development experience and terminology, especially with java, but the fact that it uses the JSON format is a good thing, right? I have made few modifications to my local git copied/compiled bot, and I know it uses a lot of JSON calls, events and such. I’ve had to mimic a few of them already. But it’s somewhat native to the Bot itself, yeah? Wonder if the bot could have another port opened for these kinds of calls to be made directly from the Stream Deck config file? Is that what you’re going for?

Sorry, realize I’m asking a butt load of questions haha.

Either way, very cool to see the “list” :slight_smile:

Totally understand the spare time thing! What little you do have and spend on these things is definitely appreciated by us!


#23

You are fine with questions.

I wouldn’t replace buttons, I was considering making a new folder and then that folder could be added or have icons dragged and dropped into wherever you wanted them. At least as a Phase 1 thing (I like working in phases).

JSON is a good thing. It is readable and there are libraries to interact with it. It is an open standard for JavaScript itself - essentially a way to describe objects. It is used all over the place, API (data retrieval) calls that Twitch returns, for example. It is used well beyond PhantomBot. Stream Deck creates configuration files using the standard format which I was happy to see. This is a sample from Stream Deck’s configuration, if you read through it - it should make some sense. Like with the PhantomBot item. You can see the command there, you can see the title, and you can see the com.elgato.streamdeck.system.open (think System > Open in the Stream Deck configuration application):

{
	"Actions": {
		"0,0": {
			"Name": "Open",
			"Settings": {
				"openInBrowser": true,
				"path": "\"C:\\Program Files (x86)\\PBStreamDeck\\PBStreamDeck.exe\" runmods"
			},
			"State": 0,
			"States": [
				{
					"Image": "",
					"Title": "Test",
					"TitleAlignment": ""
				}
			],
			"UUID": "com.elgato.streamdeck.system.open"
		},
		"2,1": {
			"Name": "Welcome",
			"Settings": {
				"openInBrowser": true,
				"path": "http://e.lga.to/Welcome-to-Stream-Deck"
			},
			"State": 0,
			"States": [
				{
					"Image": "[email protected]",
					"Title": "Welcome",
					"TitleAlignment": "bottom"
				}
			],
			"UUID": "com.elgato.streamdeck.system.website"
		}
	},
	"Name": "Default Profile",
	"Version": "1.0"
}

Since that uses an open and easy to duplicate format, in theory, I can create new entries automatically (in theory, I haven’t tested it yet!).


#24

That makes it more clear. Very cool. Look forward to seeing how it progresses. Thanks for explaining!


#25

I finally have a StreamDeck. Worked well with commands! Props :slight_smile:

Thanks for the great work.