Serviio WinHelper (Sleep Management and Tools for Windows)
Updated to version 1.0.9 - 7 February 2016
I have developed a Windows App (32 bit) using Visual C# as an outcome of this topic: viewtopic.php?f=3&t=1947, based on a methodology developed by user, J.M. While I developed this app for my own use it is available below for anyone that would like to use it. The app requires .NET Framework 4.0 or later be installed on your PC.
The original purpose of Serviio WinHelper was to stop the PC going to sleep while you're watching a movie. Over time, Serviio Winhelper evolved to include some "quick access" tools and windows specific enhancements as described below. Serviio WinHelper is designed to run in your system tray (and left running in the background).
Sleep Management
- WinHelper will query the Serviio Server using the Serviio Configuration API for a list of active renderers. WinHelper will then monitor TCP streaming sessions to these devices by:
- Periodically scanning for active TCP sessions on both:
- port 8895 between Serviio and the listed renderers; and
- port 23424 between Serviio and any IP address (on your network or remote access from the internet). - The interval between scans can be set on the Sleep tab, between 1 to 30 minutes - this interval must be less than your Windows sleep timer setting otherwise this helper won't do much
- If an active TCP Serviio session is found, WinHelper will put the PC into an "Away" sleep mode - when system sleep is requested the screen will sleep but the CPU remains available for streaming. Also if you manually put your system to sleep while in this mode it will remain in an active state (useful for HTPC's - manually putting your system to "sleep" will instead remain in Away mode).
- If no active TCP Serviio sessions are found, WinHelper will wait a minimum of ten minutes before reverting back to normal sleep mode (ie. to whatever you have set up in Windows).
- Periodically scanning for active TCP sessions on both:
- Disabled devices and the PC Serviio is installed on are not included in the list of renderers monitored by WinHelper.
- Other PC's (detected as Window Media Player) are not included in the list of renderers monitored by WinHelper by default, however this can be changed in the Settings tab.
- Devices may be excluded by double-clicking on the device name in the Sleep tab in WinHelper.
- Remux and Media Information. Use the ffmpeg program included with your Serviio installation to perform some basic information collection and remuxing functions - see viewtopic.php?f=17&t=12136&p=80505#p80505 for details.
- Stop or Start the Windows Serviio Service. This is not the same as stopping/starting the server in Serviio Console - this stops or starts the windows service. This process requires UAC elevation (administrator privileges) when starting the service and as such you will be prompted to allow the "changes to your computer".
- Edit profiles.xlm. If you have Notepad++ installed (recommended) you will have the option to use this as an editor (otherwise the only option is Notepad).
- View the Serviio log.
- Enables setting detailed logging mode on/off. Note that these settings will not be saved until you restart the Windows Serviio Service. Also note that Serviio WinHelper will test the current logging mode when started but will not do so while running (ie. if you externally change the logging mode this will not be recognised by WinHelper unless you restart it);
- Allows you to automatically delete (reset) the Serviio Log file on next restart;
- Provide quick access to the Serviio Console, Serviio Mediabrowser (Pro Users only), Serviio Web page and the Serviio User Forum.
- Allows you to edit Profiles.xml and view the Serviio Log file.
- Provides a list of all established IPV4 TCP sessions to external devices (similar to the NETSTAT command), for info and debugging (from the context menu only).
- Allows you to stop and start the Windows Serviio Service.
- Set the prefered Text Editor - either Notepad or Notepad++, if installed on your system, is supported.
- Control whether to use Serviio Device Status as a second level check when determining Sleep mode. This is enabled by default.
- Control whether Windows Media Player devices (other PC's) are ignored when determining Sleep mode. This is enabled by default as these devices often produce "false positives".
- Allow Serviio WinHelper to automatic start with windows (at user login). Required for the sleep management feature of Serviio WinHelper.
- Erase all user settings from the registry. Use this to Uninstall the Serviio WinHelper (make sure it’s the last thing you do before closing otherwise settings may be added back to the registry). There is no uninstall program - simply erase settings from the registry and stop using it.
The connection status in Serviio WinHelper is not the same as the connected status in Serviio Console. The connection status in Serviio WinHelper shows whether an active TCP session on ports 8895 and 23424 (which Serviio uses for streaming) has been detected. Unfortunately this method is not foolproof - you may occasionally see active connections even when not streaming. This is because TCP sessions do not always terminate when you turn your TV/renderer off or otherwise cease streaming. This is not catastrophic - it just means your system won't go to sleep until after Windows cleans up the "false positive" TCP sessions. This is rare in my testing, but likely depends on your renderers and how they shut down sessions.
To minimise these false positives it is recommended that you disable all devices (in Serviio Console, right click on the device and un-select "Device Allowed") that you don't actively stream media to (usually other PC's). Note that by design the app will not monitor connections from Serviio to software running on the same PC (eg. VLC or MediaBrowser on the same PC).
Hopefully this app helps you. I have tested on Windows 7 32 bit, and other users have confirmed its operation on Windows 7 64 bit and Windows 8. Please let me know your experiences (particularly with other Windows versions) and any issues you may have (no promises but I'll do my best

Reason: Updated to version 1.0.9