XBMC Lighting Control on Play/Pause/Stop

Im using windows 7

i have created the folder scripts and added the playeractions.py (created a Word file and then changed the extension to py)
i have manually added the autoexec.py (the same thing created a word file, write the code and then changed the extension to py)
no multiple profiles

Looks like you didn’t create the idletime.py script. Is there a executescript call in autoexec.py to that script or just one executescript line pointing to playeractions.py.

I’m not at home right now, but when I get there I’ll make a copy of my three scripts, RAR them and upload them for you.

I’m also on Win7.

here is my playeractions.py, is just a copy of what was posted before but with my vera ip and scene numbers. it is placed on C:\Users\HTPC\AppData\Roaming\XBMC\scripts

autoexec.py is on C:\Users\HTPC\AppData\Roaming\XBMC\userdata

consider HTPC as my username.

remember to modify .txt to .py

Tell me if these work.

it wooooooooooooooooooooooorked :smiley:
i figured out what the problem is :smiley:

i copied the code to an Office word doc and then changed the .doc to .py, but it didn’t work
when i created a txt file and copied the code and then changed the txt to py WORKED :smiley:

thank you :smiley:

[quote=“Aaron, post:16, topic:169994”]In order for a completely usable HA solution to be integrated with XBMC will need to know specifics like…

  • what XBMC section has been selected: Movies, TV, Photos, Favorite=“New”, etc. This is the only way to trigger events relevant to what is happening.
  • name of the video, music, photo, etc is showing/playing (less important but nice as a status, or for spying on what others are doing when you are not there)[/quote]

I use EventGhost in conjunction with the Vera 2 to dim the lights and turn them off, etc.

Here is the log event for an audio file in EventGhost:

XBMC-Event.MediaChanged:

  • AudioTitle:Making Love Out Of Nothing At All

  • AudioArtist:Air Supply;1

    And here is a video playing back:

    XBMC-Event.MediaChanged:

  • MovieTitle:Gone Baby Gone;1

    I use EventGhost to turn the lights off when a video file is played back, but not a music one. The lights come back on when a video is paused, stopped or finishes.

    Is this the sort of thing you were after?

  • looking forward to giving this a go, been relying on cinema experience to do this previously but I don’t always want trailers!! Is this all working with Eden on Linux?

    If you are talking about the scripts (and not EventGhost), yes it works on linux with eden, tested with openelec and on ubuntu.

    My vera plugin is basically ready for beta testing, I plan to release here in the forum this saturday. The plugin provides variables and events, has an integrated ping sensor to see if your xbmc is running, it can also send basic commands like Play, Pause, Shutdown, Reboot Update Library, mute and so on.

    yeah just want scripts, don’t want to be relying on event ghost as running on ubuntu machine, vera plugin sounds good too,not wuite sure ill have a usecase for this just yet as its mostly the actions i take on xbmc i want to effect my HA environment rather than the other way round although I suppose the doorbell ringing could automatically pause the movie for me!

    I’m sure I will find a usecase!!

    Stu

    The plugin will also provide events, this means you can for example the trigger scenes based on the play state. The script is still used, but instead of triggering scenes directly it will write the play states to a variable in the plugin, the vera then allows integration of that into scenes by events.

    There are hundreds of use cases, as usual possibilities are only limited by the users fantasy:

    • Dimm your Lights when playing, make them brighter when pause/stopped.
    • Keep motion sensor from turning of lights when a movie is running
    • Turn of your xbmc mediabox off with your standard scenes
    • Schedule Library Updates and Reboots
    • Turn your xbmc mediabox on with any zwave remote
    • automatically turn up the screen for your beamer when movie is finished, leave it down when movie is only paused
    • mute/pause when phone is ringing or somebody is coming home
    • get notifications if your kids watch tv without you allowing them
    • get notifications or run actions when your media center is down
    • …and so on…

    Hello Chixxi,

    What did you decide to buy for your new system to replace you popcorn hour and the basis for you xmbc system?

    I bought a barebone ZOTAC ZBOX AD04 PLUS: http://www.zotac.com/index.php?page=shop.product_details&flypage=flypage_images-SRW.tpl&product_id=416&category_id=118&option=com_virtuemart&Itemid=100170&lang=eng

    I fitted a Kingston SSD 16GB in it (I have a Media Server, so I didn’t need a lot of storage)

    I also fitted 8GB of corsair RAM in it.

    I run the fusion daily build of openelec on it: http://openelec.pro/get-openelec (in my opinion openelec is far off the best you can use if you want to have xbmc)

    This fully supports hardware based decoding, even when watching something like a 3D SBS version of Avatar which is about 50GB, cpu is not used more than 10%. It’s a very very performant setup, totally happy with it, I think I fell in love with that thing! The box also comes with a quiet nice remote and mounts to hide it behind your TV.

    Right after buying that box I also got myself a new Philipps TV with Ambilight ;D

    chixxi
    how is the plugin coming?

    [quote=“Aaron, post:32, topic:169994”]chixxi
    how is the plugin coming?[/quote]

    sorry, I was busy the last few days, I quit my job and was therefor otherwise occupied.

    basically the plugin is ready for beta testing. only basic functions, but still great features. I will try to post it this weekend for beta testing…

    Chixxi,

    Sorry to hear about your job. I wish you the best of luck.

    • Garrett

    [quote=“garrettwp, post:34, topic:169994”]Chixxi,

    Sorry to hear about your job. I wish you the best of luck.

    • Garrett[/quote]

    Thanks garret. It’s a good thing, I have a new one, will be working on linux based train communication systems as a test engineer in the future.

    Congrats!

    • Garrett

    Congrats on the new job!

    I get my Vera3 tomorrow so VERY much looking forward to trying your plugin

    chixxi,
    Any word on the plugin? I have my Vera3 all ready to try your plugin! :slight_smile:

    I got this script running tonight but for some reason it now hangs when i try to exit xbmc,

    any thoughts?

    have also noticed that having this script also takes about 50% CPU and screws up with my boblight /ambilight setup as causes delay in colors getting updated.

    I’ve had to disable it for now. any thoughts on what i could do to resolve this???