Using Proximity to Start an Octoblu Workflow

This is the second part of the IoT workspace demo. This time, we will use proximity to kick off an Octoblu workflow without an iBeacon – mainly because this was a last minute add to the demo ūüėČ

A Poor Man’s iBeacon

a.k.a. I needed a quick solution for proximity without an iBeacon

During the Citrix Geek Speak demo I previously blogged about, we needed a way to kick off everything. ¬†Steve and I discussed a few different ways of doing this, but we landed on using proximity – meaning when Steve walked over to the IoT workspace¬†with a particular device, everything would light up and we would be off to the races. ¬†The correct way to do this would be an iBeacon, but this was a last minute decision and we didn’t have one. ¬†So, we used bluetooth paring on a laptop. ¬†The rest of this article explains that part in detail.

Proximity with a Laptop

My first thought was to write some code to accomplish starting an Octoblu workflow using bluetooth proximity. ¬†There are some examples out there for the¬†pieces I needed for this (bluetooth pairing, bluetooth signal strength, curl, etc.). ¬†But then I thought that there might be something already written. ¬†Sure enough, I found 2 solutions (for Mac) – EventScripts¬†and Bluetooth Proximity Tasker. ¬†EventScripts was more robust and felt more polished, but I ended up using Bluetooth Proximity Tasker for the simple fact that I could control exactly how strong of a bluetooth signal I needed to start/stop an action. ¬†This was important as I didn’t know ahead of time what the signal strength would be like on stage at Geek Speak Tonight (especially once the room filled up with fellow Geeks).

Bluetooth Proximity Tasker

As you can see in the screenshot above, there is a slider that lets me choose the signal strength.  The green bar you see above the slider is my actual signal strength.  So, I would walk around to see what my actual strength was and set the slider appropriately.

AppleScript Kicks off the Flow

So now that we have have the bluetooth strength thing worked out, all we need is a script to kick off the Octoblu flow.  Recall from my previous post that all triggers in Octoblu have a HTTP POST URL.  I just used this URL and curl to work the magic.  Here is the script:

  say "eye oh tee, work space. activated"
  set theURL to "[your trigger URL]"
  do shell script "curl -X POST " & quoted form of theURL

The first line is a quasi-phonetic pronunciation for “IoT Workspace Activated”. ¬†That is about as close as I could get using AppleScript. ¬†The next two lines actually kick off the Octoblu IoT workspace in a green state.


So, there you have it. ¬†That is pretty much the complete IoT Workspace demo from my side of the desk. ¬†Octoblu is a lot of fun and I’m experimenting with other ways of using this software¬†for business, home automation, and just plain fun (like Legos). ¬†Go experiment yourself and have fun!



Trigger an Octoblu IoT Flow from Splunk

Octoblu does some incredible stuff with physical things driven by software. Steve Greenberg and I did a demo during Geek Speak Tonight at Citrix Synergy triggering physical devices via a Splunk search. This article goes into some of the Splunk details.

An alternate title to this article might be “How Steve Greenberg and I Pulled off the Robo-Kitty Monitor Alerts at Citrix Synergy Geek Speak Tonight”.

In case you missed it, here it is below:


The Demo Scenario

Anyway, Octoblu does some incredible stuff with physical things driven by software. In the demo that Steve and I did, Steve set up an actual desk with various IoT devices on it. ¬†We will call this the “IoT Workspace”. ¬†The IoT Workspace had a digital picture frame, lights that can change color, a mini file cabinet (that held business cards), a¬†maneki-neko (a.k.a. lucky cat) with several hacked features, a smoke machine, and more. ¬†We started the IoT Workspace using proximity (look for another article about how we did that soon). Then, I had a Splunk instance monitoring a Citrix stack including network, XenApp, hypervisors (XenServer, Hyper-V, and VMware), physical hardware (in this case Cisco UCS), shared storage, NetScaler, etc. At the beginning of the demonstration, the environment was all-good so everything glowed green, the Robo-Kitty was happy, and the picture frame on the desk showed an array of our favorite pictures (see below):

