Announcement

Collapse
No announcement yet.

Events off Start/Stop/Resume

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Events off Start/Stop/Resume

    --EDIT--
    I am running Logitech Media Server serving up audio to my Squeezeboxes and a PiCorePlayer. Turns out that the CLI on LMS runs on port 9090 so I changed it to 9999 and now the Kodi events work. Very slick so far!
    --EDIT--


    Am trying to control a kitchen light based upon Kodi either pausing/stopping or playing. I'm not seeing anything happening, this is my first attempt at an event (attached)
    Attached Files
    Last edited by macrho; May 25, 2015, 11:53 AM.

    #2
    From the device management page, does the Kodi status device correctly changes when you start/stop playing something in Kodi?

    When you try to manually run the event (using the blue button) does your light turn on/off?

    You should probably use "This device changes and becomes" trigger instead of "this device had its value set to"

    Comment


      #3
      No, the Kodi status does not seem to stay in sync with what is going on with the device. If I continually hit 'connect' then the status will update correctly and the event will fire.

      My lights turn on and off when I use the blue button

      I changed the trigger as you suggested

      I'm running Windows 8.1 Update 64 bit along with Kodi 14.2

      I've attached an image of what is seen in the Kodi device (the current status of the device was paused but play is shown)
      Attached Files

      Comment


        #4
        Originally posted by macrho View Post
        No, the Kodi status does not seem to stay in sync with what is going on with the device. If I continually hit 'connect' then the status will update correctly and the event will fire.

        My lights turn on and off when I use the blue button

        I changed the trigger as you suggested

        I'm running Windows 8.1 Update 64 bit along with Kodi 14.2

        I've attached an image of what is seen in the Kodi device (the current status of the device was paused but play is shown)
        please set the log level to debug from the plugin config page, then restart the plugin and replicate the problem again, then post your logs here.

        also try to temporarily disable your windows firewall

        Comment


          #5
          Which directory are the log files?
          I looked here: C:\Program Files (x86)\HomeSeer HS3\Logs
          but there was nothing about the Kodi plugin
          There's a startup and a hue log, that's it

          Comment


            #6
            Originally posted by macrho View Post
            Which directory are the log files?
            I looked here: C:\Program Files (x86)\HomeSeer HS3\Logs
            but there was nothing about the Kodi plugin
            There's a startup and a hue log, that's it
            the logs are not written to a separate file, they are written to the standard HS3 logs that you can access from View > Log

            Comment


              #7
              Ok, the debug info about setting the lights on or off only fires when I press the connect button on the Kodi device, otherwise nothing happens in the log while I'm stopping or starting or resuming a show:

              I made a number of edits as I'm fumbling around the log files

              Code:
              Date/Time
              Pri
              Type/Error
              Message/Source
              May-25 10:24:47 AM 
              * 
              JowiHue 
              AddLight: Error Column 'Name' is constrained to be unique. Value 'Upstairs' is already present. 
              May-25 10:24:47 AM 
              * 
              JowiHue 
              AddLight: Error Column 'Name' is constrained to be unique. Value 'Upstairs' is already present. 
              May-25 10:22:54 AM 
              * 
              Device Control 
              Device: First Floor Kitchen Overhead Lights to On (255) 
              May-25 10:22:54 AM 
              * 
              Event 
              Event Trigger "Kodi Kitchen Kodi Paused OR Stopped" 
              May-25 10:22:54 AM 
              * 
              Z-Wave 
              Device: First Floor Kitchen Overhead Lights Set to 255 
              May-25 10:22:54 AM 
              * 
              XBMC 
              DEBUG Pinging on http port 8080 
              May-25 10:22:54 AM 
              * 
              XBMC 
              DEBUG Connecting on tcp port 9090 
              May-25 10:22:54 AM 
              * 
              Device Control 
              Device: First Floor Kitchen Overhead Lights to On (255) 
              May-25 10:22:54 AM 
              * 
              Event 
              Event Trigger "Kodi Kitchen Kodi Paused OR Stopped" 
              May-25 10:22:54 AM 
              * 
              Device Control 
              Device: KodiShuttle Root to Connect (-1) by/from: CAPI Control Handler 
              May-25 10:22:34 AM 
              * 
              Z-Wave 
              Device: First Floor Kitchen Overhead Lights Set to 0 
              May-25 10:22:34 AM 
              * 
              Device Control 
              Device: First Floor Kitchen Overhead Lights to Off (0) 
              May-25 10:22:34 AM 
              * 
              Event 
              Event Trigger "Kodi Kitchen Kodi Start/Resume" 
              May-25 10:22:34 AM 
              * 
              XBMC 
              DEBUG Pinging on http port 8080 
              May-25 10:22:34 AM 
              * 
              XBMC 
              DEBUG Connecting on tcp port 9090 
              May-25 10:22:34 AM 
              * 
              Device Control 
              Device: KodiShuttle Root to Connect (-1) by/from: CAPI Control Handler 
              May-25 10:21:31 AM 
              * 
              XBMC 
              DEBUG Pinging on http port 8080 
              May-25 10:21:31 AM 
              * 
              XBMC 
              DEBUG Connecting on tcp port 9090 
              May-25 10:21:31 AM 
              * 
              Device Control 
              Device: KodiShuttle Root to Connect (-1) by/from: CAPI Control Handler 
              May-25 10:21:15 AM 
              * 
              XBMC 
              DEBUG Pinging on http port 8080 
              May-25 10:21:15 AM 
              * 
              XBMC 
              DEBUG Connecting on tcp port 9090 
              May-25 10:21:15 AM 
              * 
              XBMC 
              INFO Resolved Service: KodiShuttle - _xbmc-jsonrpc-h._tcp. - 192.168.1.146 - 8080 
              May-25 10:21:15 AM 
              * 
              XBMC 
              INFO Found Service: KodiShuttle 
              May-25 10:17:17 AM 
              * 
              Z-Wave 
              Device: Node 25 Z-Wave Fan State Set to Fan State 0

              Comment


                #8
                you're not supposed to click the connect button, the plugin is supposed to discover and connect to your Kodi instance automatically.

                when you start the plugin, it should find 2 services _xbmc-jsonrpc._tcp on port 9090 and _xbmc-jsonrpc-h._tcp on port 8080 (or whatever port you have configured)
                both services are important

                Code:
                INFO Found Service: Kodi (spud)
                INFO Found Service: Kodi (spud)
                INFO Resolved Service: Kodi (spud) - _xbmc-jsonrpc._tcp. - 192.168.1.102 - 9090
                INFO Resolved Service: Kodi (spud) - _xbmc-jsonrpc-h._tcp. - 192.168.1.102 - 8081
                DEBUG Connecting on tcp port 9090
                DEBUG Pinging on http port 8081
                from your logs it looks like the service on port 9090 is not discovered.
                have you set up all the service settings like in the user guide?

                do you run Kodi on a raspberry pi using OpenElec or another distribution?
                in this case you may need to reboot your RPi after you changed the settings. I have seen this problem with OpenElec once where the service on port 9090 wasn't accessible until I reboot the RPi.

                Comment


                  #9
                  I did follow the directions for installing the plugin (though they haven't been updated for Kodi 14.2 yet) I specified port 8080 for the webserver. This is running on a Windows box that also hosts HS3 (though that will be moving in a week or so to a dedicated box)

                  I have a raspberry pi 2 upstairs running openELEC, I have added this device also but have not done much in the configuration area yet as I'm concentrating on the PC first [I'll eventually add a third Kodi instance into the mix]

                  Note that the firewall is off on the Windows box. Note, I did not see any mention of configuring a port 9090 in the users guide. It looks like it is the default port for JSON that can be set in advanced settings, which I don't have set. Of note, when I was using JSON type stuff in my Vera controller I was hitting port 8080:

                  Code:
                  luup.inet.wget("http://192.168.1.146:8080/jsonrpc?request={%22jsonrpc%22:%222.0%22,%22method%22:%22GUI.ShowNotification%22,%22params%22:{%22title%22:%22Vera%20Alert%22,%22message%22:%22Door%20Bell%20Rung%22,%22displaytime%22:10000},%22id%22:1}")

                  Comment


                    #10
                    I edited the top post and changed the title to have SOLVED in it:

                    I am running Logitech Media Server serving up audio to my Squeezeboxes and a PiCorePlayer. Turns out that the CLI on LMS runs on port 9090 so I changed it to 9999 and now the Kodi events work. Very slick so far!

                    Comment

                    Working...
                    X