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!
The communication with the server is done through binary array messages, following a specific format documented here
// 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 };
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.
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
- Better handling of the label input
- Add compile flag for WebSocket port