1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Remote Control Via Raw TCP command Help

Discussion in 'Hyperion General' started by Tdoc, 21 February 2018.

  1. Tdoc

    Tdoc New Member

    Messages:
    3
    Hardware:
    RPi3
    I appologize in advance if this is a little long-winded, I'm a bit of a noob and have to talk myself through this.

    I have a working Hyperion setup on my RPi3 running Libreelec 8.2.1. The Kodi grabber works great and I have the official android app running on an old android tablet to manually control the colours and effects. The Tablet is loaded with an app called Anymote that turns the device into custom remote control utilising the build in IR blaster to turn on my TV/Sound Bar etc.

    What I would like to do is add a couple buttons on the remote to adjust the manual colour and effect options like in the Android app. Anymote offers a feature to send a Raw TCP command with a button press.

    In researching it appears to me that the official android Hyperion app utilises TCP and communicates with the Hyperion Server through the port 19444 (Default setting?) using the JSON interface. By ssh'ing into my RPi and running the hyperion-remote command with the --print option I could see the messages sent to the server.

    Example : LibreELEC:~/hyperion/bin # ./hyperion-remote --print -c red
    Returns : {"command":"color","priority":100,"color":[255,0,0]}

    • I then tried to send the the JSON command in a Raw TCP command in Anymote. No luck
    • I also tried to send the same command from my PC using a packet sender program. No Luck
    I installed tcpdump on the RPi to monitor the TCP traffic at port 19444 of the RPi. I was able to run tcpdump and see the messages in ASCII form from each of the android app, PC packet sender, and the raw message from Anymote.

    Each message in tcpdump contained the string {"command":"color","priority":100,"color":[255,0,0]} but the android app was the only method to produce a change in the leds.

    I'm worried that I'm missing something fundamental with the TCP command which is resulting in my message not being interpreted by the Hyperion server. If anyone has any ideas or hints that would be greatly appreciated.

    Thanks




     
  2. penfold42

    penfold42 Moderator Developer

    Messages:
    739
    Hardware:
    RPi1/Zero, RPi2, RPi3, 32/64bit, +Arduino, +nodeMCU/ESP8266
    How are you terminating the line ?

    Look carefully at the txpdump for CR and NL characters
     
  3. penfold42

    penfold42 Moderator Developer

    Messages:
    739
    Hardware:
    RPi1/Zero, RPi2, RPi3, 32/64bit, +Arduino, +nodeMCU/ESP8266
  4. Tdoc

    Tdoc New Member

    Messages:
    3
    Hardware:
    RPi3
    Thanks for the tip. I will give that a try tonight when I have access to my setup.
     
  5. Tdoc

    Tdoc New Member

    Messages:
    3
    Hardware:
    RPi3