Lunifera MQTT Xmas-Tree is online

With December just begun, we are happy to announce that the 2014 incarnation of our MQTT Xmas Tree is now online. Feel free to try it out here: The tree is standing in our office, and everybody can change the lights on it, move the Xmas star and have a tiny angel fly around 😉

How did we do it? Well, it consists of three main parts – not counting the tree itself 😉

  • a RaspberryPi that controls the LED band on the tree and the movement of the star and the Xmas angel. On this RaspberryPi, we have the Mihini framework running an MQTT client. The MQTT client ties together hardware (GPIO pins) and software (MQTT messages). In order to retrieve MQTT messages, the client uses the Lua implementation of Eclipse Paho. Messages containing valid Xmas Tree commands are then translated to the appropriate GPIO actions (controlling the LED band via an IR diode, powering the motor for the Xmas angel via a transistor and triggering an Arduino Uno that generates a PPM signal for the servo motor that moves the star).
  • a second RaspberryPi that has a webcam attached and serves a video stream via motion and apache2 (we followed this great tutorial approximately to get this running). With DDNS, this stream can be reached from the outside world.
  • a Vaadin Web UI featuring buttons that send MQTT messages with commands for our tree to our MQTT broker (to be picked up by the first RaspberryPi) and displaying the video stream so users can watch the effects of their actions.

Getting this contraption to work was great fun — a great way to spend one’s spare time. A nice team-building activity. And a perfect counterweight to tedious debugging sessions ;-)

Of course, we are going to open source the tree command software on Github. By the way here is an overview picture of the hardware we used for controlling the tree:

Christmastree-blog

 

Happy treeing and have a joyous holiday season!

The Lunifera Crew from Vienna

http://www.lunifera.com

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: