Kodi Community Forum
[RELEASE] Cinema Experience - the new Home Theater Experience Script - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Add-on Support (https://forum.kodi.tv/forumdisplay.php?fid=27)
+---- Forum: Program Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=151)
+---- Thread: [RELEASE] Cinema Experience - the new Home Theater Experience Script (/showthread.php?tid=87563)



RE: [RELEASE] Cinema Experience - the new Home Theater Experience Script - Cinephile - 2014-07-29

For what it's worth, 4.0.13 is the only stable release for me - dev version or not. All previous iterations simply didn't run at all (or mysteriously messed with my system, like resetting my screensaver options).

4.0.13 fixed all of this.

OpenElec user here.


RE: [RELEASE] Cinema Experience - the new Home Theater Experience Script - Slider1385 - 2014-08-02

Does anybody know if it's possible to remove the info screen that pops up when buffering streaming trailers?

I'm using Aeon MQ5 and have gotten everything in cinema experience working great. My only tiny issue is that when the movie trailers start all the info for the trailer comes up while it is buffering. I'd rather not read all about the movie before the trailer starts, plus half the fun in the theaters is guessing what movie the trailer is. Any help would be greatly appreciated!!!!


RE: [RELEASE] Cinema Experience - the new Home Theater Experience Script - emann30 - 2014-08-03

Looks like we are going to need some movie intro , outro , coming soon videos , and featured presentation with the name Kodi on it.


RE: [RELEASE] Cinema Experience - the new Home Theater Experience Script - Gedusu - 2014-08-06

(2013-07-30, 21:47)bry- Wrote: Thats awesome. You can pull it down using keepvid.com

or simply take http://convert2file.com


RE: [RELEASE] Cinema Experience - the new Home Theater Experience Script - wo0d1e - 2014-08-07

Can anyone help with a HA query. I posted a little while back and @giftie helped a lot. I am setup in my new home now and everything is up and running including CE. I just still cannot get my LightwaveRF lights to work with the HA script. I know it is something simple I am over looking.

The Lightwave wifi link waits for data packets to be received via UDP on 255.255.255.255 port 9760 then activates the lights depending upon data received. For example I have an app called Irule that I use to control all my HA and media. In the app I have a gateway configured as above ip:255.255.255.255 port:9760 Protocol:UDP a device is assigned which simply sends a data packet to the wifi link. (Example !R2D1F0 = !Room 2 Device 1 Function 0 (OFF) 1= (ON).

So my theory goes that to duplicate the apps abilities I should be able to paste the code: utils.broadcastUDP( "!R2D1F0”, port=9760 ) within the Home_Automation.py script, at each trigger point like so:

# This module's future home should be inside userdata/addon_data/script.cinema.experience/ha_scripts
# to make sure it does not get over written when updating the script

import xbmc, xbmcaddon
import sys, urllib2, os
from threading import Thread
from urllib import urlencode

__script__ = sys.modules[ "__main__" ].__script__
__scriptID__ = sys.modules[ "__main__" ].__scriptID__
triggers = sys.modules[ "__main__" ].triggers
ha_settings = sys.modules[ "__main__" ].ha_settings
BASE_RESOURCE_PATH = sys.modules["__main__"].BASE_RESOURCE_PATH
sys.path.append( os.path.join( BASE_RESOURCE_PATH, "lib" ) )
import utils

class Automate:
def __init__( self ):
pass

def sab_pause(self, mode):
"""
This function provides a method to pause and resume SabNZBd downloading, very useful on a limited network or low powered system

Usage:

apikey - Your SabNZBd API key goes here
ip - The IP of your SabNZBd Machine, if local, leave as is, if it does not work, put the actual address in
port - Normally 5000 but change it to match you SabNZBd program

Pause:

self.sab_pause( "pause" )

Resume:

self.sab_pause( "resume" )
"""
apikey = ""
ip = "127.0.0.1" # address
port = "5000"
url = "http://%s:%s/sabnzbd/" % ( ip, port )
query = {}
query[ "mode" ] = mode
query["apikey"] = apikey
response = urllib2.urlopen( urllib2.Request( url + "api?", urlencode( query ) ) )
response_data = response.read()

def activate_ha( self, trigger = None, prev_trigger = None, mode="normal" ):
if ha_settings[ "ha_enable" ]:
if ha_settings[ "ha_multi_trigger" ] and prev_trigger == trigger:
pass
elif mode != "thread":
self.activate_on( trigger )
else:
thread = Thread( name='ha_trigger', target=self.activate_on, args=( trigger, ) )
thread.start()
prev_trigger = trigger
return prev_trigger

def activate_on( self, trigger = None ):
"""
Scripting to trigger almost anything(HA, other scripts, etc...) when videos start.

Usage:
activate_on( "Movie" )
will trigger code that is set under the Movie heading.

"""
if not trigger:
utils.log( " - [ home_automation.py ] - No Trigger Sent, Returning", xbmc.LOGNOTICE )
return
utils.log( " - [ home_automation.py ] - activate_on( %s ) Triggered" % trigger, xbmc.LOGNOTICE )
if trigger in triggers:
utils.log( " - [ home_automation.py ] - Trigger %s" % trigger, xbmc.LOGNOTICE )
# Script Start
if trigger == "Script Start" and ha_settings[ "ha_script_start" ]:
# place code below this line
pass
# Trivia Intro
elif trigger == "Trivia Intro" and ha_settings[ "ha_trivia_intro" ]:
# place code below this line
pass
# Trivia
elif trigger == "Trivia" and ha_settings[ "ha_trivia_start" ]:
# place code below this line
pass
# Trivia Outro
elif trigger == "Trivia Outro" and ha_settings[ "ha_trivia_outro" ]:
# place code below this line
pass
# Movie Theatre Intro
elif trigger == "Movie Theater Intro" and ha_settings[ "ha_mte_intro" ]:
# place code below this line
pass
# Coming Attractions Intro
elif trigger == "Coming Attractions Intro" and ha_settings[ "ha_cav_intro" ]:
# place code below this line
pass
# Trailer
elif trigger == "Movie Trailer" and ha_settings[ "ha_trailer_start" ]:
# place code below this line
pass
# Coming Attractions Outro
elif trigger == "Coming Attractions Outro" and ha_settings[ "ha_cav_outro" ]:
# place code below this line
pass
# Feature Presentation Intro
elif trigger == "Feature Presentation Intro" and ha_settings[ "ha_fpv_intro" ]:
# place code below this line
utils.broadcastUDP( "!R1D4F0”, port=9760 )
utils.broadcastUDP( "!R2D1F0", port=9760 )
#3D Intro
elif trigger == "3D Intro" and ha_setting [ "ha_3d_intro" ]:
# place code below this line
pass
#3D Trailers
elif trigger == "3D Movie Trailer" and ha_setting [ "ha_3d_trailer" ]:
# place code below this line
pass
#3D Outro
elif trigger == "3D Outro" and ha_setting [ "ha_3d_outro" ]:
# place code below this line
pass
# MPAA Rating
elif trigger == "MPAA Rating" and ha_settings[ "ha_mpaa_rating" ]:
# place code below this line
pass
# Countdown
elif trigger == "Countdown" and ha_settings[ "ha_countdown_video" ]:
# place code below this line
pass
# Audio Format
elif trigger == "Audio Format" and ha_settings[ "ha_audio_format" ]:
# place code below this line
pass
# Movie
elif trigger == "Movie" and ha_settings[ "ha_movie" ]:
# place code below this line
pass
# Feature Presentation Outro
elif trigger == "Feature Presentation Outro" and ha_settings[ "ha_fpv_outro" ]:
# place code below this line
pass
# Movie Theatre Intro
elif trigger == "Movie Theatre Outro" and ha_settings[ "ha_mte_outro" ]:
# place code below this line
pass
# Intermission
elif trigger == "Intermission" and ha_settings[ "ha_intermission" ]:
# place code below this line
pass
# Script End
elif trigger == "Script End" and ha_settings[ "ha_script_end" ]:
# place code below this line
utils.broadcastUDP( "!R1D4F1”, port=9760 )
utils.broadcastUDP( "!R2D1F1”, port=9760 )
# Paused
elif trigger == "Pause" and ha_settings[ "ha_paused" ]:
# place code below this line
utils.broadcastUDP( "!R1D4F1”, port=9760 )
utils.broadcastUDP( "!R2D1F1”, port=9760 )
# Resumed
elif trigger == "Resume" and ha_settings[ "ha_resumed" ]:
# place code below this line
utils.broadcastUDP( "!R1D4F0”, port=9760 )
utils.broadcastUDP( "!R2D1F0", port=9760 )
else:
utils.log( " - [ home_automation.py ] - Opps. Something happened", xbmc.LOGNOTICE )

The HA script is enabled in CE settings but can anyone shed any light on why the commands are not being received ? Do I need to put a tick at the end of each "Trigger at the start of" option in the HA settings ?also does the utils.broadcastUDP automatically broadcast over 255.255.255.255 or do I need to tell it somewhere in the script? any and all advice is welcome.

I should mention that the idea behind this is that once the feature presentation starts the lights come down. They will come up if paused, down if resumed and up at the end of the script.


RE: [RELEASE] Cinema Experience - the new Home Theater Experience Script - moravec - 2014-08-07

Hello Giftie

I have to use 4.0.13 because with 4.0.10 our JSON remote control for xbmc doesn't work.- no respond at all..

With 4.0.13 I always have a crash during the movie.

See here:
http://forum.xbmc.org/showthread.php?tid=201311

Can you please have a look why it crashes...

Thank you very much.
Christian


RE: [RELEASE] Cinema Experience - the new Home Theater Experience Script - giftie - 2014-08-08

(2014-08-07, 14:01)wo0d1e Wrote: Can anyone help with a HA query. I posted a little while back and @giftie helped a lot. I am setup in my new home now and everything is up and running including CE. I just still cannot get my LightwaveRF lights to work with the HA script. I know it is something simple I am over looking.

The Lightwave wifi link waits for data packets to be received via UDP on 255.255.255.255 port 9760 then activates the lights depending upon data received. For example I have an app called Irule that I use to control all my HA and media. In the app I have a gateway configured as above ip:255.255.255.255 port:9760 Protocol:UDP a device is assigned which simply sends a data packet to the wifi link. (Example !R2D1F0 = !Room 2 Device 1 Function 0 (OFF) 1= (ON).

So my theory goes that to duplicate the apps abilities I should be able to paste the code: utils.broadcastUDP( "!R2D1F0”, port=9760 ) within the Home_Automation.py script, at each trigger point like so:

The form seems proper, as it is the same that is used in the EventGhost home_automation.py.
Quote:The HA script is enabled in CE settings but can anyone shed any light on why the commands are not being received ? Do I need to put a tick at the end of each "Trigger at the start of" option in the HA settings ?
You need to have any of the trigger's enabled in settings, ie the one for the feature presentation, pause and resume.
{quote]
also does the utils.broadcastUDP automatically broadcast over 255.255.255.255 or do I need to tell it somewhere in the script?
{/quote]
Yes the utils.broadcastUDP() does default to 255.255.255.255.

Couple of questions:

1> are you modifying the home_automations.py file found inside /userdata/addon_data/script.cinema.experience/ha_scripts ?
2> are you disabling then re-enabling Cinema Experience(in Settings>Addons>Enabled Addons>Program Addons, after you make these changes? This is needed due to the fact there is a part of the script(the part that handles the Pause/Resume) that is always running. There are some skins that have Cinema Experience as a requirement(Ace for instance). This causes the script not to be Disabled, you'll have to restart XBMC to get the same affect.

Also you can use a network packet sniffing program to view the network traffic and see if the broadcast is going out.

(2014-08-07, 23:06)moravec Wrote: Hello Giftie

I have to use 4.0.13 because with 4.0.10 our JSON remote control for xbmc doesn't work.- no respond at all..

With 4.0.13 I always have a crash during the movie.

See here:
http://forum.xbmc.org/showthread.php?tid=201311

Can you please have a look why it crashes...

Thank you very much.
Christian

Not sure what the cause is, you can run XBMC in Debug mode, try again, then post the log, it might contain more info.


RE: [RELEASE] Cinema Experience - the new Home Theater Experience Script - wo0d1e - 2014-08-08

(2014-08-08, 05:58)giftie Wrote: [quote='wo0d1e' pid='1768052' dateline='1407412888']
Can anyone help with a HA query. I posted a little while back and @giftie helped a lot. I am setup in my new home now and everything is up and running including CE. I just still cannot get my LightwaveRF lights to work with the HA script. I know it is something simple I am over looking.

The Lightwave wifi link waits for data packets to be received via UDP on 255.255.255.255 port 9760 then activates the lights depending upon data received. For example I have an app called Irule that I use to control all my HA and media. In the app I have a gateway configured as above ip:255.255.255.255 port:9760 Protocol:UDP a device is assigned which simply sends a data packet to the wifi link. (Example !R2D1F0 = !Room 2 Device 1 Function 0 (OFF) 1= (ON).

So my theory goes that to duplicate the apps abilities I should be able to paste the code: utils.broadcastUDP( "!R2D1F0”, port=9760 ) within the Home_Automation.py script, at each trigger point like so:

The form seems proper, as it is the same that is used in the EventGhost home_automation.py.
Quote:The HA script is enabled in CE settings but can anyone shed any light on why the commands are not being received ? Do I need to put a tick at the end of each "Trigger at the start of" option in the HA settings ?
You need to have any of the trigger's enabled in settings, ie the one for the feature presentation, pause and resume.
{quote]
also does the utils.broadcastUDP automatically broadcast over 255.255.255.255 or do I need to tell it somewhere in the script?
{/quote]
Yes the utils.broadcastUDP() does default to 255.255.255.255.

Couple of questions:

1> are you modifying the home_automations.py file found inside /userdata/addon_data/script.cinema.experience/ha_scripts ?
2> are you disabling then re-enabling Cinema Experience(in Settings>Addons>Enabled Addons>Program Addons, after you make these changes? This is needed due to the fact there is a part of the script(the part that handles the Pause/Resume) that is always running. There are some skins that have Cinema Experience as a requirement(Ace for instance). This causes the script not to be Disabled, you'll have to restart XBMC to get the same affect.

Also you can use a network packet sniffing program to view the network traffic and see if the broadcast is going out.


Couple of questions:

1> Yes
2> I will try this this evening when I am home from the office, looks to be a good start point Giftie. With Openelec XBMC running and CE I generally have mapped to /userdata/addon_data/script.cinema.experience/ha_scripts opened the script with Text Edit on Mac and made amendments. Then I have tested. I have never disabled the add-on first. Good Idea.

I will give the above a go and then fire up Wireshark if its a no go. I'm just glad the script layout looks good. I am sure it will be resolved in no time with your troubleshooting tips. :-)


RE: [RELEASE] Cinema Experience - the new Home Theater Experience Script - moravec - 2014-08-08


(2014-08-07, 23:06)moravec Wrote: Hello Giftie

I have to use 4.0.13 because with 4.0.10 our JSON remote control for xbmc doesn't work.- no respond at all..

With 4.0.13 I always have a crash during the movie.

See here:
http://forum.xbmc.org/showthread.php?tid=201311

Can you please have a look why it crashes...

Thank you very much.
Christian

Not sure what the cause is, you can run XBMC in Debug mode, try again, then post the log, it might contain more info.




here the Crash with debug log:
http://forum.xbmc.org/showthread.php?tid=201311&pid=1769117#pid1769117


RE: [RELEASE] Cinema Experience - the new Home Theater Experience Script - wo0d1e - 2014-08-09

(2014-08-08, 12:50)wo0d1e Wrote:
(2014-08-08, 05:58)giftie Wrote: [quote='wo0d1e' pid='1768052' dateline='1407412888']
Can anyone help with a HA query. I posted a little while back and @giftie helped a lot. I am setup in my new home now and everything is up and running including CE. I just still cannot get my LightwaveRF lights to work with the HA script. I know it is something simple I am over looking.

The Lightwave wifi link waits for data packets to be received via UDP on 255.255.255.255 port 9760 then activates the lights depending upon data received. For example I have an app called Irule that I use to control all my HA and media. In the app I have a gateway configured as above ip:255.255.255.255 port:9760 Protocol:UDP a device is assigned which simply sends a data packet to the wifi link. (Example !R2D1F0 = !Room 2 Device 1 Function 0 (OFF) 1= (ON).

So my theory goes that to duplicate the apps abilities I should be able to paste the code: utils.broadcastUDP( "!R2D1F0”, port=9760 ) within the Home_Automation.py script, at each trigger point like so:

The form seems proper, as it is the same that is used in the EventGhost home_automation.py.
Quote:The HA script is enabled in CE settings but can anyone shed any light on why the commands are not being received ? Do I need to put a tick at the end of each "Trigger at the start of" option in the HA settings ?
You need to have any of the trigger's enabled in settings, ie the one for the feature presentation, pause and resume.
{quote]
also does the utils.broadcastUDP automatically broadcast over 255.255.255.255 or do I need to tell it somewhere in the script?
{/quote]
Yes the utils.broadcastUDP() does default to 255.255.255.255.

Couple of questions:

1> are you modifying the home_automations.py file found inside /userdata/addon_data/script.cinema.experience/ha_scripts ?
2> are you disabling then re-enabling Cinema Experience(in Settings>Addons>Enabled Addons>Program Addons, after you make these changes? This is needed due to the fact there is a part of the script(the part that handles the Pause/Resume) that is always running. There are some skins that have Cinema Experience as a requirement(Ace for instance). This causes the script not to be Disabled, you'll have to restart XBMC to get the same affect.

Also you can use a network packet sniffing program to view the network traffic and see if the broadcast is going out.


Couple of questions:

1> Yes
2> I will try this this evening when I am home from the office, looks to be a good start point Giftie. With Openelec XBMC running and CE I generally have mapped to /userdata/addon_data/script.cinema.experience/ha_scripts opened the script with Text Edit on Mac and made amendments. Then I have tested. I have never disabled the add-on first. Good Idea.

I will give the above a go and then fire up Wireshark if its a no go. I'm just glad the script layout looks good. I am sure it will be resolved in no time with your troubleshooting tips. :-)

Hey Giftie I Tried all of the above still a no go. I had Wire shark running and saw no broadcast across subnet to port 9760 from CE. I enclose an xbmc log and wonder if you can make sense from it. I turned the lights on and off with iPhone and recorded the broadcasts in wireshark, but definitely no broadcasts from CE. I know this can work it just needs to fire out :-) and receive. I know I'm close.

http://xbmclogs.com/show.php?id=264543

Cheers


RE: [RELEASE] Cinema Experience - the new Home Theater Experience Script - cr08 - 2014-08-16

Been following this plugin for ages and even though I don't have a proper home theater to speak of yet, still fun to play with. I have been toying with the idea of a future movie marathon project and utilizing CE to accomplish it but running into a small issue I am wondering if it is possible to work in somehow.

In this specific case what would happen is some of the features would have accompanying short clips to play back to back while using the multi-feature functionality to run an intermission between features. ie:

<Normal CE intro/slides/etc>
<Feature 1>
<Feature 1 short clip>
<Intermission>
<Feature 2>
<Intermission>
<Feature 3>
<Feature 3 short clip>

and so on. Any possibilities here? I'm willing to do some manual tweaking but wouldn't know where to begin. :|


RE: [RELEASE] Cinema Experience - the new Home Theater Experience Script - kasmca - 2014-08-16

I'm running Gotham 13.1 with Back Row Skin. I can not get Trailers working at all. Trivia, Theatre Intro, Feature Intro all work fine. None of the following work for me:
- Trailer Intro movie
- Trailer Streaming from Apple (newest)
- Trailer from local (network) directory
- changing number of trailers
- with or without filtering by rating
- Tried different skin

I will try to load a log but any ideas?


RE: [RELEASE] Cinema Experience - the new Home Theater Experience Script - kasmca - 2014-08-17

(2014-08-16, 16:35)kasmca Wrote: I'm running Gotham 13.1 with Back Row Skin. I can not get Trailers working at all. Trivia, Theatre Intro, Feature Intro all work fine. None of the following work for me:
- Trailer Intro movie
- Trailer Streaming from Apple (newest)
- Trailer from local (network) directory
- changing number of trailers
- with or without filtering by rating
- Tried different skin

I will try to load a log but any ideas?

I was able to get local trailers working. Forgot to add -trailers to the filename. However I still can not get it to stream or download from itunes. Also the intro to trailers video is also not working even when accessing local trailers.


RE: [RELEASE] Cinema Experience - the new Home Theater Experience Script - Zoltrix - 2014-08-18

(2014-08-08, 22:59)moravec Wrote:
(2014-08-07, 23:06)moravec Wrote: Hello Giftie

I have to use 4.0.13 because with 4.0.10 our JSON remote control for xbmc doesn't work.- no respond at all..

With 4.0.13 I always have a crash during the movie.

See here:
http://forum.xbmc.org/showthread.php?tid=201311

Can you please have a look why it crashes...

Thank you very much.
Christian

Not sure what the cause is, you can run XBMC in Debug mode, try again, then post the log, it might contain more info.




here the Crash with debug log:
http://forum.xbmc.org/showthread.php?tid=201311&pid=1769117#pid1769117

Same problem with 4.0.13 on Gotham 13.1. I used the script to start a movie. Paused it while the movie was playing, came back a few mins later and XBMC had crashed.

Is there a preferred stable version that works with Gotham? I also tried 4.0.8 from the start of this thread (when installed it shows as version 4.0.7). Though when I use that version, if I use the script once to start a movie, and try and use it again on a second movie, it does nothing, then XBMC freezes if I try and exit.

Same result with 4.0.10 that installs from the repo. Script only works once, and if you try and start it again, it does nothing, then XBMC freezes if you try and quit.

I've captured some logs using version 4.0.10. I was able to play two movies using the script. When I attempted to play the third movie using the script (10:47:32), nothing happened. I left XBMC for approx 10 mins, then I attempted to quit XBMC and it hung. Logs here.


RE: [RELEASE] Cinema Experience - the new Home Theater Experience Script - the.sq - 2014-08-20

Can someone help me with getting this running on my Apple TV 2?

It looks like there is an error with a value original_autorefresh missing...

Any insight? Many thanks in advance.

http://xbmclogs.com/show.php?id=272851