Announcement

Collapse
No announcement yet.

tcp <-> rs232 / keyboard

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • tcp <-> rs232 / keyboard

    Ok, let's see if there are any ideas here...

    To integrate my home cinema computer and some connected hardware with my home automation, I would need to communicate via TCP to the computer, in order to send/receive things to/from its serial port (control amplifier) and to trigger keypresses (control apps). Up to now I was using EventGhost, but following some database-disaster their website died and their move to GitHub is not without issues - I fear it may be the beginning of the end of project. Still working, but it made me start looking for alternatives.

    NodeRED is often mentioned, but as it is more of a server-concept, triggering keypresses is more tricky. In addition, it is more aimed at Linux installation and - while it can run in a virtual machine on my Windows - that really limits the possibilities (no access to com port or keyboard events). Running on Windows is possible, but still the keypresses would be problematic. So I'm looking at other options. I may use NodeRED for some other devices (TV can be controlled via it), but I'm not sure it is the tool for the com-port or the keyboard.

    I came across com0com ( https://com0com.sourceforge.net/ ), which offers tcp-com functionality. Haven't tried it yet, but from what I read it should work quite well. That still leaves the keypresses. I found AAC Keys ( https://aacinstitute.org/aac-keys/ ) which should allow serial to keyboard events, which - combined with com0com - should give me tcp-com-keyboard. Seems a bit far-fetched though... and still relying on potentially poorly supported software. I also thought of MacroDeck, but cannot seem to find how to trigger macros via TCP (without using the cloud-webclient). I found some software (twedge), which is used to translate e.g. serial barcode readers or scales to keyboard inputs, but they are very expensive.

    As an ideal alternative, I now came across some Arduino projects, which show it can emulate a USB-HID device. It would actually allow me to send data to the arduino via a serial port, and have the arduino send it back as a keyboard via USB. I don't have much experience with Arduino, but I have two lying around (an Uno and a Mega2560, and a bunch of sensors and small hardware). I'm tempted to go that route as it seems fun and could offer me the most options (I could even think of adding an ir receiver and transmitter...). I still would need the com0com tool to translate TCP to serial, but if the idea works well it is probably possible to upgraded the Arduino with a network connection (or replace it with one that has).

    Any other ideas?
    Thanks!
    pixar
    Dream as if you'll live forever. Live as if you'll die tomorrow. (James Dean)

  • #2
    Way over my head.
    Join MURCs Distributed Computing effort for Rosetta@Home and help fight Alzheimers, Cancer, Mad Cow disease and rising oil prices.
    [...]the pervading principle and abiding test of good breeding is the requirement of a substantial and patent waste of time. - Veblen

    Comment


    • #3
      It was not clearly written... to enlighten...

      I have a home automation system (Loxone), and would like it to communicate with my pc (to control an amlifier via the serial port and to control apps via keyboard inputs. I'm using EventGhost, but would like some alternative.

      Just now, I managed to get it the serial communcation to work with NodeRED on a Hyper-V VM and COMPipe ( https://github.com/tdhoward/COMpipe ). On Hyper-V, I defined a named comport as a named pipe. Then, using COMpipe, I connected the comport of the host (to which the amplifier is connected) to that named pipe. And it works: I can send tcp packets to NodeRed, and they get passed on to the amplifier. It replies and via NodeRed passes them back via UDP.

      Keypresses are a whole other matter, but very happy that the comport works.
      Last edited by VJ; 24 September 2023, 10:39.
      pixar
      Dream as if you'll live forever. Live as if you'll die tomorrow. (James Dean)

      Comment


      • #4
        Way over my head

        It isn't you.
        Join MURCs Distributed Computing effort for Rosetta@Home and help fight Alzheimers, Cancer, Mad Cow disease and rising oil prices.
        [...]the pervading principle and abiding test of good breeding is the requirement of a substantial and patent waste of time. - Veblen

        Comment

        Working...
        X