Skip to content

evanpurkhiser/media-center-automation

Repository files navigation

Media Center Automation

I have a very small media center in my bedroom with:

The PC is running a minimal arch linux installation with Kodi. I'm using a 8Bitdo NES30 bluetooth controller to control this setup. I also have a IRToy v2 connected to the PC allowing me to control the TV and amp.

This repository contains some small tools and configurations I use to automate my setup, with low power usage and convenience in mind.

  • LIRC remote configurations for the SMSL Q5 Amp and LG TV.
  • udev rule to apply the proper attribute to the NES30 bluetooth device
  • Kodi keymapping for the NES30 bluetooth remote

For detailed specifics on the PC configuration see the ansible playbook used to provision it.

Bluetooth connection status automation

The included bt-power-listener script is used to listen for connection status changes for the NES30 controller. The idea is that the power status of the controller should dicate the media center being 'in use' or not.

Power On:

  • Start the Kodi standalone service using systemd
  • Power on my TV and amp with lirc

Thes two actions will only happen under the condition that Kodi isn't already started and playing a video.

Power Off:

  • Stop the kodi standalone service using systemd
  • Power off my TV and amp with lirc

These actions will only happen if Kodi is not currently playing any media. In that case instead a notification will be displayed on screen to alert me to turn the controller back on if it has disconnected.

HDMI switcher Kodi script

This simple script is used to switch HDMI inputs on my TV. It will also suspend the bluetooth controller power listener, so that turning off the controler (or having it go into standby) will not trigger the TV and amp to turn off.

The script will bring up a dialog where pressing "OK" will switch back to the first input, this allows the workflow of:

  1. Turn on Xbox or other device connected to HDMI-2
  2. Run the hdmi.switcher script (Likely from a home menu item)
  3. Use the device (game on!)
  4. Turn the controller back on and press "A" for OK.

Arch Linux installation

A PKGBUILD file is provided in my PKGBUILDs repository

About

Some scripts / configurations used to automate my media center

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages