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)



- rflores2323 - 2011-04-08

where is there information on how to set the home automation? read the past couple of pages and nothing on the front page. HOw is this set up and what can it be used for?

I was wondernig if I could get my lights to turn on/off when I hit play. I am using a URC light switch that is RF compatible with my URC-810 remote.. however would be nice to do it inside xbmc. I have no idea where to start however.


- ijourneaux - 2011-04-08

If I understood Giftie correctly, I don't beleive the home automation work is complete. It will require some customization beyond the configuration page(s) in HCE.

If the HCE script would be capable of generating events at the various positions in the script, it would be relatively easy to configure EventGhost or HomeSeer to react to the events and dim the light, shut blinds, etc. The nice thing with this approach is that HCE takes a passive role and just generates the events. The user could use any application that works for his platform or equipment to do the home automation.

Looking forward to the Home Automation functionality.


- rflores2323 - 2011-04-08

ok will wait to hear more information on this as it seems like a great idea.


- ezechiel1917 - 2011-04-08

Juanflaco Wrote:I'm having a heck of a time getting local trailers to play, and wondering if I'm just missing something simple. When streaming trailers via AMT lite, everything looks good but I'd like to pick three specific trailers for a kids' movie day tomorrow, and when I select the local source the script bypasses trailers entirely and moves straight to my feature presentation intro.

Trailers are named "Rango_5-trailer.mov" or similar, no .nfo files associated but I'm not trying to do any genre or rating matching. Do I need anything other than the trailers in the specified local directory?

Thanks in advance!

I have updated to newer git version (24/03->08/04 pvr ppa) and trailers from local folders suddenly stopped working here too.

PHP Code:
21:40:40 T:2778692464 M:1855320064  NOTICE: [script.cinema.experience] - Retriving Trailers3 Trailers
21
:40:40 T:2778692464 M:1855320064  NOTICE: [ script.cinema.experience ] - [ local folder scraper ] - Local Folder Trailer Scraper Started
21
:40:40 T:2778692464 M:1855320064  NOTICE: [ script.cinema.experience ] - [ local folder scraper ] - Fetching Trailers
21
:40:40 T:2778692464 M:1855320064  NOTICE: [ script.cinema.experience ] - [ local folder scraper ] - Getting Watched List
21:40:40 T:2778692464 M:1855320064  NOTICE: [folder.py] - dirEntries Activated
21
:40:40 T:2778692464 M:1855320064  NOTICE: [folder.py] - escapeDirJSON Activated
21
:40:40 T:2778692464 M:1855320064  NOTICE: [ script.cinema.experience ] - [ local folder scraper ] - Shuffling Trailers
21
:40:40 T:2778692464 M:1855320064  NOTICE: [ script.cinema.experience ] - [ local folder scraper ] - Resetting Watched List
21:40:40 T:2778692464 M:1855320064  NOTICE: [ script.cinema.experience ] - [ local folder scraper ] - Shuffling Trailers
21
:40:40 T:2778692464 M:1855320064  NOTICE: [ script.cinema.experience ] - [ local folder scraper ] - Saving Watched List
21:40:40 T:2778692464 M:1855320064  NOTICE: []
21:40:40 T:2778692464 M:1855320064  NOTICE: [script.cinema.experience] - Adding Coming Attraction Outro Video0 Videos
21
:40:40 T:2778692464 M:1855320064  NOTICE: [ script.cinema.experience ] - [ ce_playlist.py ] - _get_special_items() Started
21
:40:40 T:2778692464 M:1855320064   DEBUG: [ script.cinema.experience ] - [ ce_playlist.py ] - No Items
21
:40:40 T:2778692464 M:1855320064  NOTICE: [script.cinema.experience] - Adding Trailers0 Trailers 

giftie: do you have any idea what has changed in xbmc code recently that could prevent local scraper from working? can it be related to move to external python or JSONRPC changes?


- Laciecat - 2011-04-08

Slides for Cinema Experience


Burn After Reading
http://www.megaupload.com/?d=LLRUHYA6


- giftie - 2011-04-09

I kinda hate to say it, but using development software often causes things not to work. There has been quite a few things that will break scripts, JSON is one of them(though I am using a version with most of the JSON changes and all works fine) They also changed the Python language from internal(vers. 2.4) to external(depending on system that compiles XBMC, usually around 2.6) This also changes a couple of things and how addons may behave. The script should fail if it is due to Python though.... I'll have an updated version up soon that will spam XBMC with detail when XBMC is run in debug mode(also there are a couple of fixes).

I'll also update my build and see what breaks...

ezechiel1917 Wrote:I have updated to newer git version (24/03->08/04 pvr ppa) and trailers from local folders suddenly stopped working here too.

PHP Code:
21:40:40 T:2778692464 M:1855320064  NOTICE: [script.cinema.experience] - Retriving Trailers3 Trailers
21
:40:40 T:2778692464 M:1855320064  NOTICE: [ script.cinema.experience ] - [ local folder scraper ] - Local Folder Trailer Scraper Started
21
:40:40 T:2778692464 M:1855320064  NOTICE: [ script.cinema.experience ] - [ local folder scraper ] - Fetching Trailers
21
:40:40 T:2778692464 M:1855320064  NOTICE: [ script.cinema.experience ] - [ local folder scraper ] - Getting Watched List
21:40:40 T:2778692464 M:1855320064  NOTICE: [folder.py] - dirEntries Activated
21
:40:40 T:2778692464 M:1855320064  NOTICE: [folder.py] - escapeDirJSON Activated
21
:40:40 T:2778692464 M:1855320064  NOTICE: [ script.cinema.experience ] - [ local folder scraper ] - Shuffling Trailers
21
:40:40 T:2778692464 M:1855320064  NOTICE: [ script.cinema.experience ] - [ local folder scraper ] - Resetting Watched List
21:40:40 T:2778692464 M:1855320064  NOTICE: [ script.cinema.experience ] - [ local folder scraper ] - Shuffling Trailers
21
:40:40 T:2778692464 M:1855320064  NOTICE: [ script.cinema.experience ] - [ local folder scraper ] - Saving Watched List
21:40:40 T:2778692464 M:1855320064  NOTICE: []
21:40:40 T:2778692464 M:1855320064  NOTICE: [script.cinema.experience] - Adding Coming Attraction Outro Video0 Videos
21
:40:40 T:2778692464 M:1855320064  NOTICE: [ script.cinema.experience ] - [ ce_playlist.py ] - _get_special_items() Started
21
:40:40 T:2778692464 M:1855320064   DEBUG: [ script.cinema.experience ] - [ ce_playlist.py ] - No Items
21
:40:40 T:2778692464 M:1855320064  NOTICE: [script.cinema.experience] - Adding Trailers0 Trailers 

giftie: do you have any idea what has changed in xbmc code recently that could prevent local scraper from working? can it be related to move to external python or JSONRPC changes?



- giftie - 2011-04-09

rflores2323 Wrote:where is there information on how to set the home automation? read the past couple of pages and nothing on the front page. HOw is this set up and what can it be used for?

I was wondernig if I could get my lights to turn on/off when I hit play. I am using a URC light switch that is RF compatible with my URC-810 remote.. however would be nice to do it inside xbmc. I have no idea where to start however.


You would need some sort of RF transmitter(433MHz) and the codes to trigger your scenes... Not likely to be able to happen from XBMC. Now if you were to have UPB lighting, that is do able.... I personally like the URC light switches(which are made by Lutron..) especially because the RTI programmers have cracked the signal so I can use my RTI remote to trigger those switches... Nod lol..

But I think you will find that they will only be able to be controlled via the remote...


- giftie - 2011-04-09

ijourneaux Wrote:If I understood Giftie correctly, I don't beleive the home automation work is complete. It will require some customization beyond the configuration page(s) in HCE.

If the HCE script would be capable of generating events at the various positions in the script, it would be relatively easy to configure EventGhost or HomeSeer to react to the events and dim the light, shut blinds, etc. The nice thing with this approach is that HCE takes a passive role and just generates the events. The user could use any application that works for his platform or equipment to do the home automation.

Looking forward to the Home Automation functionality.


Actually the script at present time can generate events at given points of the script(from start to finish, with every video in between if need be) Even Pause and Resume(from pause) can trigger events. <- this was not too easy.

There is a folder that has been copied to you userdata/addon_data/script.cinema.experience that contains the script's file for triggering events. I made sure it was outside of the script's actual folder so it would not get overwritten when ever there was a update, I can not see changing this file.

Hopefully soon we can get some people messing around and get some lights turning off Big Grin


- Juanflaco - 2011-04-09

