Coder Social home page Coder Social logo

ledctl's Introduction

ledctl

This project aims to deliver a robust client-server command-line application that is able to stream live, low-latency LED color data to a controller via a wireless / wired network connection.


Work in progress

The project is currently under development. There might be bugs or inaccuracies on some parts of the documentation.


How it works

The client is launched on a Windows machine (Mac and Linux coming soon™) and the server on a microcontroller (e.g. Raspberry Pi) wired with the LED strip.

Once the server is running on the microcontroller, whenever the client is launched it will try to connect with the connection details provided through a config file.

When the connection is established, the client will start streaming data to the server via websocket, and the server will react according to the specified mode of operation (for now only the 'ambilight' mode is supported, more will be added soon).


So how do you install it?


Installation instructions

Client (e.g. Windows PC)

  1. Download the client binary for your operating system from here. Place it anywhere you want. Launch the executable. Right-click on the tray icon and quit.

  2. The default ledctl.json file was just created in your working directory.

  3. Edit the file to match your setup. NOTE: server.leds should be the sum of all of your displays' LEDs.

  4. Launch the client again. It will automatically connect to the server once the server is online.

Server (e.g. Raspberry Pi Zero W 2)

  1. Prerequisite: Have SSH enabled and be connected to a wifi network.
    For setup information look here: Headless Pi Zero W Wifi Setup (Windows)

  2. Login to the Raspberry Pi via SSH.

  3. Install tmux using the following command:

sudo apt-get install tmux -y

  1. Download the server binary (for example using wget):

wget https://github.com/rdnt/ledctl/releases/download/0.0.1-pre-release/ledctld-linux-arm64

  1. Mark the binary as executable:

sudo chmod +x ledctld-linux-arm64

  1. To start the server, simply write sudo ./ledctld-linux-arm64 on the terminal.

  2. (optional) Start the server at boot:
    Edit the /etc/rc.local file (sudo nano /etc/rc.local), adding the following before the exit 0 line, replacing LEDCTL_DIR with the directory where the ledctld binary resides.

tmux new-session -d -s ledctl 'cd /LEDCTL_DIR && sudo ./ledctld-linux-arm64'

If you reboot the server will start automatically.


Modes

Ambilight - Video : Captures the screen and sends averaged color data for each
  frame and for each monitor to its respecting LED segment.
Ambilight - Audio: same as Video, but captures audio and sends an audio spectrum
  instead.

Dependencies

This project depends on the following libraries, among others:


Contributing

You are free and actively encouraged to contribute to this project by either contributing code, creating issues, reporting bugs, highlighting vulnerabilities, proposing improvements or helping maintain the documentation.

If you would like to submit code changes, create a new branch from the main branch with the name of the feature you are implementing and submit a pull request to the main branch after you make your changes. Click here for a how-to guide.

In case you want to submit a bug report, please add as many details as possible regarding how the error occurred and include the steps required to reproduce it if that is possible. It will help a lot in testing, finding the cause and implementing fixes.


Changelogs

Changelogs for each and every release can be found here.


Copyright

Any reproductions of this project must include a link to this repository and the project's LICENSE file.

ledctl's People

Contributors

rdnt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

ledctl's Issues

同学,您这个项目引入了33个开源组件,存在1个漏洞,辛苦升级一下

检测到 rdnt/ledctl 一共引入了33个开源组件,存在1个漏洞

漏洞标题:go-yaml < 2.2.8拒绝服务漏洞
缺陷组件:gopkg.in/[email protected]
漏洞编号:CVE-2019-11254
漏洞描述:gopkg.in/yaml.v2是go语言中用于处理yaml格式的包。
在2.2.8之前的版本中,处理恶意的yaml数据时,会导致CPU资源耗尽。
漏洞由Kubernetes开发者在fuzz测试中发现并提交修复补丁。
国家漏洞库信息:https://www.cnvd.org.cn/flaw/show/CNVD-2020-35519
影响范围:(∞, 2.2.8)
最小修复版本:2.2.8
缺陷组件引入路径:main@->gopkg.in/[email protected]

另外还有几个漏洞,详细报告:https://mofeisec.com/jr?p=a658de

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.