The Back End of the Magic well not really magic but a lot of hard work. The back end server that picked the songs for the person pressing the button controlled whether the show was open or closed, logged data from the button and its sensors and generally tide everything toughter was designed in a program called NodeRED with help from another program called Mosquitto MQTT. 

The server was created over two years at first it was just a way of the button picking a song at random and the grew to include a web front end so that people could pick a song. As well as these two key functions it also processed temperature and humidity data and pushed in to a database 

NodeRED User Interface 

 

The Magic behind the show

The flow that controlled if the show was open or closed

The flow that controlled data being logged to a database 

The flow that controlled the button

The flow that controlled the WebUI controls

And now with the button being retired and replaced with a plugin this flow will be archived off.