How to use light scene with Plex

Posted on
Sat Oct 04, 2014 3:11 am
henkjanvries offline
User avatar
Posts: 108
Joined: May 05, 2012

Re: How to use light scene with Plex

CntryDoe wrote:
I'm doing that too... but I'm using two LightPacks and software called Prismatik. I have indigo setup so that when the TV Turns on, it telnet's to the LightPack Software and turns the lights on. And depending on what input the receiver is on, optionally turn on the "Action Light" Software (Mac app store) to send the colors out to the bulbs.

Basically I'm sending HDMI #2 out from my receiver to a HDMI to Composite adapter -> Composite to USB -> Mac Mini for everything but Plex... When I hit the Plex input, it kills the video capture software and pulls up Plex Home Theater.

Seems to work fairly well. I snagged a quick video this morning but had to keep the audio off since people were still sleeping in the house.

http://youtu.be/hSuen5mqMOI


So how have you set up the ambilight scenario?

Posted on
Sat Oct 04, 2014 12:21 pm
CntryDoe offline
Posts: 13
Joined: Mar 18, 2013

Re: How to use light scene with Plex

So I'm using LightPack ( http://lightpack.tv ) for the Ambilight behind the TV

Acton Light ( https://itunes.apple.com/us/app/action- ... 8368?mt=12) and Hue for Room Lighting

The Code I'm using for Activating LightPack from Indigo, It's ugly but it works:
Code: Select all
set telnet to "telnet MY-IP MY-PORT"
set apikey to "apikey:{MY API Key}"
set lock to "lock"
set status to "setstatus:on"
set unlock to "unlock"
set done to "exit"
set clean to "exit -f"

tell application "Terminal"
   run
   do script telnet
   delay 2
   do script apikey in window 1
   --   delay 1
   do script lock in window 1
   --   delay 1
   do script status in window 1
   --   delay 1
   do script unlock in window 1
   --   delay 1
   do script done in window 1
   delay 2
   do script clean in window 1
   
   
end tell


The Code I'm using for Activating Action Light from Indigo
Code: Select all
activate application "Action Light"
delay 3
tell application "System Events"
   keystroke "a" using option down
end tell

Physical Connections
Image

Posted on
Sun Oct 05, 2014 2:20 am
henkjanvries offline
User avatar
Posts: 108
Joined: May 05, 2012

Re: How to use light scene with Plex

ive put the light packs on my wish list.

great stuff!

Posted on
Thu Dec 18, 2014 8:15 am
henkjanvries offline
User avatar
Posts: 108
Joined: May 05, 2012

Re: How to use light scene with Plex

For all those who use this or are interested.

Plex upgrade to Plex home theater with "home option". this means authentication.

here is my script:

Code: Select all
import urllib2
import xml.etree.ElementTree as ET
import string
import re

xml = urllib2.urlopen('http://10.0.1.102:32400/status/sessions?X-Plex-Token=YOURTOKENHERE')
data = xml.read()

root = ET.fromstring(data)

for string in root.findall(".//*[@machineIdentifier='YOURMACHINEIDHERE']"):
   state=string.attrib['state']

   try:
      state
   except NameError:
      print "nothing to see here"
   else:
      print state


added a bit, where it won't leave errors in the log when it tries to look for the machine and it isn't playing.

retrieve X-Plex-Token:
open library item in plex web and view info.,click on "view xml"
depending on your browser, you can find the token in de url, or the page shows you the xml and you an get it from there.

And again, because of use of element tree, you need to use applescript to output the "state", indigo can't work with element tree directly
hope this helps and have fun!

Posted on
Tue Oct 13, 2015 6:57 am
henkjanvries offline
User avatar
Posts: 108
Joined: May 05, 2012

Re: How to use light scene with Plex

So after some time, ive finished my custom cabinet with a venset tvlift and lightpacks.
All is integrated into indigo. Only the tv isnt, that one needs ir to turn on.

http://youtu.be/r5UmyQdZsBc

Who is online

Users browsing this forum: No registered users and 6 guests