Coder Social home page Coder Social logo

sentinelite / streamdeck-shortcuts Goto Github PK

View Code? Open in Web Editor NEW
105.0 2.0 6.0 11.29 MB

Run Shortcuts straight from your Elgato StreamDeck!

Home Page: https://sentinelite.com/discord-shortcuts-support

License: GNU Affero General Public License v3.0

Swift 100.00%
macos swift automation shortcuts streamdeck elgato elgato-stream-deck macos-app

streamdeck-shortcuts's Introduction

GH_Banner

About StreamDeck Shortcuts

Welcome in! This Repo is for all things Shortcuts/StreamDeck!

We’re all about making sure the software is Fast, Reliable, & Performant, all while offering excellent accessibility support!

The StreamDeck's been unleashed. Infinite possibilities at the speed of light. All within touch.

If you want to learn more about how & why this was made, take a look at this Twitter thread!


Backstory

I wanted to run my Shortcuts on my StreamDeck, but the go-to solution bricked on me, on the first day. Whatever I did, I couldn’t get it working again. That was the start of this project…

Of course, I wasn’t going to make a simple thing. No, I had to do it the justice it so rightly deserved. 😝


Repo Structure


Lost, But Not Forgotten Features:

  • Set Discord/GitHub image/logo beside their description text?
  • isPrivateAnalytics Bool, to allow user’s to toggle Analytics.
  • Move settings into a popup window? See Elgato PI Demo.
  • Don’t send a payload, if settings haven’t changed. Only send what has changed. Show if settings changed by showing an “X” on the save box, instead of the green box.
  • We shouldn’t send all the shortcuts, only a limited few. The payload is probably too big, for larger libraries.
  • Allow user to switch Accessibility speed. Only some voices support this…
  • Allow for accessibility toggle. Ie, some people may not/want to hold down for x amount of time. Create an option to tap, starting the timer, then another tap confirm or cancel, when the timer finishes.
  • 🚀 Create Shortcut from Button Press?
  • 🚀 Open/Edit Shortcut in the Shortcuts.app

⚠️ Known Issues & Bugs

  • 🐞Rare: Kilo-One | Sometimes the app fails to startup correctly. Need to dig into this. | v 1.0.1 includes a new "Debug:" console.app logging message.
  • 🐞Potential: App becomes unresponsive after computer wakes up from sleep???
  • Some user's may experience issues with certain special characters. We've done our best to handle most of these, but other languages may vary! This should be mostly fixed now. Let us know if you have any issues!
  • We’re only fetching/getting the first discovered StreamDeck. We need to get all the user’s connected StreamDeck Devices
    • We’re getting the connected count, but we still need to fetch the unique IDs.
  • If the shortcut name is long, the search field gets small. We fixed the former, but now we’re Popping out of PI’s regular dimensions… should be fixed.

🐞 New Issue or 💬 Comments?

streamdeck-shortcuts's People

Contributors

sentinelite avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

streamdeck-shortcuts's Issues

'Kilo-One' error in StreamDeck

