Premise Making mSense keep your display off for audio tracks

Motorola Premise

etc6849

Senior Member
Use case:
You are using the KODI Premise module and you start playback of a song using one of the KODI remote apps like YATSE.  Premise's mSense will turn on your projector, even though an audio track is playing.  This is a pain as my projector is not quiet.
 
For music, KODI has no problem playing it with no display turned on, and YATSE is a really nice remote control app if you don't want to have a display turned on for music. 
 
For movies, even though you'd think an HDMI handshake after mSense has started playing a movie in KODI would mess things up things work really well in KODI v17 Beta under Windows.  I'm even using KODI to decode all HD audio and send it to the Dirac Audio Processor running on the same PC (using Dirac's WASAPI audio driver).  PS: since Premise always gets feedback from KODI on what media is playing, Premise can turn on the preamp, dim the lights and even move an anamorphic lens based on the aspect ratio of an MKV file being played no matter which method you use to select the content in KODI.
 
Solution:
Find the MonitoredPower property for the projector's bound device and set it to disabled.  Set AudioVideo Output for the media zone to the AVR or Processor and NOT to the Projector.  Then make an OnChangeNowPlaying script under the media zone with code like this:
Code:
if not sysevent.newVal is nothing then
	' we are now playing something

	' if content is movies or TV, lets turn on display
	set oContent = this.NowPlaying

	if not oContent is nothing then
		if not oContent.IsOfExplicitType("sys://Schema/Media/AudioTrack") then
			' turn on projector
			Home.Theater.MediaZone.Projector.PowerState = true
		
			' ensure kodi is in front (handy if you use the EventGhost Premise module from etc6849)
			devices.CustomDevices.EventGhost_HTPC.EG_Tasks.Executable = "C:\Program Files (x86)\KODI\KODI.exe"
			devices.CustomDevices.EventGhost_HTPC.EG_Tasks.CreateTask "kodi", "task.newwindow"
			devices.CustomDevices.EventGhost_HTPC.EG_Tasks.kodi.BringToFrontMaximized = true
		end if
	end if
end if
 
Back
Top