Rasplex with Children Timer

Hello together,
i search a function that i can set a day-timer for my Children’s.
Then without daytimer i can not control my Childrens-tv-time.
Thank you for tips.

Turn off the TV?

On a more serious note: I use a remote controllable power plug to switch off my entrire setup.

I make now this with a powerplag to. but i search a tool where i can make a massage to see on the tv that the daytime is over or what time left the children for tv.

When i make the power off my children very noisy.

But i have on the windows PC the function that my children have a Timer and my Children can see how much time left today.
This is better, than my children can planing the time and know the pc make alone off and not the Father.

The same have mac. And when my children like see tv on mac or pc the timer i can use.
I hope the same i can use on my rasplex and i think this is a linux surface that i can put a script befor starting rasplex.

well thats an interesting idea, but I guess it should be implemented on a level that its profile dependant but that I have no idea. It should be easy to start a cronjob or a bash program with a shutdown command. But the script should check if it has run on that day…
You could also use xbmc-send command to pass every x number of minutes the time left ad a warning on the gui.

For example:

xbmc-send --host=127.0.0.1 --port=9778 --action="Notification(Daddy´s advice,You just have XXmins left!)"

Should send the message you need to advice your children that the time its running out

shutdown now
should be able to turn off rasplex at the end of the program

you just need a program that stores or check every few minutes the time it was booted and compare it to the actual time, sends the correct messages and shutdowns itself. But this aproach will affect all users.

Try this file

Add it so it starts with rasplex with python parentaltimer.py

By default it will allow rasplex to work for 120 minutes every 6 hours of rest and send a message every 5 minutes of the amount of time left. They wont be able to start Rasplex once the time has finished without waiting the rest time.

You can edit these variable in the script itself

    MaxTime = 120 #Max Time for allowing it to run expressed in minutes 
    delay = 5    #Time in minutes between cycles for checking if the time its up
    cycles = 6   #Hours of rest between uses once the time its up

It will not work on a particular user, and it will not check if something its playing or you are on a menu. Also if you watch 5 minutes and return 10 minutes later it will still report as a total of 15 minutes played so it isnt good if they want to take a rest between episodes.

Maybe someone wishes to take it from here and add those features

Thank you this is perfekt

Very cool @videotecaCNSU . Thank you for contributing. :slight_smile:

@benjaminwolf said:
Very cool @videotecaCNSU . Thank you for contributing. :slight_smile:

Thanks, was just a fast hack. I would have done some things differently now. It could be something useful if I find a way to detect the active profile

If you would like to control TV time then see if your router supports Router Access Restrictions or Parental Controls. This is a great way to limit internet access for children and includes all devices. The possibilities differ on brands of routers, but almost every descent router has some parental features.