GithubHelp home page GithubHelp logo

zopieux / qnapctl Goto Github PK

View Code? Open in Web Editor NEW
12.0 3.0 2.0 44 KB

Control QNAP TS-453 Pro hardware LEDs, LCD and react to button pushes.

License: MIT License

CMake 14.83% C++ 85.17%
qnap-nas qnap dbus systemd qt5 qt cpp17 cpp

qnapctl's Introduction

qnapctl

A tiny system daemon to control and react to QNAP hardware, including:

  • the panel LCD screen (toggle backlight and change displayed text)
  • the panel LCD buttons, usually for navigating the LCD display
  • the STATUS and USB LEDs
  • the USB COPY button
  • the disk ERROR LEDs

Also includes a demo program that makes use of the API exposed by the daemon.

Overview

Beware: this was developped and tested exclusively on the QNAP device I own, model TS-453 Pro. This code most likely won't work on different hardware.

TS-453 Pro features:

  • an A125 LCD panel with a 2ร—16 char display, backlight and two control buttons
  • a 4-disk bay, with activity and error LEDs for each of the 4 bays
  • some extra LEDs: dual-color status (green & red), USB activity and network activity (this one sadly cannot be controlled)

qnapd

qnapd is a C++ (Qt) daemon that:

  • reads from internal serial device /dev/ttyS1 to intercept LCD button presses (ENTER and SELECT)
  • writes to internal serial device /dev/ttyS1 to toggle LCD backlight and change LCD text
  • polls a raw I/O port to intercept USB COPY button presses
  • writes to a few raw I/O ports to toggle the various front panel LEDs

The daemon receives orders and broadcasts events using the system DBus. The DBus API is self-documented in the XML interface.

qnapctl

qnapctl is a C++ (Qt) program that communicates with qnapd to provide a few basic features:

  • blinks the green status LED faster or slower depending on load average
  • blinks the red status LED when there are failed systemd services
  • displays a few basic info on the LCD display eg. NIC IP addresses, using LCD buttons to navigate the various info

License

MIT, see LICENSE.

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.