Coder Social home page Coder Social logo

harmony2404's Introduction

Harmony with FLIRC Remote control Application

That application includes a systemd daemon that write all the inputs from a FLIRC USB Receiver to a pipe file located /var/run/flirc/flirc.pipe

That application will include a WebSocket that will read the pipe and send message events

A gui or console application will be created to read from that websocket and manage applications with the remote control using activities like Remote Buddy

Installation (Ubuntu LTS 24.04)

First install the flirc binaries (flirc_util, irtools) from https://flirc.com/ubuntu-software-installation-guide copying them into /usr/local/bin except for the appimage, the daemon uses flirc_util to check if the device is connected and to kick the device from bootloader when its power is interrupted.

Some extra packages are required to make it work (some packages have been renamed but its detected by apt)

sudo apt install libhidapi-hidraw0 libqt5core5a libqt5network5 libqt5xml5  libqt5xmlpatterns5 libhidapi-dev qtbase5-dev curl git

First, clone this repository

cd /tmp
git clone [email protected]:ngsoft/Harmony2404.git harmony
sudo mv harmony /opt
sudo chown -R $USER:$USER /opt/harmony
cd /opt/harmony
rm -rf .git
git init
git checkout -b main
git add .
git commit -m ":tada: first commit"

Some packages are required for the gui app to work, install them

sudo apt install xdotool evemu-tools

Some other packages can be installed if using gnome

sudo apt install libcanberra-gtk-module libcanberra-gtk3-module

Then install the service The package is auto installable on first execution

sudo /opt/harmony/usr/local/bin/flircd
sudo systemctl daemon-reload
sudo systemctl start flircd

InputLirc

We use a custom binary of inputlirc to capture the virtual keyboard InputLirc source code is located at lib/harmony/dist/inputlirc

Logs

Logs are located in these files

tail -f /var/log/flircd.log
tail -f /var/log/flircws.log

To read from the socket

sudo apt install netcat-traditional
nc -U /var/run/lirc/lircd

The websocket

If flircd is running a websocket is running on port 9030

ws://localhost.local:9030/ws

The gui

For the gui app I will use wails + svelte

sudo apt install build-essential libgtk-3-dev libwebkit2gtk-4.1-dev

On 24.04 Noble libwebkit2gtk-4.0-dev is not installable and that blocks the build process.

to fix that you need to modify /etc/apt/sources.list.d/ubuntu.sources

add jammy before noble

Types: deb
URIs: http://archive.ubuntu.com/ubuntu
Suites: jammy noble noble-updates noble-backports
Components: main universe restricted multiverse
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg

## Ubuntu security updates. Aside from URIs and Suites,
## this should mirror your choices in the previous section.
Types: deb
URIs: http://security.ubuntu.com/ubuntu/
Suites: noble-security
Components: main universe restricted multiverse
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg

then

sudo apt update
sudo apt install libwebkit2gtk-4.0-dev

then remove jammy from /etc/apt/sources.list.d/ubuntu.sources

sudo apt update
go install github.com/wailsapp/wails/v2/cmd/wails@latest

and wails will be working correctly (doctor will say libwebkit2gtk-4.0-dev is missing but wails dev and wails build will work correctly) to secure your package installation (preventing it to be removed, as of noble these packages are obolete, the risk is little)

sudo apt-mark hold libwebkit2gtk-4.0-dev
apt-mark showhold

harmony2404's People

Contributors

ngsoft avatar

Watchers

 avatar

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.