Hi -- I just tried to use your plugin to launch Mac shortcuts on my 2021 MacBook Pro (14", M1 Max), and it's consistently giving me the "Kilo-One" error when trying to set up the shortcut. I checked the StreamDeck access, and the app has 'full access' under the accessibility menu. All other plugins on my StreamDeck seem to be working without any issues. I have restarted the app and computer multiple times, to no avail.

This is the full error:
⚠️ Error Code: 'Kilo-One' Please restart the StreamDeck Software.

Happy to provide you with any other info, if it would help you debug.

Thanks!
Mike

Error at installation step

Hello, I have a Stream Deck MK1, firmare version 6.5.0 (19904) and when I try to install this plugin I got this error message:

Requires Stream Deck version 6.4 or newer

Thank you!

Issue when running Shortcuts with non-English accents.

I’ve seen some users reporting issues with Shortcuts with non-English names. Certain accents appear to be the issue.

This is mostly due to the way we're handling the strings. See AppleScript is a pain & the shortcuts CLI isn't working right: #3

Shortcut Fails Until I Edit the Shortcut

I have a shortcut defined that turns a Leviton switched outlet on and off that works fine if I invoke it from the Shortcuts app. But it fails when I try to run it via this plugin on a Streamdeck XL. I am on Streamdeck software 6.0.2 but it happened before that version oo. If I open the Multi-Action where the shortcut plug in is being used and click the drop down where the shortcut is specified and just reselect the same shortcut, then the shortcut will work on the streamdeck until I close and reopen the streamdeck software or I restart my computer. It does the same thing on another shortcut that triggers a DMX scene in the Lightkey app and it is resolved the same way. I don't know if this is a plugin issue or an Elgato issue. I have provided a screen shot below. Just selecting the Shortcut drop down and reselecting that same shortcut clears the issue. Let me know if you have any questions or want me to try something. Thanks.

Screenshot 2022-12-23 at 5 01 55 PM

Plugin unresponsive after installation

s e 2023-02-09 at 01 57 08
I can install the plugin and I see the contents. I can change the icon … but that's about it. Links are not clickable, no contents is loaded anywhere.


Ventura, Intel i7, 24GB RAM

Shortcuts don't work for me in Stream Deck

I can't think what I could be doing wrong, but being new to Shortcuts, I'm hoping it's me.

I've written a shortcut that mounts a server if I'm on the same network as the server. It has an embedded shell script for most of the heavy lifting. If I run it from Shortcuts, it does mount the server. I installed your plugin (yay!) and pointed to the shortcut. It autofilled "All" for the folder, "Toggle Off" for Accessibility, Samantha for the voice, HOldTime 5.0, and Override Title toggle on. I have no clue what any of those options mean so I left them alone.

Am I missing something fundamental about how this should work?

Shortcuts never load

Hello! I have an issue where my shortcuts are never loaded into the streamdeck app. If I add "Launch Shortcut" to a button, Folder, Shortcut, Accessibility, and Override Title only say "Loading...". Any ideas how to resolve this? In system preferences -> security and privacy -> privacy, under automation I have stream deck allowed to control shortcuts.

Shortcut plugins in Multi-action lists stops working after page switching

Hello!

Firstly, I want to express my gratitude for this incredibly helpful plugin—it's been a lifesaver!

I'm relatively new to the StreamDeck universe, but I've been experimenting with some shortcuts I'd like to launch. During troubleshooting a particular workflow, I noticed a recurring issue: sometimes, I found myself needing to refresh the "Launch Shortcut" plugin. This involves navigating through the multi-action list, clicking on the shortcut launcher, and waiting for it to load.

Initially, I thought it might have been due to my own back-and-forth between Shortcut (the Mac app) and the Elgato software. However, after spending countless hours tinkering and experimenting, I made a discovery: whenever I successfully launch a multi-action list from, let's say, page 1, and then move to page 2 to launch another multi-action list, everything comes to a halt. Even returning to page 1 doesn't solve the issue. In these scenarios, I'm forced to reopen StreamDeck, refresh the multi-action list (as previously described), and then attempt again.

Interestingly, this issue doesn't occur if the shortcut launcher is placed outside any multi-action list, such as directly on a random StreamDeck page—it works seamlessly regardless of page switching.

Has anyone else encountered this specific issue? Thanks ;)

I'm running StreamDeck v6.5.1 (19929) and Sonoma 14.3.1.

Fictional `JSON5` Object Breaks All Functionality

With the latest update, I am unable to run any of my previously functioning shortcuts.

While I'm a front-end developer, this is my first time in the world of Stream Deck development, but I found the problem. After enabling debug mode, I found this problem in main_pi.js:

Screen Shot 2022-09-28 at 10 48 05 AM

There is no JSON5 object, only JSON. I tried to find the file in this repo, but apparently it's from somewhere else?

Zoom Cuts Updates

Almost every time I use zoom there is an update available. Sometimes several in a week. How often will Zoom Cuts have an update available?
Zoom says that everyone using zoom should always be using the same update so that their experience will be consistent.

Sentinelite background added to buttons on press

