This little script will modify the __init__.py file to change the UDID .. etc parameters .
first stop findMyIdevice plugin
copy this code into an action group script.
check the path to the indigo server files (version number) and
change the UDID productType and osVersion to your setting
click on run.
Karl
- Code: Select all
# -*- coding: utf-8 -*-
#this script will put your information into " __init__.py" to findMyIphone work without send emails every 5 minutes...
theNew_deviceUDID="xFc1cAcCcccccckljas;klfjaslf" # put your UDID here
theNew_productType="iPad4,4" # put your ipdad version here
theNew_osVersion="7.1.2" # put your os version here
# check the file path to the plugin (ie indigo version)
filePath='/Library/Application Support/Perceptive Automation/Indigo 6/Plugins/find-my-iDevices.indigoplugin/Contents/Server Plugin/findmyiphone'
fileName='__init__.py'
fileName2='xxinit__.py' # this is the output file, if ok rename to __init__.py in finder or just name it the same as fileName to overwrite in place
f =open(filePath+'/'+fileName,"r")
theLines =[]
for lines in f:
theLines.append(lines)
f.close
# now write out and replace the changed strings
f =open(filePath+'/'+fileName2,"w")
nLines = len(theLines)
for nLine in range(nLines):
nextLine=theLines[nLine]
if nextLine.find("deviceUDID")>-1:
theParts= nextLine.split('":"')
nextLine =theParts[0]+'":"'+theNew_deviceUDID+'",\n'
if nextLine.find("productType")>-1:
theParts= nextLine.split('":"')
nextLine =theParts[0]+'":"'+theNew_productType+'",\n'
if nextLine.find("osVersion")>-1:
theParts= nextLine.split('":"')
nextLine =theParts[0]+'":"'+theNew_osVersion+'",\n'
f.write(nextLine)
f.close