Slack vs. Jabber

Several years ago I started working for a new company. Their phone system was stuck in the past. The past, like Version 4 when Version 10 was being sold. So we had to upgrade, there really wasn’t any other way around it.

Enter Cisco. As VOIP hardware manufacturers go, if you stay in the silo you’ll have a pretty good life. Call Manager, Unity, and Presence are a heady combination. I decided early on to hire a local company to help me with the design and the initial layout and setup, and I will always regard that choice as one of the best I have ever made, professionally. They did an amazing job, and their staff are absolute tops in their game. They are expensive, but in the end I think worth it. So they came, helped install the Cisco Business Essentials 6000 server, and all the heavy lifting that was needed to get all three products up and running, so that people who were using the old system saw next to nothing different about how everything worked. That’s a kind of holy grail in IT.

A part of the trio of products was Cisco Presence, or to use a shorthand about what it really was, simply Jabber. Jabber is an instant messaging platform, and I had quite a bit of experience as Jabber is, at least ostensibly, an open-source system. I had lots of Jabber experience back at my previous employ and I was looking forward to seeing Jabber rolled out across the company that I now work for. The previous employ was centered on Apple technology and as an IT administrator, Apple was like waking up in the Garden of Eden. It was an earthly delight. The Apple iteration of Jabber included a CLI option switch that allowed you to instantly join everyone in the Jabber directory, nee an LDAP directory, all together. It was called “–auto_buddy” and I loved that feature. It was the killer part of Jabber from Apple. When I added someone to OpenDirectory, I could open a Terminal and throw this one command and all my work would automatically add all my coworkers together, everyone is everyone else’s buddy. It was great, I really enjoyed it.

So then, years forward, on with Cisco Presence, their implementation of Jabber. Off searching for my favorite CLI friend, “–auto_buddy”, only to find out, none of that exists. And so, that hobbled Jabber immediately. Instant Messaging’s ROI is only really salient when you have everyone engaged. You can’t really argue about ROI until that point, because when you have only a handful of people actually connected, they don’t see the point, because not everyone is connected, including the people they want to communicate with right now. If you can’t do a thing immediately, then what is the point of doing it at all? This is the core reason why a lot of tech adoption trips and falls on its face. Especially with collaboration solutions like Jabber. Until everyone joins and uses the system, convincing them that they should use it might as well be one of Hercules’s tasks, like cleaning the Augean Stables. So without my ability to link everyone up, with “–auto_buddy”, I had a piecemeal system. Without the ability for everyone to see everyone else, adoption tripped and fell flat on its figurative face.

Shortly thereafter, it exited the cultural consciousness until years later, when a new coworker had stoked interest in it all over again. But it was doomed, not this time by the lack of demonstrable ROI or the lack of “–auto_buddy”, but rather by compliance control. By the time I had installed the required pieces for compliance, the entire affair was loaded into the figurative airlock and blown out into space.

Before the end of Jabber, and running currently is another system, one that I find more engaging at least personally and that is Slack. It’s free to use, which is a huge help, and also available everywhere. I don’t have to limit it behind the walled garden of our corporate VPN. That is a huge benefit and really eases the use of it, in every case. I can immediately see the benefits of using Slack, especially in groups like mine, in Information Technology. So that’s currently the extent of it. Again, tech adoption is flat and terminal, the selling point for Slack is still tied up with the same point for Jabber. You can only demonstrate the ROI when you have full engagement, and you can only get full engagement when people see the rewards of ROI. So even Slack is just a moribund as Jabber was. But at least with Slack there is room for enticing directions it could take. I’ve been kicking around the notion of examining Slack’s position in a B2B framework. Like between MSP’s and their customers. The MSP starts a Slack and invites their customers to join. Then each customer has a channel that they are invited to. Then the company staff at the MSP hop on Slack and use it for their own benefit. Everything is segregated using Slack’s internal controls, so the MSP gets a benefit immediately and the customers can effectively chat up their reps with a single click on an app, a website, or their phones. This could enhance the collaborative power between customer and provider. Invoices posted, updates about payments, and with IFTTT looming in the background, new automated benefits could be crafted and rolled out to customers immediately.

This could also revolutionize B2C relationships as well, but that would take more corporate bravery than even the B2B solution would. I don’t actually expect anyone to seriously accept my shoot-the-moon ideas, but I would like to imagine the world where I could start my Slack app, see all my professional relationships and be able to communicate with them that way. Maybe someday if Slack succeeds and more people ask the right questions. More people actively interested in collaboration would also help.

Moment of Geek: Raspberry Pi as Thermal Canary

A few days ago I had run into a problem at work. The small Mitsubishi Air Conditioner had decided to take a cooling nap in the middle of the day. So my office, which is also the machine room at work was up around 85 degrees Fahrenheit. I was used to this sort of thing, summers bringing primary cooling systems to their knees, but this time I had a huge A/C unit in the ceiling that I elected not to have removed and left in place, just in case. So I turned it on, set it’s thermal controller to 70 degrees and the room temperature tumbled in about ten minutes. Right after the room temperature was normal, and I had service out to visit me about my little wall-mounted A/C unit, the damn thing started functioning normally again. The tables turned on IT, where for our users, this is what happens to them. They can sit there and struggle, and then we arrive and the machines behave themselves like nothing at all was wrong.

