DULMEN.net   Follow me on Facebook Contact DULMEN.net  

FSRadioPlanner - Programming@DULMEN.net

FSRadioPlanner
Application for scheduling internet radio stations on Frontier Silicon chipset based radio's. Optimized and tested on Apart PMR4000R MKII. Control is based on HTTP requests and the XML return data from the radio.

NOTE ! A good (local) network connection between radio and PC is essential.
 
Features
-Shows current mode, station and volume
-Easy configuring of tasks and settings in gui
-Maximum of 30 weekly tasks
-All tasks repeated every week
-Schuduled station changes (stations must be in radio presets)
-Schuduled power, mute or volume changes
-Optionally keeps planned volume and/or radio station active
-Option for configuring a default volume per preset station
-Manual station changes when not in automatic mode
 
Description
Do you have a public radio system on your work floor ? And does everybody want a different radio station tuned ? Our analog radio was just recently replaced with a digital internet radio which could be controlled over the network. Now we didn't had to go to the radio to tune in another station but could do it remote using the FSRadio-Remote software (https://sourceforge.net/projects/fs-remote) from eric-dev.
Still there was a lot of discussions going on which radio station was selected so they decided to vote and the top 5 was selected for monday to friday. All we needed was a program that automatically changed the station every day at 0:00 hours. Unfortunately this program did not exist (or I just couldn't find it).

So I started experimenting with the HTTP request and XML return data features of the radio. Our unit (Apart PMR4000R MKII) uses a Frontier Silicon chipset:

"Frontier Silicon Ltd was founded in June 2001, as a fabless semiconductor business to develop, design and build cutting-edge semiconductor, software and module solutions for leading digital radio, television and mobile phone brands. Our technology can be found in nearly all leading radio brands including Bang & Olufsen, Bush, Denon, Goodmans, Grundig, Hitachi, JVC, Onkyo, Philips, PURE Digital, ROBERTS, Sanyo, Sharp, Sony, TEAC, Yamaha, and many more."

Luckily the commands and return data were well documented in a manual from Apart (see downloads below) and I found in the AutoHotKey forum some examples how to send HTTP requests and how to read and extract the returned XML data. I wrote some PHP scripts for my webserver that simulated the basic radio responses to be able to test at home. All I had to do now was to create a user interface to enter a schedule and that showed the current status of the radio. This resulted in the program shown in the screenshot below.

Because the program needs to stay active, pressing the close button or the X on the top right only hides the windows in the system tray. The program can only be closed from its system tray menu.

On the status bar the previous and next scheduled task are shown. On the right of the status bar the last response from the digital radio is displayed accompanied with an icon. If an error occured during communication with the radio the icon changes to red and can be reset by clicking on the FSRadioPlanner logo on the top right. See the explanation of the other window elements grouped in boxes below the screen shot.
 
Screenshots
FSRadioPlanner screenshot
1Manual control elements for Power, Mute and Mode. These settings are not saved in the confiuration file but follow the status of the digital radio.
2Display of the active internet radio station.
3Display and setting of the volume. With "AutoVolume" the volume is automatically set to the volume set at the preset stations (4). This setting is saved in the configuration file by pressing the button Save Settings (6).
4Overview of the preset station of the digital radio and settings of the volume per station. These settings are saved by pressing the button Save Settings (6). As long as the settings "Stick to planned stations" (4) or "Run planned tasks" (7) are not active you can switch radio stations with the "Set" buttons.
5Setting of the IP address or hostname of the digital radio and the pin code. These settings are saved by pressing the button Save Settings (6).
6Button to save the configuration and to close the window. Note that the program can only be completely closed from its system tray menu.
7Overview of the scheduled tasks sorted by the day and time starting on Monday at 0:00 hours. With the setting "Run planned tasks" the schedule becomes active. This setting is saved by pressing the button Save Settings (6).
8Task settings fields and buttons. By selecting a task in the tasks overview (7), this task can be changed or deleted. By saving these changes with the button "Save Task" the tasks overview (7) will be refreshed. If first the button "Clear Task" is pressed the task will be deleted. There is a maximum of 30 tasks that can be set.
Tasks can contain a station change but also a change of volume, mute on/off or power on/off. A task can be activated of deactivated with the checkmark "Active".
9Messages of last performed communication with the digital radio and changes to the configuration. These messages can also be saved to a log file (see configuration file settings below).
 
Commandline options
No command-line options available.
 
Configuration file settings
[ApplicationOptions]
RadioIP IP address off radio, set from gui
RadioPin Encrypted pin for communication with radio, set from gui
AutoVolume Keep volume on preset values, set from gui
PlannedOnly Keep planned stations active, set from gui
RunTasks Run planned tasks, set from gui
LoopDelay Number of milliseconds until manual tasks are executed (loop delay), 500 = default
UpdateDelay Number of seconds until window refreshes radio status, 5 = default
TimeOut Number of seconds until communication with radio times out, 1 = default
WriteLog Write log file, 0 = default (off), 1 = on
MaxMessages Number of visible messages in queue, 25 = default
MaxLogSize Maximum log file size in kB, 250 = default
Debug For dubugging, 0 = default(off), 1 = additional logging, 2 = include radio responses in log
TestServer For testing purposes, 0 = default (off), 1 = on
[Volumes]
%Station% Volume for each preset station, set from gui
[AutoVolumes]
%Station% Activate auto volume for each preset station, set from gui
[PlannedTasks]
Header Header for task list, default = No|Day|Time|Station/Funct.|Opt.|Act.|DayTime
Task1..30 Configured task, set by gui
 
Version history
v1.0 Initial setup
v1.1 Bugfix 01 corrected the variable used for showing task number in message
 
Known bugs
Bug no. Version Fixed in Description
01 v1.0 v1.1 Message "executing planned task" always shows task 0
 
Future enhancements
Add selectable week schedules.
 
Download
Please read the legal notice first, allthough you probably heard it before :)


Copyright 2018 DULMEN.net. All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
  • Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  • Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY DULMEN.net ''AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL DULMEN.net OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

The views and conclusions contained in the software and documentation are those of the authors and should not be interpreted as representing official policies, either expressed or implied, of DULMEN.net.


You can download FSRadioPlanner as a compressed folder containing all files needed. No need to install the software, just unzip, adapt the configuration file FSRadioPlanner.ini and run FSRadioPlanner.exe.
FSRadioPlanner is free for personal and bussiness use and is free to distribute as is as long as the program is not altered and accompanied with the FSRadioPlanner text file.

VersionFileSize
v1.1FSRadioPlanner_v1.1.zip424,57 KB (434762 bytes)
v1.1FSRadioPlanner_v1.1.7z349,69 KB (358084 bytes)
FSRadioPlanner_PMR4000RMKII_Control_Command_list.pdf2,43 MB (2550123 bytes)
 
 
DULMEN.net © v8 2018 - Designed & written by Arno van Dulmen