Interactive nativity scene

Hi, I wanted to present the design of the interactive Christmas crib, which is located in my town. :slight_smile:

The whole thing is that from the level of the website you can change the color of the nativity scene, as well as start a carol that is played from the speakers in the crib. The whole can be observed through a camera that is directed at the crib.

The project is available at: https://crib.controlling24.com/

I hope the administrator doesn't treat it as an spam. We've put a lot of work into it and we want to show off abroad, so go ahead and send a link to our site to your friends :slight_smile:

The design of the interactive crib, despite appearances, is not a simple project, and its success consists of several people and a number of technologies!

At the crib, we use IP68 LED strips, 31V LED lights as well as LED and HID lamps powered by 12V safe voltage. For connection, we used hermetic quick connectors, and all the control electronics are located in Kradex enclosures, which are sequentially (for aesthetics and tidiness) enclosed in a plastic electrical box.
As an electronic backend, we use modules that use Mosfet transistors, as well as relays. They are controlled by Arduino Nano with an implemented program generating soft PWM on any of the pins we assign. These modules communicate with Raspberry Pi via UART (via USB) using the own API.

Communication is facilitated by the Raspbian system installed on Pi. From the PHP client level, all operations on the serial port resemble operations on ordinary text files. In addition to the topic of controling LED, Raspberry makes it easy to read data from weather sensors (via GPIO), and also allows you to play Christmas carols from the speakers in the crib and stream audio. We used
a high quality USB condenser microphone (is connected to Pi). The sound is taked using the arecord program and transmitted via a Linux pipe to a streaming server located in Amsterdam. This project uses VPS located in cloud environments. Thanks to this, with a variable number of visits, we can easily scale-up and scale-out. Docker container technology makes scaling easier so we can quickly get another hosting nod. We have implemented modified NGINX images and SQL databases in the docker. Of course, we don't just use cloud solutions - we have private on-premise servers. Virtualization is provided here by the free Proxmox tool and we use Mikrotik and Ubiquiti as the network infrastructure. VLAN application,
appropriate rules on the firewall and also the use of Cloudflare solutions allows for adequate performance as well as increasing the level of security. In addition to the Production environment, we also have lower environments. We use two lower environments: Development - Test, Test - Acceptance. These environments are all in our on-prem infrastructure, which is located in various parts of Poland. We transfer all data between them using the proprietary REST API. For image transmission, we use the FFmpeg program, which merges and encodes video image from an IP camera as well as audio from the SSH pipe into a single unit and then transmits to the YouTube server. As an infrastructure providing the crib network, we use Ubiquiti radio bridges and we also use the link of our partner Crossan. Thanks to VPN and terminal servers, we have remote access to our crib from anywhere in the world and we are able to respond in case of failure.
The entire project required us to learn about the technologies presented, test them and implement them in practice. The above description, of course, does not describe all the solutions we use, but only briefly introduces the design and complexity of the project.