IoT Workspace
IoT Workspace
Splunk Octoblu Green
Splunk Dashboard (All Good)


Then, the ICA Round Trip Time started to go up. Nothing terrible, but we used that as an indicator that our users might start seeing some lag in their sessions. This is where Splunk fired the first Octoblu trigger to go to a “yellow” state. The picture frame showed a worried Minion, lights turned yellow, and Robo-Kitty‚Äôs eyes turned yellow and started to swivel.

Next, Splunk showed problems with the XenApp servers and hypervisors in addition to the ICA Round Trip Time. So, Splunk triggered a “red” state. The Minion in the picture frame looked more worried, lights turned red, and Robo-Kitty‚Äôs eyes turned red and around¬†faster.

Finally, the entire stack went to pot. The write latency on the storage array went through the roof, the hypervisors were not happy, the XenApp server resources were scarce, the ICA Round Trip Time was off the chart. Splunk triggered the “defcon red” state. Robo-Kitty shot lasers out of its chest, the storage cabinet on the IoT Workspace started to rattle, smoke was coming out of the desk. The culprit ended up being a write controller issue on the shared storage. ¬†Once everything was fixed, Splunk triggered the “green” state again.


How it Works

Steve did all the physical work building the IoT Workspace by hooking up Raspberry Pi, Gateblu, servos, lights, etc. Check out his article for more info -> Steve also built the Octoblu flows to make all that stuff work.

I hooked up the Octoblu triggers in Splunk to kick off all these connected devices. A trigger generally initiates Octoblu flows. These triggers have HTTP POST URLs that can be used to remotely initiate the flows (see screen shot). This is how I had Splunk act upon the data seen in the Citrix stack.

Octoblu Trigger



I ran a Splunk real-time search and triggered a Python script that initiated the HTTP POST with data from the Splunk search to Octoblu when certain conditions happened. For example, if the ICA Round Trip Time exceeds 30ms and is less than 60ms, trigger a yellow alert condition. Here is the Splunk search:

sourcetype=ICA:RTT ICARTT > 30 ICARTT < 60 | eval url="<HTTP POST URL for the Octoblu trigger>" | eval alert_level="Yellow"

If you are interested, I have the entire Splunk/Octoblu example I used uploaded to GitHub. You can also download and use Splunk for free.  There is a data generator built in there as well that will let you trigger different conditions like I did in the demo.

The magic happens in the saved search and a python scripted named  The saved search contains the HTTP POST url and the condition.  The python script takes those parameters from the search and sends it over to Octoblu.  If you want to play around with this on your own system, be sure to edit the saved search by opening the Octoblu app in Splunk and clicking Settings -> Searches, reports, and alerts:

Splunk Octoblu Search SettingsClick on the example alert and change the URL to your Octoblu trigger URL.


Anyway, there you go. It may look kind of complicated at first, but really it is quite easy to trigger any Octoblu workflow given a variety of trigger situations.



Citrix Synergy 2015 Day 2 Keynote Live Blog

The day 2 keynote this year is focused on things that are yet to come. ¬†Traditionally, the first day keynote intermingled the “what’s available now” stuff with the “what’s coming in the next 6, 12, 18, n” months. ¬†By breaking these things up into 2 days, it is a little more clear that what is shown today isn’t readily available, but is more of the direction of Citrix. Continue reading “Citrix Synergy 2015 Day 2 Keynote Live Blog”

Citrix Synergy 2015 Day 1 Keynote Live Blog

Here we are again at Citrix Synergy. I will be live blogging the keynote here. Content will scroll up as I post it. Also, you can follow me on Twitter (@JasonConger) for updates.

Here we are again at Citrix Synergy. I will be live blogging the keynote here. Content will scroll up as I post it. Also, you can follow me on Twitter (@JasonConger) for updates. Continue reading “Citrix Synergy 2015 Day 1 Keynote Live Blog”