8000 GitHub - Unimat45/pport: Easily control your parallel port's data line with a fresh web-based ui
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Unimat45/pport

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PPORT

Control your linux server's parallel port easily with this fast and intuitive program

Written in C, using this WebSocket Library by Theldus

Take note that this program only works for linux machines!

Links

Server API

The communication with the server is done through binary array messages, following a specific format documented here

Examples

// Show port state
uint8_t message = { 1 };

// Set the first pin's state as high
uint8_t message = { 2, 2, 1 };

// Set the third pin's label as "Hello"
uint8_t message = { 4, 5, 'H', 'e', 'l', 'l', 'o', 0 };

Web Interface

The web interface is written in vanilla html and css, but is using Vite and TypeScript, that need to be compiled to run. See Installation to do so.

There are 2 pages available: index and settings.

Index page is prety simple, 8 switches. Just click on a switch to toggle it

The settings page is a bit more complicated. The top is the simpler part, it is pretty much the same as the index page, but you can change the pin label by clicking it. It will save once you click away from the input.

The timings section is where things become weird. You can add a timing by click the + button. In this new timing, you can specify a day and month range you want it to execute, the time it should execute and whether you want to turn on or off this pin. No changes will be made unless you click the Save button.

Installation

Download the source code and build it using CMake. There is a custom flag to change the config file directory.

git submodule update --init
cmake -B build -D CMAKE_BUILD_TYPE=Release -D CFG_FILE=/etc/pport.cfg .
make -j$(nproc) -C build
sudo make install

To build the web ui, it is as simple as

npm install
npm run build

from the web-ui/ directory. The bundled site will be available in the dist/ folder

TODO

  1. Better handling of the label input
  2. Add compile flag for WebSocket port

About

Easily control your parallel port's data line with a fresh web-based ui

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0