Announcement

Collapse
No announcement yet.

Cant Remove Old Kodi from Config

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

    Cant Remove Old Kodi from Config

    When I try to edit the INI and remove the old, unused, instances of Kodi they re-appear?

    I cant find a way to deleted them in the Plugin UI either?

    #2
    have you restarted the plugin after removing them from ini?

    are they discovered by the plugin? can you post your logs?

    Comment


      #3
      Originally posted by spud View Post
      have you restarted the plugin after removing them from ini?

      are they discovered by the plugin? can you post your logs?
      Yes, I actually turn off the plugin before editing the ini

      You can reproduce this problem easily. It happens in two ways ...

      1. Create a new kodi instance using an ip already in use by kodi... So you will have two instances of the same kodi
      . Let the children get created
      Turn off the plugin
      delete the new info in the ini.

      ... The deleted information will reappear in the ini when you restart the plugin

      2. Do the above but use an ip that is not actually used by anything. Same result



      Sent from my SM-G950U using Tapatalk

      Comment


        #4
        I can't reproduce it.

        The kodi instances are only written to the ini file when discovered through Bonjour. So please post your logs when the plugin starts as well as a screenshot of your config page.

        Comment


          #5
          Spud,
          debug log attached.

          I see a few issues with the way the plugin seems to work. possible solutions included below...

          1. Plugin doesnt check/ensure that when it auto-discovers an instance of Kodi, that the instance is not already in HS3, with devices. This then creates new devices in HS3.

          2. No RefID device assignment in the INI, thus allowing the above to happen.

          3. No 'Delete Instance' function in the plugin that would make sure everything is removed properly in HS3 and the INI to keep everything aligned.


          Oddly enough, the plugin is adding Multiple instances with the same IP address - upon discovery, with different names.

          Note the two "new" versions of .60 even though it already existed in HS3. BTW, the .60 address is Win10, there is only 1 Kodi running on it... 'device name' in settings is "media center"

          This morning I deleted the extras in the INI. So it it looked like this...


          Code:
          [GENERAL]
          upgrade_xbmc_to_kodi_done=true
          log_level=Info
          log_to_file_enabled=True
          [PLAYERS]
          1###name=Living Room
          1###ipaddress=192.168.2.15
          1###password=
          1###username=
          2###name=Media Room
          2###ipaddress=192.168.2.60
          2###password=
          2###username=
          When I started the plugin again it created several new devices and the INI looks like this...

          Code:
          [GENERAL]
          upgrade_xbmc_to_kodi_done=true
          log_level=Info
          log_to_file_enabled=True
          [PLAYERS]
          1###name=Living Room
          1###ipaddress=192.168.2.15
          1###password=
          1###username=
          2###name=Media Room
          2###ipaddress=192.168.2.60
          2###password=
          2###username=
          3###name=KodiFTV
          3###ipaddress=192.168.2.15
          3###password=
          3###username=
          4###name=media center
          4###ipaddress=192.168.2.60
          4###password=
          4###username=
          5###name=Kodi (MediaPC)
          5###ipaddress=192.168.2.60
          5###password=
          5###username=

          Comment


            #6
            1. Plugin doesnt check/ensure that when it auto-discovers an instance of Kodi, that the instance is not already in HS3, with devices. This then creates new devices in HS3.

            2. No RefID device assignment in the INI, thus allowing the above to happen.
            Of course there is a RefID, it is the number you see at the beginning of each line in the ini. The problem is that this refID is internal to HS because Kodi does not provide one, so the instance name is used to match the result of the discovery with what is read from the ini. It means that if you change the instance name in Kodi, a new instance with new devices will be created in HS. You can then delete your old devices as well as every line in the ini with the old RefID, and they should not reappear.
            The IP of an instance can change so it is not used as a unique identifier.

            I can add a way to delete an instance from the Config page, but that would have exactly the same effect than deleting the lines manually from the ini file.

            You still haven't posted your logs...

            Comment


              #7
              Sorry, I attached the file, looks like it didnt take because anything over 390k is "too large" (thank you 100 year old, crappy, forum software!)


              for RefID, I was referring to the HS3 device's RefID - not the ID your plugin gives the instance.

              A few small changes could make this work seamlessly...

              1. add IP Address into the 'root' device when you create it.
              2. add HS3's "Reference ID" to the INI when you create it
              3. add Kodi Name to the INI to track the name Kodi is using to advertise out

              Now, plugin logic can be used to not create duplicates in any case. Yuo can give the user the option of the 'key' field to be IP Address or KodiName

              INI Example:

              1###name=Living Room
              1###ipaddress=192.168.2.15
              1###password=
              1###username=
              1###RefID=534
              1###KodiName=KodiFTV

              Logic:

              IP Address as key...
              If HS3 root device RefiD 534 already exists, with the same IP (.15) your plugin discovers - nothing new is created. It simply updates ###KodiName as needed

              Kodi Name as key...
              If HS3 root device RefiD 534 already exists, with the same KodiName your plugin discovers - nothing new is created. It simply updates ###IP as needed


              ... This allows your plugin to work properly irrespective of the name(s). These could all be different and it would still not mess anything up:
              HS3 device name
              instance name in the Kodi plugin
              name Kodi is advertising via Zero Config
              Attached Files

              Comment


                #8
                there is no need to add a device RefID in the ini, because the devices already store the instance id internally, so this is enough to match a set of devices with what is read from the ini file.

                back to your original problem:

                the MediaPC instance is still advertised:
                Code:
                Nov-09 09:21:57 INFO Resolved Service: Kodi (MediaPC) - _xbmc-jsonrpc._tcp. - 192.168.2.60 - 9090
                so if it is actually not running anymore you may need to restart Kodi, restart Bonjour or even reboot your PC.

                after that just delete the red lines below as well as the corresponding devices then restart the plugin the old instances won't be recreated in the plugin.


                Code:
                [PLAYERS]
                [COLOR="Red"]1###name=Living Room
                1###ipaddress=192.168.2.15
                1###password=
                1###username=
                2###name=Media Room
                2###ipaddress=192.168.2.60
                2###password=
                2###username=[/COLOR]
                3###name=KodiFTV
                3###ipaddress=192.168.2.15
                3###password=
                3###username=
                4###name=media center
                4###ipaddress=192.168.2.60
                4###password=
                4###username=
                [COLOR="Red"]5###name=Kodi (MediaPC)
                5###ipaddress=192.168.2.60
                5###password=
                5###username=[/COLOR]

                Comment


                  #9
                  The only REAL device name for .60 is 'media center' but your plugin is kept creating Kodi (MediaPC) -- no Kodi instance called that exists. I turned off the plugin, removed all the HS3 devices, and rebooted the PC... that seems to have worked, but if the plugin checked for duplicates (thus the logic I suggested) the issue would have never occurred.

                  If anyone changes the name IN KODI then your plugin creates another set of HS3 devices... completely hosing the events.
                  -- changes to your plugin I suggest completely fixes a problem that. Til now, seems like we've been lucky not to hit the issue. Guess no one changes the Kodi instance names.

                  Also, if we change the numbering inside the INI it looks like that hoses things too? Thus, if I remove 3 instances and renumber the remaining ones. I suspect this is due to your internal RefID tracking and no one knowing about it - thinking that simply renumbering in the INI only changes the Plugin GUI display.

                  It would be great if you automate this. If not, please at least document two things...
                  1. Renaming Kodi - at Kodi app and in Homeseer
                  2. Removal process


                  thx

                  Comment

                  Working...
                  X