In 2018, we added the ability for viewers to supply their first name via text message and have it included in the display. The name immediately displays on the small grid under the display and then every 10 minutes or so, a 1 minute sequence is displayed where 13 names are included on the 18' X 8' grid. Starting in 2019, viewers can see there spot in the queue using the same
website used for voting. Here are two videos of the system in action.
How it works
We use the Twilo service to convert inbound text messages to API calls on our web server.
Our web server (apache + python) to accept the message from Twilo.
If the name isn't in the white list, a text message is sent to the admin and the originator of the message is notified that the name needs reviewed.
For valid names, a MQTT message is generated and sent to both the Clock VM and the xLights VM box where it will be added to a local queue.
The Clock VM is running a custom C++ program. This program is written to always drain the queue of names before doing any other greetings / graphics.
The xLights VM is a Ubuntu vm running a python process. The name will just be added to the queue of the python process. The current queue is always published by the python program every 2 seconds so that the web server knows the current status.
In fpp, the sequence is set up so that a sequence called "WISH_Names.seq" is played approximately every 10 minutes. (The exact duration is controlled by the Webserver and will dynamically change based on the number of names in the queue.) Just before it is time to play the names, the webserver will send an MQTT message asking the xLights VM to genereate the sequence and move it to the FPP server.
The xLights VM, having received a signal that it is time for the next batch of names, will take the next 13 names from the queue, and generate a new xLights .xml file. It does this by loading a template file that has %NAME_1%, %NAME_2%, ... , %NAME_C% and just doing a simple replace. If there are not enought names, it just selects a few from the database as the seuqnce is designed to always play 13 names.
Once the .xml file has been generated, the python process runs xLights -r WISH_Names.xml to generate the .seq file.
As soon as the .seq file is generated, the python process uses the FPP API to upload Wish_names.seq file on the fpp server and send a signal via MQTT to let the webserver know everything is ready.
At this point the webserver will schedue names this song as the next song to play.
Finally, while all this is happening, both the Voting Website and Stats server have been monitring all traffic and provided updates to both the admin and end users.
The source code is avaiable if you are interested.
The web server also contains and admin page that allows us to remotely monitor the queue. We can remove or add new names the queue (without going thought he name validation.) . This will just generate the same MQTT messages that are consumed by the xLights VM and Clock VM machines. Most of the time, we use this to "add" any valid names that were incorrectly blocks by the name filter. Because of this, we have a one click "add" button that is displayed against anything that doesn't pass the filter.