Announcement

Collapse
No announcement yet.

Kodi/XBMC Plug-in - Feature Requests

Collapse
This is a sticky topic.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Okay - Thanks Spud, i'll take a look tonight.

    Comment


      I'm pretty confused on this now. I've tried this on a few different setups and just cant get it going on my network.
      Im not sure what the upnp errors mean, and i have no other upnp related issues, all players and sources can see each other and throw content at each other.

      Do you think it worth seaking help on the kodi.tv forums, or is the resuming part of the switch player function something you've added?

      Comment


        Originally posted by OliP View Post
        I'm pretty confused on this now. I've tried this on a few different setups and just cant get it going on my network.
        Im not sure what the upnp errors mean, and i have no other upnp related issues, all players and sources can see each other and throw content at each other.

        Do you think it worth seaking help on the kodi.tv forums, or is the resuming part of the switch player function something you've added?
        From Kodi, try to test the "Play using..." feature on a movie or tv show, then choose resume and the destination player of your choice. In this case does it work?

        The "Swithc player"action of the HS plugin use the same thing except it stops the video first, and always choose to resume.

        Comment


          Originally posted by spud View Post
          in version 3.0.0.33 I have added the GetCurrentstereoscopicMode scripting function, here is a C# script example

          Code:
          public object Main(object[] Parms)
          {
              string stereoscopicMode = (string) hs.PluginFunction("XBMC", "", "GetCurrentStereoscopicMode", new object[] { "Kodi (spud)" });
          
              hs.WriteLog("XBMC Script", "Stereoscopic Mode = " + stereoscopicMode);
          
              return 0;
          }
          you just need to replace "Kodi (spud)" by the name of your Kodi player.

          In this same version, I have fixed some problems with the "Switch Player" action. Note that the resume features never works on the few first minutes of a video but I think this is expected because when you manually stop a video in the first few minutes, it never ask you if you want to resume it when you try to start it again.
          OliP, please install and test this version. Thanks
          Dear Spud,

          In which file and where do i have to replace "Kodi (spud)" by the name of my Kodi player?

          Comment


            Originally posted by michaeldecharon View Post
            Dear Spud,

            In which file and where do i have to replace "Kodi (spud)" by the name of my Kodi player?
            in the script file in which you have pasted the C# snippet.

            Comment


              Originally posted by spud View Post
              in the script file in which you have pasted the C# snippet.
              I'm sorry Spud, if i don't understand you. I don't know anything about scripting and how to do it.

              Can you help me out a little?

              Comment


                Originally posted by michaeldecharon View Post
                I'm sorry Spud, if i don't understand you. I don't know anything about scripting and how to do it.

                Can you help me out a little?
                what do you want to do?

                Comment


                  Originally posted by spud View Post
                  what do you want to do?
                  I want to trigger an event when Kodi starts playing a 3D movie, therefore i can send a ir-signal to my TV to automaticly switch to the 3D mode.

                  I've installed version 3.0.0.33 and what to use the scripting so i can alter the kodi player.

                  But i don't know how to script or where to apply it.

                  Comment


                    Originally posted by michaeldecharon View Post
                    I want to trigger an event when Kodi starts playing a 3D movie, therefore i can send a ir-signal to my TV to automaticly switch to the 3D mode.

                    I've installed version 3.0.0.33 and what to use the scripting so i can alter the kodi player.

                    But i don't know how to script or where to apply it.
                    1. create an event called "Switch TV to 3D" in which you send the IR signal to switch your TV to the 3D mode

                    2. create a file called Kodi3D.cs in the scripts directory, open it with a text editor and copy/paste the following code:
                    Code:
                    public object Main(object[] Parms)
                    {
                        string stereoscopicMode = (string) hs.PluginFunction("XBMC", "", "GetCurrentStereoscopicMode", new object[] { "Kodi (spud)" });
                    
                        hs.WriteLog("XBMC Script", "Stereoscopic Mode = " + stereoscopicMode);
                        
                        if(stereoscopicMode != "off")
                        {
                            hs.TriggerEvent("Switch TV to 3D");
                        }
                        return 0;
                    }
                    in this script replace "Kodi (spud)" by the name of your Kodi player, and maybe change the condition on stereoscopicMode if you want to trigger only with some specific modes, possible values for stereoscopicMode are:

                    off,
                    split_vertical,
                    split_horizontal,
                    row_interleaved,
                    hardware_based,
                    anaglyph_cyan_red,
                    anaglyph_green_magenta,
                    monoscopic

                    3. create another event in which the trigger is "your Kodi status device" changes and becomes "playing", and the action is run the script Kodi3D.cs

                    Click image for larger version

