Author Topic: XBMC, EventGhost and Lights  (Read 11327 times)

0 Members and 1 Guest are viewing this topic.

lja

  • Sr. Member
  • ****
  • Posts: 145
  • Karma: 5
    • View Profile
Re: XBMC, EventGhost and Lights
« Reply #30 on: March 18, 2015, 03:25:26 PM »
@lja - As a side note, this may not matter if you don't ordinarily use a voice command to start watching your movies; however, if you'd like for that voice command to work correctly, you can fix the command pretty easily.

Based on the log you posted, somehow the correct action was edited in your Show Movie command, changing the proper syntax for payload {1} to just 1.

This means KODI will always play the movie with ID 1 in your library after the intro. For it to play the movie you've asked for, the command needs to use payload {1}.

It seems that currently your Show Movie command has a line:

XJson.Raw --> Addons.ExecuteAddon "wait": false, "addonid": "script.cinema.experience", "params": [ "movieid=1" ]

That should be:

XJson.Raw --> Addons.ExecuteAddon "wait": false, "addonid": "script.cinema.experience", "params": [ "movieid={1}" ]

@ nime5ter Thanks. On checking the history shows:XJson.Raw --> Addons.ExecuteAddon "wait": false, "addonid": "script.cinema.experience", "params": [ "movieid=1" ]

However the command shows it correctly:XJson.Raw --> Addons.ExecuteAddon "wait": false, "addonid": "script.cinema.experience", "params": [ "movieid={1}" ]

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 1999
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: XBMC, EventGhost and Lights
« Reply #31 on: March 18, 2015, 03:32:21 PM »
Ha. Yes, my mistake. It just so happens that your movie "2 Guns" has the ID value of 1.
TIPS: POST VC VERSION #. Explain what you want VC to do. Say what you've tried & what happened, or post a video demo. Attach VC log. Link to instructions followed.  Post your command (xml)

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: XBMC, EventGhost and Lights
« Reply #32 on: March 18, 2015, 03:33:44 PM »
another option is to use the CinemaExerience home automation script.

1) Replace the "home_automation.py" file which is found in:
Code: [Select]
%appdata%\Kodi\userdata\addon_data\script.cinema.experience\ha_scripts with the attached "home_automation.py" file.

2) Enable the homeautomation in the CE plugin settings and enable any triggers you want.

You should see events in VoxCommando now, but only when using Cinema Experience, not when playing movies normally in Kodi.

Or if you already have a customized home_automation.py file you can edit it to add the extra line of code to send the event using UDP.  Just be careful not to mess up the indentation and that means watch out for tabs / spaces.

Code: [Select]
        if trigger in triggers:
            utils.broadcastUDP( "VC.TriggerEvent&&Kodi.CinEx.%s" %trigger, 33000,'255.255.255.255' )
            utils.log( " - [ home_automation.py ] - Trigger %s" % trigger, xbmc.LOGNOTICE )

lja

  • Sr. Member
  • ****
  • Posts: 145
  • Karma: 5
    • View Profile
Re: XBMC, EventGhost and Lights
« Reply #33 on: March 19, 2015, 12:41:38 PM »
@jitterjames

"another option is to use the CinemaExerience home automation script."

Thanks. I will try the replacement approach. But before doing so, is any adjustment necessary in your attached file?
Will the Kodi.Player.OnStop.movie be still needed in the LCB?
« Last Edit: March 19, 2015, 12:54:01 PM by lja »

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: XBMC, EventGhost and Lights
« Reply #34 on: March 19, 2015, 12:57:24 PM »
I suggest you try the simple approach first.

as shown here: http://voxcommando.com/forum/index.php?topic=1674.msg17967#msg17967

You only need to replace your command with the one that I provided.  What could be easier?