Our server pr0vider carried out maintenance on 15 January 2020 but it corrupted some files in the process. If you notice anything out of the ordinary (partial files, pages not loading, that kind of shit) then let us know at:

Control multiple (infrared) devices from one server (w/ Andr0id app)

Wazakindjes f81a96a1a0 Apparently DateTime returns days/months without leading zer0es lmoa 3 months ago
app f5055758e0 Maybe initialise muhprefs before reading from it -.- 3 months ago
ass 33eeba80d3 Andr0id app: Added Samsung TV rem0te, changed some button texts to icons, consistent/betturd background c0l0ur for groups 5 months ago
lircd 5e710d73f1 Added --loglevel opti0ne to restart_lircd.sh, also renamed Samsung conf to be consistent w/ da rest lmoa 4 months ago
serbur f81a96a1a0 Apparently DateTime returns days/months without leading zer0es lmoa 3 months ago
.gitignore e407fb761c Tfw gitignored the lircd conf files xdxdxd 5 months ago
LICENSE 3e23f717cb Rep0 creation lol 5 months ago
README.md 4e2ec54606 Also forgot to add the device name/model -.- 5 months ago

README.md

The fuck is this

This shit is a dankass centralised remote control thanggGgGg for infrared devices. Hook up an IR blaster to like a Raspberry Pi and control that shit with y0 Android phone (rip iOS lmao).

The server side is a Perl skrip based on mein Meqqy code. Also, since the server only runs in SSL/TLS mode you'll need a certificate trusted by the clients used. It also has a built-in scheduler so you can turn on shit like LED strips before you come home. =]

The client side can be anything supporting a streaming (TCP) socket with TLS, but I'm using an Android app meinself (incl00ded in the app directory lol). This app has a target SDK of 25 which corresponds to Android 7.1 (I'm using 25 cuz that gives me full-size app icons w/o that adaptive cancer). If you're using a self-signed cert, you should be able to import it into Settings > Security > Credentials > Trusted CAs or smt similar and it'll be accepted. Alternatively you can just disable the cert check inside the app's settings. =]

Supported devices

Since I wrote this shit for meinself, the Android app only supports devices I actually own. The server side should work with any device though, as long as you can control it through lircd and modify the Perl skrip to parse a config section for it. I've included lircd config files for my own devices regardless:

  • Dymond LED strip
  • ADGE RM501 5-port HDMI input switcher
  • JVC MK-KC68 stereo tower
  • Samsung LT22C300 TV

Supported commands

  • !q[uit], !e[xit] => Attempt clean disconnect
  • !led[cont | stop] <$button> => Send a button code to em LED strip, cont is for sending signals continuously and stop is for stopping that shit (in my case, lircd ends a START_SEND after a bit over 1 minute)
  • !hdmi[cont | stop] <$button> => Ditt0 for em HDMI switcheroo
  • !stereo[cont | stop] <$button>
  • !tv[cont | stop] <$button>

Dependencies

Just some good ol' Perl modules:

  • Config::IniFiles
  • DateTime
  • File::Basename
  • IO::Handle
  • IO::Select
  • IO::Socket::INET
  • IO::Socket::SSL
  • Time::Local

You also need access to lircd and its irsend command in order to actually control devices. It varies wildly how to enable this per RPI model and OS/kernel versions, so look that shit up.

Installation

Copy muhconf.ini.example to muhconf.ini and fire up een editor. All the options are explained in there so git to reading fam. The config file must be kept in the same dir as the skrip.

Then, to run it as a "daemon" you can just use a screen session so you can still czech em output y0. My user's $HOME/.screenrc fiel contains:
screen -t rem0t0 bash -c "while true; do echo '(Re)starting rem0t0'; kill -9 $(ps aux | grep [p]erl.*rem0t0.pl | awk '{print $2}') > /dev/null 2>&1 ; /home/hecks/rem0t0/serbur/rem0t0.pl; sleep 5; done"

And the user's crontab has:
@reboot screen -dmS Hax

ez pz ;]

Releasing modified (and signed) APKs

You'll need to make some adjustments if you want to release signed APKs lol. Refer to the section right here (only applies to Mac OS X, if you're on Windows then idk how to do something similar :>).

Usage

scr0t scr0t scr0t scr0t
Deez nuts scr0ts should be p self-explanatory imo tbh. As you can see, you can specify labels for the HDMI switch's buttons (cuz I always forget which is which ;_;).

If you longpress on a button (i.e. hold it for 300ms) it will send a cont command, then when you release em it will send a stop command. This works for all remotes, but there's no real point for it in regards to the HDMI switch. ;;]];];];];