During the winter of 2016 we wrote an integration for Total Cricket Scorer (TCS).
Important note: You with this integration you can use TCS to score the match, and the scoreboard will automatically be updated. However, this is an optional integration for clubs that happen you use TCS. You do not have to have TCS to operate the scoreboard. The standard interface shown on the Finished Article page works fine without this integration.
Very important note: This software is still in BETA, and has had limited testing. I recommend strongly that you still install the manual web interface page following the instructions on the Setting up the Raspberry page (as a backup in case the service fails).
The integration has the following features
- Update the scoreboard every ball that is bowled
- Update twitter every 20 runs, wicket or end of innings
- Optionally update facebook (using twitter auto post feature)
- Windows 10 laptop to run TCS (other versions of Windows may work, but haven’t been tested).
- Raspberry Pi correctly setup using the instructions from the Setting up the Arduino page. Please note the code has not been tested with the Bradford upon Avon interface modifications.
- Working network link to scoreboard
- Working network link to Internet (if twitter update feature is used)
- Total Cricket Scorer version 8
- Addition TCS ‘club’ scoreboard licence (£200) – Please contact TCS for details.
Installing the TCS integration
There are two software packages to install, the first is a windows service which monitors the XML files created by TCS and updates the scoreboard and publishes them to twitter.
Step 1 – Setting up twitter to allow score updates to be published – Optional
If you want the integration to publish to twitter, then we need to set up a twitter account and then modify the settings to allow the scoreboard service to publish. To do this, setup a twitter account.
You now need to setup the account to allow the scoreboard service to use it. There are some good instructions here on how to do this. You will need to collect four critical pieces of information:
- Consumer Key (API Key)
- Consumer Secret (API Secret)
- Access Token
- Access Token Secret
Also make sure that the permissions are setup to allow Read and Write access.
Step 2 – Setting up twitter to automatically update Facebook – Optional
If you want to also update Facebook with score updates, then you can use Twitter to achieve this. First, set up a new Facebook page.
Now following the instructions from the twitter help website.
Step 3 – Setup the Live Update Helper
You need to install the live update helper application, which is used at the start of the game to record the teams that are playing and who is batting first (the TCS XML output doesn’t have this information unless you buy the £1000 pro scoreboard licence)
First download the software and unzip the LiveUpdateHelperV1.zip file. Double click on the setup.exe file and follow the instructions.
Make a note of the installation directory. Once installed open the installation directory, and create two new folders called helper and logfile.
Now open the LiveUpdateHelper.exe.conf file using a text editor.
Check the HelperPath and Logfile settings look correct and the path exists. Also edit the HomeTeam setting to be the name of your club.
Step 4 – Setup the Build Your Own Scoreboard service
You need to install the build your own scoreboard service, which monitors the XML files created by TCS.
First download the software and unzip the BuilYourOwnScoreboardv1.zip file. Double click on the setup.exe file and follow the instructions.
Make a note of the installation directory. Once installed open the installation directory, and open the buildyourownscoreboard.exe.conf file with a text editor.
Check the XMLPath, Logfile and HelperPath paths are correct and the folders exist (the service will crash if the file paths are wrong).
Update the ScoreboardAddress setting, to point to the IP address of your scoreboard.
Set UpdateScoreboard setting to true, if you want the service to update the scoreboard after each ball
Set the UpdateTwitter setting to true, if you want the service to update twitter after each ball. Set to false if you do not want this functionality.
Set the TwitterConsumerKey, TwitterConsumerKeySecret, TwitterAccessToken and TwitterAccessTokenSecret settings using the values from Step 1 above.
Step 5 – Setup the file permissions
You need to update the file permissions for everything in the BuildYourOwnScoreboard directory, to allow read and write access. Open a file browser and navigate to C:\Program Files (x86).
Right click on BuildYourOwnScoreboard and choose properties.
Click on the box to clear the readonly setting (if it is set)
Now click on the security tab and press the Edit button.
Choose the Users group, and press Full Control.
Press OK to apply the settings, then press OK again to save the settings. When asked select “Apply changes to this folder, subfolder and files”
Step 6 – Setup the service
Click on start/run (or click on the Cortana box in windows 10) and type in services.msc.
Scroll down until you see the buildyourownscoreboard service and right click and press properties.
Set the startup type to “Automatic (Delayed Start)”, and press Start. Press Ok.
Refresh the services.msc interface, and check the buildyourownscoreboard service is running. Open a file browser and check that the logfile is being written to in the C:\Program Files (x86)\BuildYourOwnScoreboard\logfile directory.
Step 7 – Setup TCS
In order for TCS to update the scoreboard, you must buy an additional licence to enable the scoreboard feature. This software is written to support the ‘club’ version of the scoreboard licence which produces an XML file with a small number of score items after each ball is bowled. TCS charged £200 for the licence, and you have to email their support department to ask for a quote and to supply the licence (as it is not listed as an item to buy on their website).
Once you have procured and applied the licence, setup TCS to write the XML files to the C:\Program Files (x86)\BuildYourOwnScoreboard\xml folder (which is what the service monitors).
Running the software
On game day, start by opening the LiveUpdateHelper using the icon on the desktop. Set the type of game, opposition and the team that is batting first. Press the save button, which will create a file in the C:\Program Files (x86)\BuildYourOwnScoreboard\helper folder. You only have to do this once, at the start of the game.
Now open TCS and setup a new game. Scoreboard and twitter updates should automatically start.
If there are problems with how the software works, you should first check the status of the service by clicking on start/run (or click on the Cortana box in windows 10) and type in services.msc.
Scroll down until BuildYourOwnScoreboard is displayed, and check the service status is Running.
Now open a file browser and navigate to C:\Program Files (x86)\BuildYourOwnScoreboard\logfile. Check the log files in the directory to identify any problems.
The TCS integration code is released under the GPL V3 licence – available from http://www.gnu.org/licenses/gpl-3.0.html. You are welcome to review/edit/update the code as required, but I do ask that you submit any changes or enhancement back to the buildyourownscoreboard project by contacting me via contact us form. If you agree to the terms, you can download the scoreboard and liveupdatehelper source code. These projects were created in Visual Studio 2015 community edition.