Smartpixels.app Lighting Control Project used to control Christmas lights

Smartpixels.app Lighting Control Project used to control Christmas lights

story by Tomasz Siroń

I would like to present a project developed with a passion for almost 10 years. It is a non-commercial installation of lights controlled via the Internet. The user can control the illumination in real-time using the panel on the website.

I installed computer-controlled lights for the first time in 2012. I figured if a machine could control lights then why couldn’t a human. The system is in operation for the ninth season. I improve it every year. Krzysztof Styc from Oświęcim (Poland) made a significant contribution to the construction of the website.

He has been involved in the project since 2014. – In the beginning, I was only supposed to help with the site, but I had the idea to share my Christmas tree. After a few problems with powering the lamps, we managed to start the control on the Internet – says Krzysztof Styc (22 years old)

Mateusz Kołoś (19), Wiktor Jezioro (20), Przemysław Kasza (26), Hubert Ryfiński (27) and Marlena Martyna (25) are also involved in the lighting project.

Mateusz and Wiktor deal with the lighting of their properties, provide infrastructure and co-create the website. Przemysław, on the other hand, was the administrator and architect of IT systems adapted to cloud solutions. Marlena supports the team on non-technical issues. She watches over the progress of work in the project (Scrum methodology). She supports the Team in substantive and linguistic matters, being an objective – and sometimes critical – adviser. Hubert deals with issues related to audio-video transmission, e.g. a Christmas nativity scene in Modliborzyce, as well as technical service.

How does the installation work? The lights are connected to controllers (usually ESP8266 or Arduino) linked to the computer (Raspberry Pi). This, in turn, is connected with internet users around the world via smartpixels.app website.

Colors or effects are sent to the controller in a given location via Socket.io software. Each of us has different proprietary controllers, but the whole thing is based on the client’s code written in the Node.js programming language. For lighting, we use: cards with relays, PWM brightness controllers, programmable pixel diodes, LED strips. WLED or ESP Easy software is installed on the microcontroller, which is connected to the drivers of lights.

The web application uses the Node.js programming language – it generates a website with a control panel. Variable page elements are stored in the MySQL database which is replicated between servers. The application is based on the potential of Docker containers, it is run for production in a Kubernetes cluster. To ensure fast implementation of the code, we use the CI/CD (continuous integration and continuous deployment) with GitHub and Docker Hub services.

The user page is delivered from the nearest server through Cloudflare. Production machines communicate with each other via WireGuard VPN working in a mesh configuration. Infrastructure is designed for high availability and the ability to scale quickly.

We have our own video streaming solutions. We use WebRTC and HTTP Live Streaming technologies to deliver camera footage to users. Pictures from cameras are delivered to the server with graphics cards. On the server, images are processed into different quality streams. OvenMediaEngine software allows us to deliver the live view with the lowest possible delay (usually 2 seconds).

As cameras, we usually use consumer surveillance IP cameras, which are calibrated to ensure the highest possible image quality.

The website users control the lights. You can turn them on and off. My installation (A secret haven) consists of 20 sets of LED lamps consisting of about 2,000 lights. Not counting those hung on the Christmas tree at home. The whole can be admired by cameras transmitting live images.

The project enjoys increasing popularity year by year, which translates into the number of visits to the website. We have entries from virtually all over the world.

The start of the two main controls is scheduled for Christmas Eve. Programmable LEDs will be used to present the illumination, and their control will consist in selecting musical sequences to the rhythm of which the lighting will turn on.

Additionally, this year we decided to provide users with an innovative facility, and we connected a receipt printer to our Discord channel. The camera was directed at the printer. It turned out to be an incredible hit because users are eager to write messages in a shared chat and watch them print live 🙂

The idea of sharing a printer was completely spontaneous. For this task, we wanted to choose a printer that would be as maintenance-free as possible. After reviewing many offers, we chose the Epson TM-T88IV printer. This printer supports the ESC / POS standard, so you can “write” to it using many libraries available on the web.

Our proprietary script, using the DiscordPHP library, is responsible for sending messages from Discord to the printer. An appropriate message is generated and sent to RabbitMQ.

Our proprietary code is also responsible for sending messages from Tipply, which also was handled with RabbitMQ. We use RabbitMQ to queue outgoing messages to the printer. The printer is connected to the computer via an RS232 port, which might not keep up with a large amount of messages – this is why we queue messages.

We would like to invite all Internet users to play with our installation, and people who would like to join the project, please contact us.

Tomasz Siron (26) – Originator and initiator of Smartpixels.app. Responsible for technical, architectural, and public relations issues of the project. A graduate of Mechatronics at the Lublin University of Technology. Currently an administrator and enthusiast of Linux systems in the Lublin (Poland) branch of an IT industry company. Passionate about electronics, computer science, and broadly understood science. He loves to DIY, is the author of one of the most popular polish Facebook groups, “Majsterkowanie dla każdego”.

Please follow and like us:
Pin Share
About mixos

Mike is the founder and editor of Electronics-Lab.com, an electronics engineering community/news and project sharing platform. He studied Electronics and Physics and enjoys everything that has moving electrons and fun. His interests lying on solar cells, microcontrollers and switchmode power supplies. Feel free to reach him for feedback, random tips or just to say hello :-)

view all posts by admin
Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments
Get new posts by email:
Get new posts by email:

Join 97,426 other subscribers

Archives