Coder Social home page Coder Social logo

pikvm-ir's Introduction

PiKVM Infrared

PiKVM Infrared (pikvm-ir) was born out of the need to control Infrared-based physical KVMs by simply using an IR blaster attached to the PiKVM GPIO. These ansible playbooks/roles aim to make it easier for a user to add the functionality of switching physical KVM console inputs to their PiKVM.

Overview

  • Installs a patched version of LIRC which hasn't seen an MR in 3 years

  • Sets LIRC to use GPIO to transmit IR codes. (RX planned soon(TM))

  • Installs an LIRC config file corresponding to the model of physical KVM

    • The official repository of LIRC Remotes is all but dead and could probably use a more official fork.
    • Currently only supports the EKL-81UA
    • When RX feature is implemented we will be able to capture more IR codes and support more KVMs as the need arises.
  • Adds macro buttons that correspond to your model of KVM to the PiKVM web interface using the built-in CMD Driver.

How to Install

Requirements

  • PiKVM provisioned and at a known IP address
  • SSH key copied over to the root user on the PiKVM (ssh-copy-id root@<ip or hostname>)
    • Remember that the default root password for PiKVM is root, but you did change it, right? ;)
  • PiKVM can access the public web (so we can download the patch, packages, etc.)
  • PiKVM has an IR LED wired properly
  • Ansible is installed on your workstation/laptop/etc.
    • Most people install ansible using their system's pythong, but we encourage you to use python virtual environments. If you are using pipenv, simply just run pipenv install

NOTE: This playbook has only been tested on fresh installs of PiKVM, no guarantees can be made about the integrity of a PiKVM that has already had customizations made to it.

Running the Playbooks

Fill out inventory.yaml to include the IP or hostname of your PiKVM instance. If you need to SSH as another user (other than root) be sure to fill that in as well. However, this user will need to be able to execute sudo.

---
pikvm-ir:
  children:
    infrared-tx:
      hosts:
        pikvm-tx:
          ansible_host: 192.168.1.30
      vars:
        ansible_user: root

Next we can run the playbook:

ansible-playbook -i inventory.yaml playbooks/bootstrap-tx.yaml

Alternatively, if you want to just install the patched version of LIRC you can run the lirc-patch-install.yaml playbook.

pikvm-ir's People

Contributors

crutonjohn avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

pikvm-ir's Issues

Support RX to read IR codes

Details

RX support should be added as it is the main driver of adopting new KVMs/devices.

Create a playbook and corresponding role to set up RX. Potentially find another GPIO pin that could support RX in addition to leaving TX funtional? RX doesn't require PWM so this might be possible, just needs some additional research.

Additional Information:

None for now

Drop LIRC in favor of ir-ctl

Details

Describe the solution you'd like:

Ideally I'd like to move away from using LIRC - patched or unpatched - due to it's uncertain future. As per the discussion in pikvm/pikvm#291 it seems like we can capture raw codes from ir-ctl and implement them as essentially raw TX.

In agile terms this could be viewed as a SPIKE, but may transform over the issue's lifetime.

Anything else you would like to add:

I've repurposed GPIO 19 as TX, and GPIO 16 as RX for the time being.

Some prelim testing indicates that this should be possible, but the config files are not nearly as user-friendly as the LIRC-based configs. I'd be happy to make that sacrifice so that the project can be on more stable ground instead of depending on 3 year old software.

Additional Information:

This may wind up encompassing #4 as well

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.