Skip to main content

Stream Deck API Library

Project description

PyPI version

streamdeckapi

Stream Deck API Library for Home Assistant Stream Deck Integration

Only compatible with separate Stream Deck Plugin or the bundled server.

Server inside docker container

The docker image allows you to use the streamdeckapi server inside a docker container.

Usage

docker run -v /dev/hidraw7:/dev/hidraw7 -v ./data/streamdeckapi:/streamdeckapi/data -p 6153:6153 --privileged ghcr.io/patrick762/streamdeckapi:main

Note: You have to change hidraw7 to the path of your Stream Deck. You can find this path by using lshid (https://pypi.org/project/lshid/).

Limitations

  • No zeroconf discovery
  • No doubleTap event

Server without docker

This library also contains a server to use the streamdeck with Linux or without the official Stream Deck Software.

For this to work, the following software is required:

Cairo Installation for Windows:

pip install pipwin

pipwin install cairocffi

Limitations

  • No doubleTap event

Installation on Linux / Raspberry Pi

Install requirements: sudo apt install -y libudev-dev libusb-1.0-0-dev libhidapi-libusb0 libjpeg-dev zlib1g-dev libopenjp2-7 libtiff5 libgtk-3-dev python3-pip

Allow all users non-root access to Stream Deck Devices:

sudo tee /etc/udev/rules.d/10-streamdeck.rules << EOF
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0fd9", GROUP="users", TAG+="uaccess"
EOF

Reload access rules: sudo udevadm control --reload-rules

Install the package: pip install streamdeckapi

Reboot your system

Start the server: streamdeckapi-server

Example service

To run the server on startup, you can use the following config in the file /etc/systemd/system/streamdeckapi.service:

[Unit]
Description=Stream Deck API Service
Wants=network-online.target
After=network.target

[Service]
WorkingDirectory=/home/pi
ExecStart=/home/pi/.local/bin/streamdeckapi-server
User=pi
StandardOutput=console

[Install]
WantedBy=multi-user.target

To start the service, run sudo systemctl start streamdeckapi.service.

To enable the service, run sudo systemctl enable streamdeckapi.service.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

streamdeckapi-0.0.13.tar.gz (12.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

streamdeckapi-0.0.13-py3-none-any.whl (12.7 kB view details)

Uploaded Python 3

File details

Details for the file streamdeckapi-0.0.13.tar.gz.

File metadata

  • Download URL: streamdeckapi-0.0.13.tar.gz
  • Upload date:
  • Size: 12.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.9.21

File hashes

Hashes for streamdeckapi-0.0.13.tar.gz
Algorithm Hash digest
SHA256 fdf9d48464289187938ef63710e5fc917f6d0f0b4619a933217b13741f4b61d6
MD5 6452e0fe1f7d74e43d0a96c4f06bc15a
BLAKE2b-256 a583711bb97f0cdae53327d8cab7fad6f6a5b173dcec5188bdf0204da8a9e6db

See more details on using hashes here.

File details

Details for the file streamdeckapi-0.0.13-py3-none-any.whl.

File metadata

  • Download URL: streamdeckapi-0.0.13-py3-none-any.whl
  • Upload date:
  • Size: 12.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.9.21

File hashes

Hashes for streamdeckapi-0.0.13-py3-none-any.whl
Algorithm Hash digest
SHA256 b66c174b8d2afe6668d57ec8403d8dbbb29bea0a293a2302830812b03912dc20
MD5 b6dc190cb71486cf2e6e76b07f9a0ba8
BLAKE2b-256 8a2c03e3069a362aa7c9c3d716d26930fa9c09df1c6ebfa8e127fd1dba89f845

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page