So I had the big A/C, and it’s smaller wall-mounted unit both running overnight and faced a problem. I want to know what the temperature is in my machine room without having to buy a TempPageR device. I had one long ago, and it was rather expensive. I looked on my desk and noticed my Raspberry Pi, just sitting there, doing nothing of consequence. I did a brief cursory search on Google, and I knew the Raspberry Pi had a CPU Temperature interface hidden somewhere, and I was happily surprised to find a website detailing how to use this exact feature in Python programming language to write a temperature log, and optionally graph it. It was mostly copypasta, adapting things I had found online pretty much by copy and paste and hammering them here and there to work. I have programming skills, but they are rather dated and rusty. Plus I’ve never used Python, specifically. So my first effort was successful, I got a 1-second temperature logger in place. I was rather happily satisfied with my efforts, but I knew I would not be happy with Celsius, but I knew the temperature was colored by the CPU in the Raspberry Pi itself, so the reported temperature was quite higher than the room temperature.
I started to tinker. First searching for the equation to convert C into F. So I got it, 115 degrees. When I turned on the big A/C device, and its thermal controller displayed the ambient room temperature in F, 74. So I did some math and subtracted a constant 44 degrees from the CPU temperature, which “calibrated” the CPU temperature to be a rough approximation to the room temperature. Some eagle-eyed readers may notice that my math is off, but after I had moved the Pi over to the server stack, I had to adjust for a higher CPU temperature because of it being further away from the wall A/C unit. So now I had a 1-second temperature logger. I turned on graphing, and the entire program crashed and burned, I wasn’t running the application in an X-Windows environment, so I tore the graphing library and code out because I was never going to use the graphing feature anyways.

That, of course, was not enough to replace the TempPageR device. I needed some alarm system to alert me to what was going on. I thought of some interfaces, email, SMS, iMessage, email-to-telephone-call cleverness and each thought brought me against different versions of the cliffs of insanity. I could have probably smashed and hacked my way to a solution involving some ghastly labyrinth of security settings, passwords hashed with special algorithms that are only available on ENIAC computer simulators that only run on virtualized Intel 8086 processors with the Slovenian language pack loaded and using the Cyrillic character set; An arrangement that was an epic pain in the ass. So earlier in the day, I had tripped over an app advertisement for Slack so that it could use incoming data from the Pingometer website. I have a Pingometer account, a free one because I’m a cheap bastard. The single pinger externally checks my fiber optic connection at work, keeping AT&T on their toes when it comes to outages. The Pingometer website uses incoming Slack webhooks. An incoming Slack webhook comes from some source that makes a really simple web browser call using HTTP. It wraps JSON into HTTP and sends the request to Slacks servers. Slack then does everything needed to make sure the message is pretty and ends up on the right Slack channel, on the right team; this was my alert mechanism.

So I did another Google search, found the intersection between Linux, Python, and Slack and some more copypasta and some tinkering and I had a Python app that displayed the room temperature in Degrees F, and made my Slack a noisy mess, as it was sending incoming webhook requests every second. One more tweak, which was a super-simple IF-THEN block, set my high-temperature mark at 90 degrees F and let it go.

 

There is something satisfying about being able to hack something together, cobble it actually, and have it work without blowing up on the terminal, blowing up Slack, or otherwise failing. So now I have a $35 Raspberry Pi running as a rough temperature alarm, it’ll send alerts to Slack and let me and my System Admin know at the same time over Slack. I’m quite happy with how it all worked out. No obnoxious email settings, ports, security frameworks, awkward and obtuse hashing routines, just a single JSON-formatted HTTP call and BAM. All set. An alarm, with a date and time stamp and a temperature, delivered right onto my iPhone with automatic notifications from Slack, so it wakes me up if I need it.

So anyways, without further ado, here is the code:


from gpiozero import CPUTemperature
from time import sleep, strftime, time
import json
import requests

# Set the webhook_url to the one provided by Slack when you create the webhook a
t https://my.slack.com/services/new/incoming-webhook/
webhook_url = ‘https://hooks.slack.com/services/####/#####’

cpu = CPUTemperature()

def write_temp(temp):
with open(“cpu_temp.csv”, “a”) as log:
log.write(“{0},{1}\n”.format(strftime(“%Y-%m-%d %H:%M:%S”),str(temp)))
if temp > 90:
slack_data = {‘text’: “{0},{1}\n”.format(strftime(“%Y-%m-%d %H:%M:%S”
),str(temp))}
response = requests.post(
webhook_url, data=json.dumps(slack_data),
headers={‘Content-Type’: ‘application/json’}
)
if response.status_code != 200:
raise ValueError(
‘Request to slack returned an error %s, the response is:\n%s’
% (response.status_code, response.text)
)

while True:
temp = cpu.temperature
temp = (9.0/5.0 * temp + 32) – 44
write_temp(temp)
sleep(1)


It has been forever since I’ve needed to program anything. Once I was done, and I saw it work the way I wanted it to, I was quite happy with myself. I haven’t felt this particular sense of accomplishment since my college years. It was quite a welcome feeling.