Skip to content

External equipment control

heitbaum edited this page Jun 27, 2021 · 2 revisions

Overview

This function was developed with aim that user will control it's all audio/video/MythTV equipment with help of single remote.

Generally, external equipment control allows turning on/off an TV and Audio System when user sleeps/resumes MythTV appliance.

Build-in External equipment control allows to conveniently deal with following scenarios:

  • MythTV appliance is connected to TV and uses TV’s internal audio speakers (so both video and audio content is played on TV)
  • MythTV appliance is connected to TV and to external audio system (so picture is played on TV, while audio is played on Audio System)

MiniMyth2 has also ability to save power when MythTV is idle (no playback). When idle period crosses defined value - Minimyth2 will turn-off TV and Audio system for save power. It will put itself to sleep (suspend-to-RAM) mode.

Additionally, Minimyth2 has extended power saving support for the scenario of audio-only playback. When user has separate TV and Audio systems - there maybe situations when keeping TV running is not necessary as the system may only be required to play audio. In such cases, after reaching the remote/keyboard idle time, Minimyth2 will automatically turn-off the TV, but will continue to keep the Audio System turned ON. Any key-press on remote/keyboard will turn ON TV again allowing user to control the audio playback.

Here are more details how to setup this function:

MORE DETAILS

How it works

External equipment control implemented with help of following functions:

  • Build-in IR blaster support which allows MythTV to control external equipment by this equipment remote controls
  • Simple scripting language allowing to define command sequences allowing to realize some basic multiple equipment control scenarios
  • Integration of Minimyth2 & MythTV control with external equipment control.
  • Extensibility in the Minimyth2 configuration allows adding new external equipment types for which the user wants to control. Detailed in the next sections describe each of above functions.

Build-in IR-blaster support.

Minimyth2 has build-in IR blaster support which is based on LIRC. It has also build-in daemon which allows to send even very long sequences of commands to multiple equipment in background. This allows user to trigger external equipment reconfiguration in background without any interruptions with the normal MythTV usage. Minimyth2 has build-in IR blaster support for some equipment. Additional equipment can be added with help of MM_LIRC_FETCH_IRBLASTER_CONF variable in minimyth.conf file.

Simple scripting language.

Minimyth2 has a very simple scripting language built-in, allowing to define external equipment control sequences. This allows for example:- running following sequence when user resumes the Minimyth2 MythTV appliance:

  1. turn on TV
  2. wait 2 seconds
  3. select appropriate HDMI input on TV
  4. turn-on Amplifier/Receiver
  5. wait 1 second
  6. volume down
  7. select appropriate input

For examples how to write such sequences, please look on minimyth.conf section related to external equipment control.

Integration with MythTV

This function allows coordinating the Minimyth2 MythTV appliance sleep/resume/power saving with external equipment (TV and Audio System) control. Its functionality was described at beginning of this page.

Extensibility to allow the addition of new equipment types

Minimyth2 has very few built-in external equipment definitions (generic SHARP, SAMSUNG TV's and SONY Amplifier/Receivers). There is ability to configure Minimyth2 to download (at boot time) a file from central server location which contains additional external equipment definitions.

General procedure is as follows:

  • find the appropriate IR remote config from http://lirc.sourceforge.net/remotes/.
  • the downloaded IR remote config (from the above step) should be put as lircd-irblaster.conf into conf-ro directory on the webserver.
  • minimyth.conf file should contain MM_LIRC_FETCH_IRBLASTER_CONF=‘yes’.
  • minimyth.conf should also contain command sequences which have references to the IR remote(s) name(s) defined in lircd-irblaster.conf and will be controlling the external equipment.