CreatorCreator
Home
Getting Started
  • 中文简体
  • English
Home
Getting Started
  • 中文简体
  • English
  • Creator

    • Getting Started
  • Stream Dock

    • Plugin SDK
    • Icon Pack

      • Overview
      • Terminology
      • Creating an Icon Pack
      • Icon Specifications
    • Scene Configuration

      • What is a Scenario Configuration?
      • Exporting
      • Use Cases
  • mPanel

    • Plugin SDK
  • Linux StreamDock SDK

    • Cpp SDK

      • Overview
      • Dependency
      • Device Manager
      • StreamDock Base Class
      • StreamDock293
      • Communication transmission
      • Example
      • Source code
    • Python SDK

      • Overview
      • Dependency
      • DeviceManager
      • StreamDock Base Class
      • StreamDock293
      • Example
      • Source Code
  • Windows StreamDock SDK

    • WebSocket SDK

      • Overview
      • Getting Started
      • Events to Send
      • Received Events
    • Cpp SDK

      • Overview
      • Dependency
      • Device manager
      • StreamDock Base Class
      • StreamDock293
      • Transport
      • Example
      • Source Code
  • Support

    • Help and Bug Reporting

Linux Systems (Ubuntu)

You need to install PIL, pyudev, threading, ctypes, time, abc

pip install PIL
pip install pyudev
pip install threading
pip install ctypes
pip install time
pip install abc

When using it, you need to first define a DeviceManager class object (device manager class), and then call its enumerate() function to traverse the devices and obtain a list of device objects.

manner = DeviceManager();
streamdocks = manner.enumerate();

After obtaining the list of device objects, you need to call the open() method to open the device before calling other methods to operate on the device.

 for device in streamdocks:
    device.open()
    device.refresh()
    t1 = threading.Thread(target=device.whileread)
    t1.start()
    # 0-100
    device.set_brightness(100)
    device.set_touchscreen_image("1.jpg")
    time.sleep(1)
    device.set_key_image("2.jpg",3)
    time.sleep(1)
    device.cleaerIcon(3)
    time.sleep(1)
    device.clearAllIcon()
    device.refresh()
    time.sleep(1)
    device.close()
    time.sleep(1)
Last Updated:
Contributors: Heart
Prev
Overview
Next
DeviceManager