v1.03 Profile Change Auto Sync Issue
#1
In previous versions, whenever I switched XBMC profiles the IOS remote would auto sync to the new profile. Now I have to pull down each section so it will sync manually. I certainly found the previous behavior much more convenient. I hope this is just a bug and this functionality can be added back.

FYI, I know that the profile cannot currently be changed from the XBMC remote, I am using a home automation system that I can access from the iPad, that changes the profile by calling a python script that uses the XBMC libraries and calls ...

Code:
xbmc.send_action("XBMC.LoadProfile(MyProfile)")

... to allow me to swicth profiles remotely. As I mentioned, in the past when I did this, the XBMC remote would pick up the correct info as soon as I clicked on movies or TV shows, now I have to pull down to trigger a sync in each "area
".

It would be much better if this call could be made from the official XBMC remote directly. I guess for some reason "xbmc.send_action" commands can't be sent from the remote?
Reply
#2
Hi, you can disable the library cache by going under device settings and disabling the option xbmcRemote > App Settings > Enable contents cache, so you will have back the old behaviour.

I think that at the moment the remote app can't distinguish from which profile comes the content when looks for cached content.

For the profile switching, yes the app could trigger an action but looking at the API seems that can't manage profiles http://wiki.xbmc.org/index.php?title=JSO...put.Action
Reply
#3
Thanks for the info on the cache. That should do the trick for me.

It has been a while since I built my profile switching scripting, though I am pretty sure that I had to use the EventServer interface (not JSON) to find a command to switch profiles. I don't know whether the IOS remote has access to libraries to use the XBMC EventServer interface.

I found there were samples for python, so I worked forward from those.

It is probably not very useful to anyone, though I am putting the contents of the python script below...

Thanks again,

Lou

Code:
#!/usr/bin/python

# This is a simple example showing how you can send a key press event
# to XBMC using the XBMCClient class

import sys, getopt
sys.path.append("C:/Program Files/HomeSeer HS2/Scripts/python/lib")

import time
from xbmcclient import XBMCClient,ACTION_EXECBUILTIN,ACTION_BUTTON


def main(argv):

    host = ''
    profile = ''

    try:
        opts, args = getopt.getopt(argv,"h:p:",["host=","profile="])
    except getopt.GetoptError:
        print 'xmbcProfile.py -h <host> -p <profile>'
        sys.exit(2)
        
    for opt, arg in opts:
        if opt in ("-h", "--host"):
            host = arg
        elif opt in ("-p", "--profile"):
            profile = arg
    
    if host == '':
        print 'xmbcProfile.py -h <host> -p <profile>'
        sys.exit(2)
        
    if profile == '':
        print 'xmbcProfile.py -h <host> -p <profile>'
        sys.exit(2)
    
    if host != '192.168.30.58' and host != '192.168.30.59':
        print 'Invalid host ', host
        sys.exit(2)

    if profile != 'm' and profile != 'c' and profile != 'a':
        print 'Invalid profile ', profile
        sys.exit(2)  


    # Create an XBMCClient object and connect (get attention)
    xbmc = XBMCClient("HS Remote", host)
    xbmc.connect()
    xbmc.ping()        
    xbmc.close()    

    # Create an XBMCClient object and connect
    xbmc = XBMCClient("HS Remote", host)
    xbmc.connect()
    
    # A little delay
    #time.sleep(2)
    
    if profile == 'm':
        #print 'host is ', host
        #print 'prof is ', profile
        xbmc.send_action("XBMC.LoadProfile(Main)")
        
    elif profile == 'c':
        #print 'host is ', host
        #print 'prof is ', profile
        xbmc.send_action("XBMC.LoadProfile(Children)")
    
    elif profile == 'a':
        #print 'host is ', host
        #print 'prof is ', profile
        xbmc.send_action("XBMC.LoadProfile(Adult)")
      
    # ok we're done, close the connection
    xbmc.close()

if __name__=="__main__":
    main(sys.argv[1:])


It is called with the following syntax...

Code:
C:\Python27\python.exe "C:\Program Files\HomeSeer HS2\Scripts\xbmcProfile.py" -h 192.168.303.58 -p m
Reply

Logout Mark Read Team Forum Stats Members Help
v1.03 Profile Change Auto Sync Issue0