home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 1
MediaPortal 1 Plugins
VBScript to Standby TV server with options and using PSS++
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="TiboTv" data-source="post: 1014466" data-attributes="member: 95893"><p>Hi,</p><p> </p><p>I wrote this little vb script to solve 2 problems that can't be solved with PowerScheduler or PowerScheduler++ plugins :</p><p> </p><p>1) I want to standby my TV server when there's no more "TV activities" (live streaming, recordings,...) even if one or more clients are still one. This idea come from the fact that my tv server is on about 6 hours a day (when clients are running to watch tv series, movies, listen music ) to do nothing! Now with my VBScript, Tv server is only on when needed (about 2 hours a day). So when I'm not using tv service on clients, after a while the tv server goes into standby, I get a "tv connexion lost" message on clients but everything is still running (database are local and medias are on a NAS). When I need tv service again, I enter into TV pages and WOL PowerMgt plugin send a WOL message to wake up my TV server.</p><p>2) With PowerScheduler and PowerScheduler++, we can start a batch file when entering in a standby mode but the plugin can't wait until the end of the batch file cause windows has already started the standby process and the batch file has approximately 2sec to do his job.</p><p> </p><p>So this VBscript is just a kind of workaround.</p><p> </p><p>How it works :</p><p> </p><p>The script is started when windows starts (simply by adding a shortcut) and run in background (no interface).</p><p>The script need PowerScheduler ++ installed. The script periodically check the TV log file to find and interpret power scheduler ++ messages. When all messages of tv log file are read, the script check if a standby can be started or not and when this standby can be started. If conditions remain the same until a idle timeout (which must be smaller than the PSS++ or Windows idle timout), the script start a batch file to execute a custom action, wait the end of the batch file and start a second batch file to start the windows standby.</p><p> </p><p>This script works fine for now about one week and I thing it could be interesting for some of you. This is VB script so you can edit and change it to get what you want if needed.</p><p> </p><p>If you try this script and get issues, don't hesitate to give me feedback but I have not many times to improve this script. If you want to report an issues, please post tv log file and also script log file.</p><p> </p><p>I only tested on my home configuration : Multiseat setup with one dedicaced TV server and 3 MP clients. Tested on both MP1.3 and MP1.4. Pay attention that log files are different from these 2 MP versions and a flag must be changed in the script config file to indicated if you use MP1.3 or MP1.4</p><p> </p><p>TODO List : Improvement :</p><p>- Get windows standby timeout value in vbscript : If someone could help, it's great because I don't fin anyway to do it.</p><p> </p><p>Who to install :</p><p> </p><p>- Copy the attached files on your TV server (eg : C:\StandbyTVServer)</p><p>- Edit StandbyTVServer.config to change some settings</p><p>- Edit Custom.bat and standby.bat files</p><p>- Start the StandbyTVServer.vbs</p><p>- Check the result into StandbyTVServer.log</p></blockquote><p></p>
[QUOTE="TiboTv, post: 1014466, member: 95893"] Hi, I wrote this little vb script to solve 2 problems that can't be solved with PowerScheduler or PowerScheduler++ plugins : 1) I want to standby my TV server when there's no more "TV activities" (live streaming, recordings,...) even if one or more clients are still one. This idea come from the fact that my tv server is on about 6 hours a day (when clients are running to watch tv series, movies, listen music ) to do nothing! Now with my VBScript, Tv server is only on when needed (about 2 hours a day). So when I'm not using tv service on clients, after a while the tv server goes into standby, I get a "tv connexion lost" message on clients but everything is still running (database are local and medias are on a NAS). When I need tv service again, I enter into TV pages and WOL PowerMgt plugin send a WOL message to wake up my TV server. 2) With PowerScheduler and PowerScheduler++, we can start a batch file when entering in a standby mode but the plugin can't wait until the end of the batch file cause windows has already started the standby process and the batch file has approximately 2sec to do his job. So this VBscript is just a kind of workaround. How it works : The script is started when windows starts (simply by adding a shortcut) and run in background (no interface). The script need PowerScheduler ++ installed. The script periodically check the TV log file to find and interpret power scheduler ++ messages. When all messages of tv log file are read, the script check if a standby can be started or not and when this standby can be started. If conditions remain the same until a idle timeout (which must be smaller than the PSS++ or Windows idle timout), the script start a batch file to execute a custom action, wait the end of the batch file and start a second batch file to start the windows standby. This script works fine for now about one week and I thing it could be interesting for some of you. This is VB script so you can edit and change it to get what you want if needed. If you try this script and get issues, don't hesitate to give me feedback but I have not many times to improve this script. If you want to report an issues, please post tv log file and also script log file. I only tested on my home configuration : Multiseat setup with one dedicaced TV server and 3 MP clients. Tested on both MP1.3 and MP1.4. Pay attention that log files are different from these 2 MP versions and a flag must be changed in the script config file to indicated if you use MP1.3 or MP1.4 TODO List : Improvement : - Get windows standby timeout value in vbscript : If someone could help, it's great because I don't fin anyway to do it. Who to install : - Copy the attached files on your TV server (eg : C:\StandbyTVServer) - Edit StandbyTVServer.config to change some settings - Edit Custom.bat and standby.bat files - Start the StandbyTVServer.vbs - Check the result into StandbyTVServer.log [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
MediaPortal 1 Plugins
VBScript to Standby TV server with options and using PSS++
Contact us
RSS
Top
Bottom