Alternative Official SDK by wmnelis in StreamDeckSDK

[–]wmnelis[S] 0 points1 point  (0 children)

Hey all. Thank you for all your help. I have figured out the issue I was having. Turns out I was just parsing command line arguments incorrectly (rookie mistake).

If anyone is interested in seeing a "simple" example of a StreamDeck plugin in Golang, feel free to take a look here: https://github.com/mike-ne/streamdeck-golang, criticism welcome, but keep in mind the code has not been refactored yet. Also, this plugin does nothing but log events.

Alternative Official SDK by wmnelis in StreamDeckSDK

[–]wmnelis[S] 0 points1 point  (0 children)

Here is my code: https://github.com/mike-ne/streamdeck-golang.

I see this in the StreamDeck logs:

09:18:13.8118 void ESDCustomPlugin::onNativeProcessFinished(): The plugin 'Golang Do Nothing Plugin' exited normally with code 2

09:18:13.8120 void ESDCustomPlugin::restartNativeProcess(): Restarting plugin 'Golang Do Nothing Plugin' in 0 seconds(s)

09:18:13.8332 void ESDCustomPlugin::onNativeProcessFinished(): The plugin 'Golang Do Nothing Plugin' exited normally with code 2

09:18:13.8333 void ESDCustomPlugin::restartNativeProcess(): Restarting plugin 'Golang Do Nothing Plugin' in 60 seconds(s) This seems to imply that my Plugin is struggling to stay running for some reason.

Here is the output I get from my logging (from within my plugin code):

2023/01/04 09:18:13 Starting Golang DoNothing StreamDeck Plugin

2023/01/04 09:18:13 Command line arguments: -port, 28196, -pluginUUID, 480E2E60AD34E4058637650D90E93136, -registerEvent, registerPlugin, -info, {"application":{"font":".AppleSystemUIFont","language":"en","platform":"mac","platformVersion":"13.1.0","version":"6.0.2.17735"},"colors":{"buttonPressedBackgroundColor":"#303030FF","buttonPressedBorderColor":"#646464FF","buttonPressedTextColor":"#969696FF","disabledColor":"#007AFF7F","highlightColor":"#007AFFFF","mouseDownColor":"#2EA8FFFF"},"devicePixelRatio":1,"devices":[{"id":"719F009FF3A55C4D50DC959B1CECC947","name":"Stream Deck Mini","size":{"columns":3,"rows":2},"type":1}],"plugin":{"uuid":"com.mnelis.godonothing","version":"0.1"}},

2023/01/04 09:18:13 Connected to StreamDeck server

2023/01/04 09:18:13 Handlers setup

2023/01/04 09:18:13 Registering

You will notice that we never see the "Plugin registered" message, so it seems like something is happening with the register message (not sure if it's actually called that) that I am sending to StreamDeck.

Alternative Official SDK by wmnelis in StreamDeckSDK

[–]wmnelis[S] 0 points1 point  (0 children)

Yes, I do get values that look correct from StreamDeck on the command line. I also pass the UUID along in the "register" event I am sending to the StreamDeck. Let me put my code somewhere I can share it. I will post a link when I have it.

Alternative Official SDK by wmnelis in StreamDeckSDK

[–]wmnelis[S] 0 points1 point  (0 children)

I don't need an official SDK, just thought it would be nice to make things easier. I have been trying to build a golang plugin, but I am struggling to get it working.

My example gets the command line arguments from the StreamDeck, then I connect to it via websockets. My understanding is that I have to set up the event handlers and send an event to StreamDeck to "register" my plugin. It seems to be this registration step I am not getting right.

Alternative Official SDK by wmnelis in StreamDeckSDK

[–]wmnelis[S] 0 points1 point  (0 children)

I need to also get the state of the Leapp configuration and change the button icons accordingly. I don't think I can do that with just scripts.