Meet the @IIXmasTrain!

train

So, Octoblu finally made it in to work this week in the form of the @IIXmasTrain!  You see, we kinda take festive decorations quite seriously, especially in our Hatfield Head Office – it is a really, really a big deal.  Each year the various teams always take it to another level, often spending hours on end constructing elaborate displays in the hope of winning the illustrious trophy.  We’ve had Winter Wonderlands with snow machines (don’t tell Health and Safety!), Narnia, and the Chrismas when Head Of the OCC turned his office in to Santa’s Grotto will never be forgotten.  This year is no different….

This year, our Information Intelligence Team wanted to do something big based on Splunk. Simon (@wildyce), Head Of II asked if there was any Octoblu magic we could bring in, the conversation went something like:

Simon “We need some wheels turning and other stuff”

Me: “Cool, How long do we have?”

Simon “Judging is on Thursday”.

Great.  One weekend to get something going, all in the while Mrs Moody wants the lounge decorated before Christmas.

We settled on the idea of a Christmas Train going on a journey around every capital city in the world, our Splunk guru, Carl (@carlalldis), would handle the Splunk dashboard elements. We’d then use this, and Twitter to fire events in to Octoblu.  The Octoblu elements would involve the train wheels turning and some audio goodies.

You will have seen various Splunk vs Octoblu demos – Steve Greenberg and Jason Conger did the excellent demo at Citrix Synergy (see: http://www.jasonconger.com/post/trigger-an-octoblu-iot-flow-from-splunk/) and the awesome flying ponies the Octoblu gang did for Splunk .conf (https://www.hackster.io/team-octoblu9/iot-air-cannon-6c83b0).

If you want to have a go, you can find the docs here for true Splunk/Octoblu integration here: https://octoblu-splunk.readme.io/

We divided the tasks up between Nottingham and Hatfield. In essence, Team Nottingham (me) would do the moving wheels and the audio elements, Team Hatfield (everyone else) the bulk of the actual train, lighting and other decorations.

The Hackspace it was! In essence, I lasercut a box, and stuck some motors in, these would be controlled by a Particle Photon mounted on a PhoBot.  All the audio elements would be based on an RPi with Gateblu installed with some PC speakers attached.  All connected via WiFi to an old mobile we sourced that acted as a WiFi HotSpot.

I’m mostly happy with the build, it could have been neater, and I’d defo change loads if I had to do it again, and of course, it’d do more!

box1box2

The Photon was controlled by Octoblu using the Particle API – Octoblu simply sends an HTTP POST through the Particle Cloud calling whatever function you like through variables in the Compose node.  You can find an example here: https://www.hackster.io/virgilvox/web-enabled-neopixels-using-particle-octoblu-b4e8fa

We have a simple flow that simply starts and stops the wheels using Triggers.  The great thing about Triggers is that they have an HTTP Post command – pass these to Carl to integrate in to Splunk and we’re rocking!  We also fire off an MP3 of some train noises to a Raspberry Pi connected to some speakers:

octobluflow

The Twitter elements essentially check the Twitter feed of @IIXmasTrain and based on specific hashtags, play various audio files such as steam train noises, etc through the Raspberry Pi – much to the annoyance of those in the office.  I’ll go in to a little more detail on the Twitter integration in a later post.

 

Leave a Reply

Your email address will not be published. Required fields are marked *