giftie Wrote:Hopefully soon we can get some people messing around and get some lights turning off Big Grin

I hope to be working on that very soon. I'm considering this USB IR transmitter for controlling a 4-zone Lutron Grafik Eye system, but I'm still not clear on exactly how the codes will be defined and sent to the transmitter once triggered by the CE script.


- giftie - 2011-04-09

ezechiel1917 Wrote:I have updated to newer git version (24/03->08/04 pvr ppa) and trailers from local folders suddenly stopped working here too.

giftie: do you have any idea what has changed in xbmc code recently that could prevent local scraper from working? can it be related to move to external python or JSONRPC changes?

I just finished building the latest version of XBMC, though I have more problems(there is an error in the slides now....)

But I think I did come across the JSONRPC call that is in question...

I think you might feel confident enough to change a line of code to test to see if this fixes your problem...

in the file 'folder.py' (script.cinema.experience/resources/lib/folder.py)

replace the following line:
Code:
json_query = '{"jsonrpc": "2.0", "method": "Files.GetDirectory", "params": {"directory": "%s", "media": "%s", "recursive": "%s"}, "id": 1}' % ( escapeDirJSON( dir_name ), media_type, recursive )

with this
Code:
json_query = '{"jsonrpc": "2.0", "method": "Files.GetDirectory", "params": {"directory": "%s", "media": "%s"}, "id": 1}' % ( escapeDirJSON( dir_name ), media_type )

When I first tried the script, it failed to play any videos until I changed this.. I will make this change anyways since it does not break the script for Dharma users(the 'recursive' was never working anyways..)


- Juanflaco - 2011-04-09

Thanks Giftie, that change to folder.py restored local trailer functionality for me.


- giftie - 2011-04-09

I didn't realize you were using a bleeding edge version of XBMC(git version) There has been some changes that have broken the script, at least for me it did today. It's mostly fixed for the next release, but I need to test against Dharma(10.1) I hope I can keep it stable for both camps...


- ezechiel1917 - 2011-04-09

giftie Wrote:I just finished building the latest version of XBMC, though I have more problems(there is an error in the slides now....)

But I think I did come across the JSONRPC call that is in question...

I think you might feel confident enough to change a line of code to test to see if this fixes your problem...

in the file 'folder.py' (script.cinema.experience/resources/lib/folder.py)

replace the following line:
Code:
json_query = '{"jsonrpc": "2.0", "method": "Files.GetDirectory", "params": {"directory": "%s", "media": "%s", "recursive": "%s"}, "id": 1}' % ( escapeDirJSON( dir_name ), media_type, recursive )

with this
Code:
json_query = '{"jsonrpc": "2.0", "method": "Files.GetDirectory", "params": {"directory": "%s", "media": "%s"}, "id": 1}' % ( escapeDirJSON( dir_name ), media_type )

When I first tried the script, it failed to play any videos until I changed this.. I will make this change anyways since it does not break the script for Dharma users(the 'recursive' was never working anyways..)

Awesome, you are the man!
I was first afraid your fix will break recursive but I just tried it and it still works which is very important to me because with ~2000 trailers in one folder switching between trailers in playlist is incredibly slow (around 5s+ and even worse if it's SMB folder). Moving each trailer to it's own folder named as it's filename (Trailers_Local_folder\movie1-trailer.mov -> Trailers_Local_folder\movie1-trailer\movie1-trailer.mov) makes the switch almost instant. So, CE finding trailers with this directory structure is pretty important to me. Fortunately it still works, so I'm really happy with this fix Nod

Thank you very much. Big Grin


- Juanflaco - 2011-04-09

giftie Wrote:I didn't realize you were using a bleeding edge version of XBMC(git version) There has been some changes that have broken the script, at least for me it did today. It's mostly fixed for the next release, but I need to test against Dharma(10.1) I hope I can keep it stable for both camps...
Yeah, I was on a recent nightly. Sorry I missed giving you that rather key bit of information. I failed Testing 101 as I was convinced I was just doing something stupid Big Grin


- ijourneaux - 2011-04-09

When to test the Home Automation stuff today. I don't think I intentionally changed anything as I already had all of the selections set in the config menu.

Unfortunately the script refuses to play anything. When I select the movie, I nolong see the messages at the top of the screen and the triva and trailers don't play.

Here is the log file with debug logging turned on

http://pastebin.com/8DeNenmB

Apprecaite the help.