Learn How to Use MQTT.fx with ThingSpeak

ThingSpeak just announced that they added MQTT as a way to send data to a ThingSpeak channel. This is great news since a lot of devices support MQTT. If you don’t have a device, but want to try out the MQTT protocol with ThingSpeak, you can use a desktop application called MQTT.fx. In this example, I am going to explain how to use MQTT.fx to send data to a ThingSpeak channel.

ThingSpeak MQTT Broker

Setup ThingSpeak

  • Sign up for ThingSpeak (or log in if you have an account)
  • Create a new channel
  • Note the Channel ID and Write API Key

Setup MQTT.fx

  • Download and install MQTT.fx.
  • Configure the connection profile for the desktop MQTT client.
    • Broker Address: mqtt.thingspeak.com
    • Broker Port: 1883

MQTT.fx Screenshot

  • Click Connect to connect to the ThingSpeak MQTT broker.

mqttdesktop02

  • Enter the topic channels/<channelID>/publish/<apikey> to publish data to a channel feed. Replace <channelID> with the channel ID and <apikey> with the write API key of the channel. Enter the message to publish to the channel feed. This PUBLISH message publishes a value of 45 to field 1 and 60 to field 2 of the specified channel, along with a status message MQTTPUBLISH.

mqttdesktop03

  • Alternatively, you can enter the topic channels/<channelID>/publish/fields/field<fieldnumber>/<apikey> to publish to a channel field. Replace <channelID> with the channel ID, <fieldnumber> with field number that want to update, and <apikey> with the write API key of the channel. Enter the message to publish to the channel field. This PUBLISH message publishes a value of 45 to field 1 of the specified channel.

mqttdesktop04

Additional Resources

  • MQTT Basics – Learn about the publish/subscribe architecture for connecting bandwidth and power-constrained devices over wireless networks
  • MQTT Client Configuration – Learn how to set up an MQTT client to communicate with the ThingSpeak MQTT broker
  • Choose Between REST and MQTT – Learn when to use REST and MQTT to update a channel

Are Open Source IoT Platforms Ready for Primetime?

Bruce Sinclair of IoT-Inc. recently asked me to be a guest on his Internet of Things podcast, the IoT Business Show. I have been a faithful listener to the podcast since it started so I was honored to be a part of his show. Bruce asks very interesting questions and has his audience at heart. His questions help answer questions that the audience might be wrestling with when making a decision about getting into IoT (or not).

In his latest episode, Bruce asks, “Are Open Source IoT Platforms Ready for Primetime?” My open source IoT project is ThingSpeak. I created ThingSpeak back in 2010 as an ioBridge project and it has really taken off. The source code for the ThingSpeak API is available on GitHub and is being worked on by over 100,000 developers from around the world.

Open Source IoT Platforms Podcast

To listen to the IoT Business Show podcast, check out iTunes or the IoT-Inc. website.

In this episode of the IoT Business Show, I speak with Hans Scharler about where open source platforms are today, and when it makes most sense to use them.

Bruce Sinclair

 

Twilio Rickrolls You Using Their API

I have been working with the Twilio API for a few of my projects. I have used Twilio to call me when disk space is running low on a server or to call my house and request its status. Twilio is a cloud-based communications platform for sending and receiving text messages or placing phone calls. Twilio is wrapped up nicely with a RESTful API so ThingSpeak or MATLAB can use it without a lot of setup.

Tonight, I was following a beginner tutorial that I wrote for using Twilio and ThingSpeak, and I noticed that their voice example plays a friendly greeting and then by surprise Twilio starts playing Rick Astley’s “Never Gonna Give You Up”, for the world’s geekiest rickroll.

Twilio’s example points to this Url: https://demo.twilio.com/docs/voice.xml.

If you look closer you will see the following code:

<?xml version="1.0" encoding="UTF-8"?>
<Response>
    <Say voice="alice">Thanks for trying our documentation. Enjoy!</Say>
    <Play>http://demo.twilio.com/docs/classic.mp3</Play>
</Response>

Go ahead and click: http://demo.twilio.com/docs/classic.mp3

Learning About Internet Memes – Ignite Talk

Ignite talks are 5 minute presentations about anything. The talks are designed to be quick, fun, and digestible. Ideas can spark revolutions. I had an idea for an Ignite talk about memes. I am fascinated by internet memes and how they get started. Through my research of memes, I ended up learning a lot more than I expected.

Richard Dawkins Meme

My Meme” is a talk about memes, and how we are hardwired to spread ideas. Humans use a process of imitation, transformation, and combination to invent new things, change culture, or just to share sometime new.

William Shatner at Boston Comic Con!

I had to. I just had to meet William Shatner. I saw that William Shatner was the guest of honor at this year’s Boston Comic Con, so I had to find a chance to meet him. Shatner is promoting a new memoir about his friendship with Leonard Nimoy. It is also the 50th anniversary of Star Trek. In my opinion, the original 3 seasons of Star Trek is some of the best TV ever produced.

Hans Scharler and William Shatner at Boston Comic Con

Shatner greeted us with a monologue about how he liked the Patriots because of Brady’s wife, but now he is a LA Rams fan. The Mayor of Boston, Marty Walsh, named August 13, 2016 William Shatner Day. From TV to spoken word albums, “I think it’s gonna be a long, long time” before I get this star struck again.

First Look at Dog

At the Boston Comic Con, I got to meet a comic book artist in the Boston area named Jay Kennedy. I pitched him my character named, “Dog”. Dog is the subject of some children stories and a board game that I have been working on in my copious spare time. I commissioned a color sketch drawn at the con based on the description from my pitch. Jay called me up a couple of hours later to show me what he had created. This is the first look at Dog… stay tuned. You probably are going to hear a lot more about this character in the coming months.

First Dog

Thanks, Jay!