Extending the post on the basics of MQTT SQL from 2lemetry's ThingFabric, I want to explore some more advanced topics in this post. For reference, we are running the following payload through the MQTT simulator in ThingFabric to test our queries. Case Statements MQTT SQL, by 2lemetry, also supports case statements so you can do basic transformations depending on the payload of your MQTT message. Picking up where we left off in the last post, change the query to: This is a basic case statement. We're looking for foo in the payload. If it's value is 42 then we will…

2lemetry ThingFabric launched a new feature called MQTT SQL (a feature created by Tim Kellogg) a while back. In this post, I'm going to explore a series of queries and their results demonstrating live transforms and filters over an MQTT feed. Getting Setup For this exercise, I'm going to setup a ThingFabric Simulator and run a sample payload through the platform on a 10 second interval. This will give us a standard payload to query against. In your ThingFabric account, open your project and create a new simulator. I'm using: Stuff simulators Thing (Device) rule-unit-test Frequency 10 seconds For the…

I'm going to explore adding custom logic to a live MQTT feed. At 2lemetry, we often hear from customers that they have the need to evaluate a sensor value or inject some custom lookup into a sensor payload before it hits the subscriber. ThingFabric enables this type of inline logic in its Rules Engine. In this post, I'm going to inject logic into a sensor payload using a NodeJS script in a Docker Container and a basic SQL based rule on the ThingFabric MQTT platform. Use Case Consider the following use case that we see fairly often in IoT applications.…

In this post, I'm going to cover the Heroku AddOn for 2lemetry ThingFabric as well as the ThingFabric MQTT device simulator. We'll put together a fully working device simulator and use the ThingFabric Analytics tools to visualize the data. Getting Setup I'm going to assume you don't already have a ThingFabric account, but you do have a Heroku account. We're using the Heroku Button to deploy a quick start application. Visit our Github starter project and click on the Deploy to Heroku button. You'll be taken to your Heroku Dashboard (above) where you can add an optional name for this…