Kodi Community Forum
Release Switch Profile When Idle - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Add-on Support (https://forum.kodi.tv/forumdisplay.php?fid=27)
+---- Forum: Service Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=152)
+---- Thread: Release Switch Profile When Idle (/showthread.php?tid=197888)



Switch Profile When Idle - leechguy - 2014-06-15

service.switchprofilewhenidle
=====================


You want two profiles, one for the kids, one for the parents. The parents profile you want password protected so that your kids won't be able to access movies they are not supposed to see.

You want XBMC to always login with the kids profile. After suspending the system, you want it to resume again also with the kids profile regardless of the profile being used when suspending the system. And finally, should you forget to either suspend or power off the system, you want the system to automatically switch to the kids profile when the system has been idle for x minutes.


Here's how you set things up (instructions based on Confluence skin):
  1. Download the zip: https://github.com/leechguy/service.switchprofilewhenidle/releases
  2. If you are not logged in into XBMC using the Master user profile, then logout and login as Master user.
  3. Go to Settings->Add-ons and choose 'Install from zip file'.
  4. Lookup the downloaded zip file and press the 'OK'-button.
  5. Go to Settings->Add-ons->Enabled Add-ons->Services->Switch Profile When Idle
  6. Press the 'Configure'-button.
  7. Configure the behaviour of the add-on.
  8. Open the 'Profiles'-menu (a sub menu of the 'System'-menu).
  9. Select the 'Profiles'-menu and press the 'Add profile...'-button.
  10. Give the profile a name, e.g. 'Kids', keep everything default and start fresh.
  11. Press the 'Add profile'-button.
  12. Give the profile a name, e.g. 'Parents' and press the 'Lock preferences'-button.
  13. You will be asked if you want to set the master lock, press the 'Yes'-button.
  14. Set your master lock code.
  15. Press the 'Profile lock'-button and setup the profile lock code.
  16. Return to the 'Profiles'-menu.
  17. On the left menu, select 'Login'.
  18. Press the 'Auto login'-button and select the 'Kids'-profile.
  19. Restart XBMC.
  20. Configure your new 'Kids' and 'Parents' profiles. For example, you may want to lock down the kids profile further so that they cannot change settings, install add-ons, etc.

Notes:
  • If you change the auto login user in XBMC or enable/disable the login screen, you will need to restart XBMC to make sure that the add-on also picks up this change.
  • If you have enabled the login screen then the add-on will not switch to any configured Auto login profile. Instead it will simply log out and show the log in screen.
  • If the Auto login profile is set to a profile name, then the add-on will not logout that profile.


This add-on is compatible with XBMC 13.x - Kodi 16.x. Not tested on Kodi 17 yet, but most likely will work as well.


RE: Switch Profile When Idle - noxx2 - 2014-11-14

Hi, run this Addon under Kodi (Helix) ?


RE: Switch Profile When Idle - fonzie - 2015-01-13

noxx2,

I briefly tested it under Helix and it seems to be auto logging off to the profile selection page just fine.

This is exactly what I was looking for btw!

thanks leechguy!!!


RE: Switch Profile When Idle - Bullsboy - 2015-01-22

Works great - exactly what I was after!


RE: Switch Profile When Idle - alx - 2015-03-23

Hi leechguy,

first, thanks for the work! I am facing a problem which seems to be related to this post http://forum.kodi.tv/showthread.php?tid=115688

I have only created one kid profile which is set to autologin. screensaver dim time is 3min , idle time 5min for you addon. Is it right understood that when screensaver dims in profile A (after 3min) and afterwards (after 5min) the user is automatically changed to profile B a keypress is neede from profile A to release dim modus? navigation is working fine, just screen stays dimmed.

Is there a way to chang in your addon or is the only solution to have dim time greater profile switch time to overcome this situation?


RE: Switch Profile When Idle - ClenMaster - 2016-08-19

Hi LeechGuy,
I'm very happy with your add-on "Switch Profile On Idle". Works perfectly with Kids and Normal profile. Sometimes however, I access my central KODI (on RPi2) from my laptop with a local KODI application, switch to my Normal profile and start to watch a movie. Then, after 60 minutes, my central KODI (openELEC) thinks there is no activity and switches back to my Kids profile and thus stops playing the movie. Then I use UltraVNC to switch back to the Normal profile and resume watching the movie. Do you have plans to increase the maximum idle time? Maybe possible to set it at three or four hours? At least higher than the average movie duration? Looking forward to your reply. Regards, ClenMaster.


RE: Switch Profile When Idle - leechguy - 2016-11-11

Hi ClenMaster,

The behaviour that you're seeing should not happen so I need to check what's going wrong.

As a workaround you can update the selectable range:

In the /storage/.kodi/addons/service.switchprofilewhenidle/resource directory on the RPi2, you will a file called settings.xml. Line 8 of the settings.xml file contains the minimum and maximum values as a range:

Code:
<setting id="maxIdleTime" type="slider" label="30003" enable="eq(-1,true)" visible="eq(-4,true)" range="1,60" default="5" option="int" subsetting="true" />

You can change this to e.g. 1,240 so that you can set it to wait for 240 minutes before switching profiles:

Code:
<setting id="maxIdleTime" type="slider" label="30003" enable="eq(-1,true)" visible="eq(-4,true)" range="1,240" default="5" option="int" subsetting="true" />

Hope this helps.


RE: Switch Profile When Idle - ClenMaster - 2016-12-30

Hi leechguy,
Just saw your post, thanks! I'll try to change the default from 60 to 240. Let you know what happens. Regards, CM.

---update
Works just fine! Thank you very much, no more VNCing to keep alive or manually switch profile.
Regards, CM


RE: Switch Profile When Idle - noxx2 - 2017-10-15

since some days this perfectly addon will not work.

i'm not sure, whats the problem. if have problems after i installed the Emby Addon. Is it possible
that Emby make problems?

system is LibreELEC 8.1.2