Name:	Kodi3D.jpg
Views:	1
Size:	44.6 KB
ID:	1179776

                    Comment


                      Originally posted by spud View Post
                      1. create an event called "Switch TV to 3D" in which you send the IR signal to switch your TV to the 3D mode

                      2. create a file called Kodi3D.cs in the scripts directory, open it with a text editor and copy/paste the following code:
                      Code:
                      public object Main(object[] Parms)
                      {
                          string stereoscopicMode = (string) hs.PluginFunction("XBMC", "", "GetCurrentStereoscopicMode", new object[] { "Kodi (spud)" });
                      
                          hs.WriteLog("XBMC Script", "Stereoscopic Mode = " + stereoscopicMode);
                          
                          if(stereoscopicMode != "off")
                          {
                              hs.TriggerEvent("Switch TV to 3D");
                          }
                          return 0;
                      }
                      in this script replace "Kodi (spud)" by the name of your Kodi player, and maybe change the condition on stereoscopicMode if you want to trigger only with some specific modes, possible values for stereoscopicMode are:

                      off,
                      split_vertical,
                      split_horizontal,
                      row_interleaved,
                      hardware_based,
                      anaglyph_cyan_red,
                      anaglyph_green_magenta,
                      monoscopic

                      3. create another event in which the trigger is "your Kodi status device" changes and becomes "playing", and the action is run the script Kodi3D.cs

                      [ATTACH]47971[/ATTACH]

                      Thanks Spud!

                      Now i understand what i have to do.

                      Once again thank you very much!!

                      Comment


                        Just getting started with KODI and this plugin. Already I like seeing notifications which work great using your Actions.

                        Feature Request: Have the ability to pass paramaters when using the "execute Addon" function within the Homeseer Events

                        I am trying to use your example with the Script.SecurityCAM to add an overlay from BlueIris. there was some code on page 2

                        http://forum.kodi.tv/showthread.php?tid=182540&pid=1576187#pid1576187

                        It seems to work just find when I specify the exact URL in the addon settings however when trying to pass the as specified on that post by the author of the cam addon it doesn't work.

                        Comment


                          Originally posted by skarragallagher View Post
                          Just getting started with KODI and this plugin. Already I like seeing notifications which work great using your Actions.

                          Feature Request: Have the ability to pass paramaters when using the "execute Addon" function within the Homeseer Events

                          I am trying to use your example with the Script.SecurityCAM to add an overlay from BlueIris. there was some code on page 2

                          http://forum.kodi.tv/showthread.php?tid=182540&pid=1576187#pid1576187

                          It seems to work just find when I specify the exact URL in the addon settings however when trying to pass the as specified on that post by the author of the cam addon it doesn't work.
                          in version 3.0.0.34, I have added a field to enter parameters for the "Execute Addon" action. The parameters need to be passed as a JSON string, so for the example described in that post you would enter them as in the screenshot below

                          Click image for larger version

Name:	addonparams.jpg
Views:	1
Size:	31.8 KB
ID:	1180043

                          Comment


                            sweet!

                            Thanks for such a fast turn around. I just downloaded and installed, Hopefully I can get this to work!

                            I'll let you know if I run into issues

                            Comment


                              http://kodi.wiki/view/Add-on:Cinema_Experience

                              If you goto Section 5.1.3 Script Triggers it will have all the triggers

                              Also if there was the way to have a timecode as a device?
                              Maybe like the current timecode and the total length of the media playing as two separate devices? I would like to bring the lights back up slowly towards the end of the movie and by having timecodes i think this could be accomplished

                              Thank you!
                              -Tom-

                              Comment


                                Originally posted by twa8000 View Post
                                http://kodi.wiki/view/Add-on:Cinema_Experience

                                If you goto Section 5.1.3 Script Triggers it will have all the triggers
                                Those triggers and media types are internal to the Cinema Experience Add-on so I can't add them to the XBMC/Kodi plugin.

                                Here is a solution that should work:
                                As explained in section 5.1.1 of the wiki, add some code in home_automation.py to call the NotifyAll function that can be used in HS3 to trigger some events

                                for example for the "Script Start" trigger you would add:

                                Code:
                                # Script Start
                                if trigger == "Script Start" and ha_settings[ "ha_script_start" ]:
                                    # place code below this line
                                    xbmc.executeJSONRPC('{ "jsonrpc": "2.0", "method": "JSONRPC.NotifyAll", "params": {"sender": "CinemaExperience", "message": "Script Start"}, "id": 1 }')
                                and then in HS3 you can use the Addon Trigger like in the screenshot below:

                                Click image for larger version

Name:	cinemaexperiencetrigger.jpg
Views:	1
Size:	27.6 KB
ID:	1180353


                                Originally posted by twa8000 View Post
                                Also if there was the way to have a timecode as a device?
                                Maybe like the current timecode and the total length of the media playing as two separate devices? I would like to bring the lights back up slowly towards the end of the movie and by having timecodes i think this could be accomplished

                                Thank you!
                                You can use the GetCurrentTime and GetTotalTime scripting functions to do that: http://board.homeseer.com/showthread...67#post1141867

                                Comment

                                Working...
                                X