Another Tool to Automate

For discussion of topics specific to MythTV on linux
Post Reply
sfatula
Senior
Posts: 159
Joined: Sun Aug 09, 2015 3:51 am
Location: Calera, OK
United States of America

Another Tool to Automate

Post by sfatula » Fri Jul 06, 2018 10:51 pm

Since moving from from a Windows system, I've really missed having EventGhost. I've found a pretty good tool, I think so at least. I am using inputexec, a python program:

https://github.com/rbarrois/inputexec

I am using it with an built in IR transceiver in my Intel Nuc (evdev). It assists with automating and evdev.

Here's a sample action file that I have thus far:

Code: Select all

[commands]
keypress.KEY_VOLUMEUP = systemctl poweroff
keypress.KEY_NUMERIC_0 = /home/sfatula/Documents/Scripts/StartMythfrontend.sh
So, volume up button on a remote that I don't own does a power off, this is actually sent from my home theater UPS when it reaches a certain amount of power left. The 0 key will start mythfrontend, that checks if already running, and if it is, gives focus to it. If it isn't, it runs it on the main display (projector). This 0 is actually sent by an IOS device, one of those graphical self made remotes (Touchcontrol). Once mythfrontend is started, the IOS remote can send the appropriate commands to the mythfrontend socket control port and I can have logically labelled buttons to control it. I am sure there will be a few other functions that will be done via inputexec, my xubuntu version seems to have a display bug with xfce where the screen goes blank and a command is needed to bring it back, so, a simple reset display button would run the appropriate command.

I am liking inputexec. It's a decent tool since I was really missing EventGhost. I am sure there are other tools, but, didn't see any mention here of this one so thought I'd mention it in case someone needs such a tool. An alternative to coding with python-evdev.

Post Reply