Close Menu
    Facebook X (Twitter) Instagram
    Trending
    • SharePoint Internal Column Name Encoded Character List
    • Satchel Pelts List for Red Dead Redemption 2
    • Create a Video Wall With FFmpeg
    • Mitsubishi Outlander Towbar Electrics
    • Mitsubishi Outlander Towbar Installation
    • Telephone Block List
    • Hard Drive Repair After Wrong Voltage Mishap
    • How To Send Excel Workbook As Email Using Button
    YouTube Instagram Facebook RSS
    Technology Spy
    • Tutorials & Help
    • Reviews
    Technology Spy
    You are at:Home»General»Fix Kodi Maintenance Tool My IP Address Feature
    Kodi Maintenance Tool

    Fix Kodi Maintenance Tool My IP Address Feature

    4
    By Matt on September 19, 2016 General, Linux, Raspberry Pi, Tutorials & Help

    The Kodi Maintenance Tool is a plugin that provides lots of useful features within one of the World’s most popular media centre systems. Details on the plugin and instructions for installing it can be found on the developers site tvaddons.ag :

    https://www.tvaddons.ag/maintenance-tool-kodi/

    I recently installed it on my Raspberry Pi 3 based system but discovered that the “What’s my IP address” feature didn’t work. I needed to use this to check my VPN connection was working.

    Kodi Maintenance ToolIt appeared that the plugin was calling a webpage from iplocation.net and then extracting the IP address and location details. The layout of this page had obviously changed and the plugin was unable to filter the result. I’m not sure why this has been broken for so long as it is really easy to fix.

    I didn’t care about geographic location information so I simplified the solution to just give me the external IP address. To do this I used the service provided by ipify.org. They just give you the plain IP address.

    Fixing “My IP Address”

    On the Raspberry Pi fixing this utility is fairly easy and only takes a few minutes. The plugins are generally written in Python and once you’ve found the correct folder they can be edited with a text editor.

    Step 1 – Connect and Browse

    Connect to your Pi using SSH using a utility such as Putty or MobaXterm.

    Browse to the Maintenance tool directory using :

    cd /home/osmc/.kodi/addons/plugin.video.xbmchubmaintenance/

    I was using the OSMC distribution but the location on other distributions should be similar. In OpenElec the location is : /storage/.xbmc/addons/plugin.video.xbmchubmaintenance/.

    Step 2 – Edit default.py

    Edit the default.py file using :

    nano default.py

    Find the following function definition :

    ################################
    ###          My IP           ###
    ################################
    def MYIP(url='http://www.iplocation.net/',inc=1):
    ....
    ################################
    ###        End My IP         ###
    ################################
    

    replace with :

    ################################
    ###          My IP           ###
    ################################
    def MYIP(url='https://api.ipify.org/'):
        ip = net.http_GET(url).content
        dialog=xbmcgui.Dialog()
        dialog.ok(AddonTitle,"[B][COLOR gold]Your IP Address is: [/COLOR][/B] %s" % ip)
    ################################
    ###        End My IP         ###
    ################################
    

    As with all Python make sure you get the indentation correct.

    Step 3 – Save and Exit

    Use [CTRL-X], then [Y], then [ENTER] to save the text file and quit the nano editor. Obviously you can use various other techniques for editing this file so feel free to use an alternative.

    If you typed the function correctly the “My IP Address” option should now present you with a pop-up window showing your external IP address.

    kodi_maintenance_tool_02

    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email
    Previous ArticleFormat Large USB Flash Drives With FAT32
    Next Article 64GB Class 10 SD Card Scam on eBay

    Related Posts

    Create a Video Wall With FFmpeg

    Mitsubishi Outlander Towbar Electrics

    Mitsubishi Outlander Towbar Installation

    4 Comments

    1. gip on January 8, 2017 3:42 pm

      your article is very interesting I tried it on my raspebarry most 3 ee kodi but unfortunately it does not work, it returns me an error.

      Reply
      • Paul Johnson on January 25, 2017 2:58 am

        GIP, it worked for me. I have a Raspberry Pi 3 running osmc. It failed the first time I tried it, but that may have been due to a typing error because I reinstalled the Maintenance Tool and redid the changes to default.py and voila it worked!

        Beats me why this hadn’t been fixed a long time ago though.

        Reply
    2. Aaron on January 25, 2017 1:42 am

      I tried to apply the fix you outlined but am getting an error. Could you take a look and let me know what may be wrong?

      https://goo.gl/photos/V8pQDoAucaVZJFGq8

      Reply
      • Matt on February 5, 2017 10:47 pm

        It lists an “indentation error”. In Python the indentation of each line must be consistent. You’ve probably got a mixture of spaces and tabs or the incorrect number of spaces/tabs.

        Reply
    Leave A Reply Cancel Reply

    This site uses Akismet to reduce spam. Learn how your comment data is processed.

    109

    Recent Posts
    May 1, 2025

    SharePoint Internal Column Name Encoded Character List

    March 24, 2025

    Satchel Pelts List for Red Dead Redemption 2

    January 29, 2025

    Create a Video Wall With FFmpeg

    Categories
    • 3D Printing
    • Android
    • Arduino
    • Development
    • ESP8266
    • Excel
    • Gaming
    • General
    • GIMP
    • Home Automation
    • JavaScript
    • Linux
    • Microsoft Office
    • Mobile Devices
    • Oracle APEX
    • Python
    • Raspberry Pi
    • Reviews
    • Security
    • SharePoint
    • Tutorials & Help
    • VBScript
    Web Tools

    A set of quick and basic online tools for web designers and software developers :

    • Hash Generator
    • Text to HTML List
    • Text to HTML Table
    • URL Encoder and Decoder
    • UNIX Timestamp Calculator
    • LED Resistor Calculator
    • Extract Email from Text
    • Mortgage Calculator
    Tags
    Android APEX Apple Arduino Black Friday Coolermaster csv Elite Dangerous email ESP-01 ESP8266 EV Excel file handling Format gaming GIMP Gritin Home Assistant Home Automation Linux lists Media os.stat os.walk Outlander Power Python Qi RDR2 Review scam Security SharePoint 2010 string Syncwire text text files TrueCrypt Ubuntu USB-C VBA VBscript Windows 10 Xbox One
    About

    Welcome to Technology Spy, a site devoted to gadgets, computers, programming and all things technology! You’ll also find product reviews for items I own as well as tutorials, guides and scripts for the software I use.

    Archives
    Other Resources
    • MattsBits
    • Raspberry Pi Spy
    YouTube Facebook Instagram Pinterest RSS

    Entries RSS | Comments RSS

    Copyright © 2025 - All Rights Reserved - Matt Hawkins

    mastodon.social@MattHawkins

    Type above and press Enter to search. Press Esc to cancel.