After the latest update to the StreamDeck SW (6.4.0 (19687)), whenever I press a shortcut button once or more, the background will from black to purple with SE on the bottom left, making the title of the button hard to read, and make it seem like a toggle is on (it isn't). Attached is a picture. You can see I haven't pressed the Bright button since rebooting, but I did press Normal, Dim and Off at least once.
IMG_7625

Join Zoom Meeting Shortcut Doesn't Work

I am attempting to execute the Join Zoom Meeting shortcut via this Streamdeck plug-in and it fails every time. I can run the shortcut without issue from Shortcuts and the MacOS Shortcuts menu bar, and when I click the Shortcut in Streamdeck I see an indicator that shortcuts is being triggered in some way, but the action does not seem to occur. I've attached a screenshot of my configuration for reference.

image

Shortcuts CLI Run Command Issue/Bug?

This one's been in the codebase, practically since its inception. I've tried digging into it, but I can't seem to find out why the execution fails.

What ends up happening: The code will execute up past the .launch() command. The execution gets "buffered", until we terminate/close the StreamDeck Software. Then they will all immediately get executed.

The below CLI commands execute perfectly, it's only when we try to run a shortcut, that it "hangs". The fact that these execute tells me that this is a deep underlying problem…
shortcuts list shortcuts list folders shortcuts list YourFolderName

I tried embedding another CLI-Helper tool, that just took the shortcut name & ran the actual shortcut via the CLI command, but that still had the same side effect.

I've tested & it appears that the only other work-arounds are saving to a text file & passively reading that, or implementing a WebSocket connection. This would require the helper app to be implemented, though.

The function below is where most of this happens. In the current codebase I've commented out the function until we find a fix.

If you'd like to test this out for yourself, or know how to fix this, you'll need to do the following:

  1. Uncomment the launchCommand() function.
  2. Under the keyDown() function inside the CounterPlugin class, in the streamdeck-backend.swift file, you'll need to replace that code with the appropriate `launchcommand().
  3. Build & extract the StreamDeck-Shortcuts executable under your Products' folder in your Derived Data. Otherwise, you can build it as a Product & export the built product.
  4. With the executable in hand, head on over to: ~Library/Application Support/com.elgato.StreamDeck/Plugins/com.sentinelite.streamdeckshortcuts.sdPlugin & replace the StreamDeck-Shortcuts file with the new one.
  5. Lastly, open up the Console.app & search for StreamDeck-Shortcuts, start monitoring, & restart the SD Software!

If anyone has any pointers, or can attempt to fix this, I'm all ears!

`swift
func launchCommand (inputShortcut: String) {
let shortcutCLI = Process()
shortcutCLI.executableURL = URL(fileURLWithPath: "/usr/bin/shortcuts")
shortcutCLI.arguments = ["run", "(inputShortcut)"]
var pipe = Pipe()

    shortcutCLI.standardOutput = pipe
    NSLog("🔳 PT3.5!")
    do{
        NSLog("🔳 PT4.5!")
        try shortcutCLI.launch() //Run doesn't work either. | .launch is deprecated.
        NSLog("🚨 Execution hangs here until parent process ends...")
        //None of the code below runs after the fact either, which makes sense.
        let data = pipe.fileHandleForReading.readDataToEndOfFile()
        NSLog("🔳 PT6.5!")
        if let output = String(data: data, encoding: String.Encoding.utf8) {
            NSLog("🔳 PT7.5!")
            NSLog(output)
            print("FinisheD Running!")
        }
    } catch {
        //    It refuses to throw an error, becuase it's waiting to execute, when the app closes?
        NSLog("Failed to run with Error \(error)")
    }
}

`

Application Isn't Responsive Depending on DNS/VPN/PiHole connection.

If you have a custom network filter, VPN, firewall, etc. You may experience instability, or the program may not function properly at all.

Temp-workaround, disable your "restrictive" network settings.

We'll be adding a toggle to disable all analytical information in the future.

Multi-Action Support Bug

There's currently a bug, that's preventing Multi-Action support from working correctly.

Not sure when it broke, or why, but we'll be investigating it soon.

StreamDeck-Shortcuts consumes 100% CPU time

When entering the office first time in the morning, I have observed that the computer was very active, cooling fans spinning more than usual, while it should actually be sleeping. Checking CPU time it was StreamDeck-Shortcuts consuming 100 % CPU time. Killing the process, the computer went back to normal.

I can't remember having observed that behaviour while working on the computer. But I routinely build software on the computer. So it may just have escaped my notice.

Will observe if it is related to the sleep state, or not.

This relates to version 1.0.7.1.

Error Kilo-one happens all the time.

Kilo-one error is not rare as stated in the documentation. It happens every time I use the plugin. I have to restart the stream-deck program at least three times per day.
Stream deck version: 5.2.1

Folder... Loading

First, nice work ! Really !!!
I have an issue since the last update

looks like the issue #6 but no restriction on my network (issue #7)

Folder and shortcuts only show Loading (on old and new buttons)
image

The only action with the update is I have deleted in system preferences -> security and privacy -> privacy some strange things (not applications) with a yellow triangle showing an error. maybe one of them was the plugin ?

Of course uninstall and reinstall done, no accents on any shortcut or folder, less than 90 char...
Any idea ?

Looking for error

When I select the launch shortcut option, I never get a chance to even pick the shortcut to launch. All I get is a "Looking for error..." in the Message window.

jones logs.pdf

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.