timothycrosley / streamdeck-ui

A Linux compatible UI for the Elgato Stream Deck.
https://timothycrosley.github.io/streamdeck-ui/
MIT License
1.12k stars 240 forks source link

Buttons don't work after .streamdeck_ui.json imported #293

Open pblanton opened 1 year ago

pblanton commented 1 year ago

Describe the bug I have installed StreamDeck UI on Fedora 37 after much trouble. But the UI works and I can program buttons on the device. Now though, after importing the settings that I exported on my Linux mint system, none of the programmed buttons do anything on the system.

To Reproduce Steps to reproduce the behavior:

  1. Install StreamDeck UI on Fedora 37, running this command to solve the dependency problems before running the installer...
sudo dnf install python3-devel libusb1-devel libusbx-devel libudev-devel systemd-devel
  1. Restore (Import) your StreamDeck setup from a Linux Mint system.
  2. Sometimes the first time you try a button on the device it will work. It will never work again. Sometimes the button press throws an error that a file cannot be found.
  3. Most times the button on the device never works.

Even the buttons programmed to switch pages on the device do not work.

Expected behavior Streamdeck buttons should execute whatever commands they are programmed to execute.

Operating system (please complete the following information)

Stream Deck Version

pblanton commented 1 year ago

I installed Streamdeck and then imported the settings from an "Export" file I created on my old OS. I'd like to try to remove that import and reset the StreamDeck UI back to its initial settings (no programmed buttons). Is there a quick way to do that? I don't see an option for it in the UI itself.

pblanton commented 1 year ago

Found it in the config.py file...

~/.streamdeck_ui.json

I'ma delete (or empty) that file and restart to see if that will reset Streamdeck UI back to factory defaults.

pblanton commented 1 year ago

The issue appears to be the import. I deleted the streamdeck_ui.json file and restarted streamdeck ui and buttons now work properly when re-programmed. This is good, but it sucks to have to reprogram all of my buttons and not be able to back them up and then restore them properly.

Leaving this open but changing its name.

:-(

poohzaza166 commented 1 year ago

how do you even get pass the "pip3 install --user streamdeck_ui" command step, Since my fedora 37 install just said " ERROR: Failed building wheel for pillow" and "error: legacy-install-failure

× Encountered error while trying to install package. ╰─> pillow ".

Did you compiled from source?

dodgyrabbit commented 1 year ago

@poohzaza166 I've started looking into this. I believe the root cause is that the current version of streamdeck-ui requires python >= 3.8 and < 3.11. Fedora 37 ships with 3.11, so it can't install.

pip has interesting behaviour here. It silently looks at older versions and it finds version 1.0.2 that did not have the python 3.11 constraint and attempts to install it. During that install, pillow fails to build.

The short term suggestion as mentioned elsewhere is to use a virtual environment. Here is how you can do it:

Install python 3.8 (side by side install with 3.11)

sudo yum install python3.8

Make a directory where you'll put your venv. This can be anywhere you like.

mkdir streamdeck-ui
cd streamdeck-ui

Create a virtual environment, in a subdirectory called ".venv". You can call it anything, but this is commonly used. You then activate the virtual environment.

python3.8 -m venv .venv
source .venv/bin/activate

You are now inside the virtual environment, which runs Python 3.8 and can proceed with the install.

pip install streamdeck-ui

The install should succeed with out any issues.

Because of Wayland issues, you need to then run

xhost +

Lastly, you should be able to run

streamdeck

(I'm assuming the hidapi + .rules files etc have been completed.)

Better solution is to update streamdeck-ui to work with newer Python versions. I'm going to look at that next.

dodgyrabbit commented 1 year ago

@pblanton Are you able to share your .streamdeck_ui.json file that you're trying to import? I've been unable to reproduce the problem you are describing. If there are any errors reported in the terminal, can you post them here.

coolapso commented 1 year ago

hi, this project seems to be stale and a new fork as been made with the intention of replacing this one.

if this still an issue please reopen it at: https://github.com/streamdeck-linux-gui/streamdeck-linux-gui