As the IoT has matured to become an industry of its own, asset tracking has emerged as one of the most useful and pragmatic use cases. Whether it's a simple GPS tracking device or as complex as monitoring global supply chains, implementing an accurate, low-power system is critical.
In this webinar we go through the details for building your own asset tracker with cellular network connectivity and a dashboard. We covered project components including hardware, data routing, and data visualization.
Webinar Transcript - Global Asset Tracking with a Cellular Notecard and Datacake
Speaker: Rob Lauer - Director of Developer Relations - Blues Wireless 00:00
Hi, everybody, I think we are about ready to get started. Thanks for joining us today. This is our first Zoom webinar, so expect technical difficulties here. Somebody on my team, please shout out if my slides or screen look funky. Thanks for joining this special little asset tracking webinar brought to you by Blues Wireless and Datacake. Today, we're going to dive into a really easy way of getting up and running with an Asset Tracking IoT solution that, while really easy to start, I think you'll find is very configurable, very power conscious and cloud connected. I want to start with a quick round of introductions. Starting off very self-serving, my name is Rob Lauer. I'm director of developer relations here at Blues Wireless. Far more importantly with me are TJ Van Toll, who's our principal developer advocate, and Simon Kemper, who is co-founder and CEO of Datacake, and Paige Niedringhaus, who is a staff software engineer here at Blues. Now together, we're going to provide what I hope is a very informative and certainly an engaging journey for you all today. I thought it would be nice to start with a quote: “Complexity kills. It sucks the life out of developers, it makes products difficult to plan, build, and test.” This quote is from Ray Ozzie, the Blues Wireless founder and CEO. I think you'll find today that this theme of simplicity effectively killing complexity runs throughout what we show you both on the Blues Wireless side of things and with Datacake as well. But don't take my word for it. Let's kind of kick things off here.
We're going to kill complexity, if you will, in the asset tracking world in the following ways. I'm going to start with a very brief introduction to Blues Wireless and our core products that make up our asset tracking solutions. TJ is going to join and show a hands-on demo of setting up an asset tracker from scratch without using a host microcontroller. Then Simon is going to show off the amazing capabilities of Datacake, along with some really great new mapping features. And as a bit of an interlude, while TJ runs an errand with his tracker, and you'll see what I mean by that, Paige is going to join in tell us about her all too real experience with building and deploying a tracker in her parents’ car. Finally, we'll come back to TJ, and we’ll check on him wherever he may be. Some final logistics: We will be doing some Q&A at the end, but please don't wait until then to ask your questions. There is the Q&A option that you have in your Zoom UI that you can use.
Otherwise, there’s the chat as well, either is fine for us. We’re certainly all here to answer your questions as they come in during the webinar. So feel free to enter them as they pop into your head. Of course, if anything happens with webinar feed, or if you need to leave early, rest assured we are recording this and we'll provide a link to the webinar on YouTube in about a day or so. You will get a follow-up email with the recording and some additional resources. I want to start with a company that three of us work for—Blues Wireless. I apologize to those of you who have heard me give this intro before, but I think it is important to give some context to what Blues can provide in these asset tracking scenarios. So Blues Wireless is an IoT company. We're focused on making wireless connectivity easier for developers, stated in the simplest terms. As mentioned, we were founded and are currently led by former Microsoft Chief Software Architect Ray Ozzie.
Ray is well known for starting up Azure back in the day, and he was a key figure in Lotus Notes. So we do provide hardware and services that back up this message of making wireless IoT easier for developers and more affordable for all. So if that is our core mission, how do we really make that happen? Well, our focus really is on securing your data from the moment it's acquired by a sensor or anything on the device all the way through to landing on your cloud app. All of our hardware solutions are low power out of the box to the tune of eight micro amps when idle. This is critically important for asset tracking scenarios. We're also very much a developer-focused company; developer experience is absolutely a top priority. Hence, what you'll see is a very elegant and easy-to-use JSON-based API. I could use the phrase “low code” here today, but I think you'll see that our trackers are configured only with JSON requests. So there is really no coding required.
Now zooming in on our hardware really quickly, the Notecard is the core of what we provide: It is a low power system on module measuring a tiny 30 by 35 millimeters. It does have that M.2 edge connector at the bottom for embedding in your project. To be clear, there are both cellular and Wi-Fi variants of the Notecard: the Wi-Fi has the black PCB and the cellular the green. The cellular includes a GPS module as well, which is slightly important for asset tracking, and it also comes prepaid with 500 megabytes of data and 10 years of service included. So the API—the way you interact with a Notecard—is all JSON; there is no archaic AT cellular modem commands to manage. We also have SDKs for Python, Go, Arduino, and C or C++ as well. There are cellular Notecard varieties that work globally using NB- IoT, LTE-M and Cat-1 cellular standards.
This again is a critical feature for asset tracking, especially if you don't know which cellular protocols are available where your asset is heading. So the Notecard can seamlessly switch between available protocols. Now to make it easier to use your Notecard when you're prototyping, or even when you're ready to embed it in a more permanent solution, we provide a line of products called Notecarriers. These are development boards that allow you to snap a Notecard in and connect it to virtually any solution you can dream up. For example, the Notecarrier AF includes a Feather-compatible socket with onboard antennas as well. The A model includes headers that let you hook it up to any microcontroller you want. It also has onboard antennas. A new rev of this Notecarrier, I believe, is what TJ is going to be showing off today. The B is a small form factor Notecarrier, which is great for more production-ready scenarios. Finally, the Notecarrier Pi is a Pi HAT for working with really any Raspberry Pi-compatible single-board computer. Finally, Notehub is the Blues Wireless cloud service that receives data as a proxy from the Notecard, and in turn will securely route it to your cloud app of choice, which today of course is Datacake.
Also, within Notehub, you can manage fleets of devices, and you can update both host microcontroller and Notecard firmware over the air. Again, Notehub is about securely transmitting data both from the Notecard and then onto your cloud. It is secure as in data is transferred off the public internet via private VPN tunnels and can optionally be encrypted. There is no certificate management or key rotation required with Notecard or Notehub. The cool thing about the Notecard is it knows exactly where to go as soon as you power it on. So again, everything is JSON in and JSON out with the Notecard API. For example, if you wanted to get your Notecard’s GPS location, you simply call card.location, and it will return the requested GPS location with some additional metadata. Now the rest of our API is very similar to this, which TJ will show you all in a little bit. Now to kind of help visualize where the Notecard and Notehub sit in your IoT solution, I just want to walk you through a quick diagram here. So you bring your own microcontroller and your own single board computer, but today, maybe you skip this step. You use your sensors and your programming language, and you're going to compose packets of JSON data that we call Notes. Again, in our case today it could be automatically created. These Notes are then queued on the Notecard, and then at a cadence you specify, they are securely synced with our cloud service Notehub. Now we don't want your data to live on Notehub; we want you to route that data to your cloud app of choice. So this could be the big clouds or you know, IoT platforms like Datacake. I wanted to show this off, because today we're going to focus on building a tracker without a host microcontroller.
I wanted to make it clear that if needed, you absolutely can include an MCU if your solution needs are more complicated. I did want to mention too, that communication with the Notecard is bidirectional. So you can start on your cloud app, you can send a JSON-based request with Notehub using the API we provide. Notehub securely delivers that JSON payload to a single Notecard or fleet of Notecards. The Notecard will then deliver it back to the host. So you can handle remote control scenarios or update fleet variables all remotely over cellular or Wi-Fi. In the case of a host-driven asset tracker, you could easily update configuration variables remotely while the asset trackers are already deployed in the field.
I kind of danced around asset tracking and all of these slides, so I did want to narrow our focus just a bit here and really get to the value of using the Notecard and Notecarrier when building an asset tracker. What you see in the image here is literally all you need to build a simple tracker. Granted, that LiPo battery you see is probably way bigger than you need. I'll let TJ explain some of the details here just to kind of recap where we're at. With the Notecard, you do get global cellular coverage, which includes 500 megabytes of cellular data and 10 years of service. Again, you can build a fully functional tracker, with or without a host MCU. As TJ is going to show you too, you can even add an external BME 280 sensor, and the Notecard will automatically pull in temperature, pressure, and humidity data, and this even works without a host. Again, critical for asset tracking solutions, the Notecard is low power by default, meaning the firmware defaults and the hardware. You can configure the Notecard to sample GPS location and relay data to the cloud as frequently or infrequently as you want. Most of you probably know GPS is a massive power hog, though, so be aware. Okay, with that high-level summary, it's probably a good time to see some of this in action. So I want to hand the controls over to TJ for his demo of building a tracker. So let me stop my share.
Speaker: TJ VanToll - Principal Developer Advocate - Blues Wireless 10:54
Yeah, we're going to have some fun. So let me bring up my screen. So we're talking about building an asset tracker today. We were thinking, as we were planning this out, what better way to show off an asset tracker than to actually build one and send one out? So my plan for today is to take this Notecarrier and Notecard that I've got set up here. So this is really exactly what you'd get from a development kit from Blues. I've got this set up with basically factory default settings, and I've reset everything so you can see how simple it is to build an asset tracker with the Notecard from scratch. Then if all goes well, I've got my car keys here, and I'm actually going to go take this out, so we can start to see some actual data coming through so you can actually see the full process. But first, we have to set this up; we have to configure this as an asset tracker. So you'll see I have my Notecard, I have my Notecarrier, I also have this plugged in through a micro USB cable. The other end of that cable is attached to my laptop that I'm using to join this webinar on. Once you have that connection made, the first thing you'll want to do is head to dev.blues.io, which is our development hub for all things Blues, and you'll want to head to the Notecard Playground. Now this section of the site will allow you to actually connect directly to a USB-connected Notecard and Notecarrier and send commands directly in your web browser.
So as an example, I could send a quick card.version request, again, a fully JSON API to my Notecard—the Notecard that's sitting on my desk—and get a response back in this case with some basic metadata. The browser is really the easiest way to get started just because it's quite literally as simple as plugging it in and sending some JSON to the Notecard. I do want to note though, that all of the requests that you’re going to see me sending through the browser is something you can also do through our CLI that’s available for Mac, for Windows and for Linux. As Rob mentioned, if you are using an MCU, or a single-board computer along with a Notecard, you can also send these requests through our SDKs that are available for Python, for Arduino, C, C++, and Go as well. So you have lots of different options. But today I'm focusing on simplicity—the simplest way to get started—and I think the browser dev.blues.io in our in-browser terminal is really the easy way to get up and running.
So I've got everything hooked up. To set this up as an asset tracker, there's actually only three requests that I need to send. The first of them is called hub.set. Now out of the box, your Notecards know how to speak with Notehub, which is again our sort of thin cloud backend here at Blues. So on Notehub, you'll need to create an account and create a project. So in this case, we've already set one up here for our webinar today, and you'll see that each project in Notehub has an identifier, what we call a product UID. So this right here, this identifier maps to what I provided here. Essentially by doing this, by providing this hub.set, you're essentially linking your physical Notecard with the cloud service so that you can easily send data that you collect on the Notecard up to Notehub where you can view it or send it to some service or do whatever it is you want to do with it.
Now there are some other arguments that I'm providing along with this, the first of which is a mode. So you can connect to the mode—it’s really like a cellular mode—how often the Notecard is communicating with a cellular network. The main two ways to do so are either periodic or continuous. For the purposes of an asset tracker you almost always want this to be a periodic connection, mostly because in asset tracking scenarios unless you have a sort of interesting use case, normally, battery power or whatever power you're using to drive this is kind of important. You don't want to use the battery unnecessarily. You want your tracker to last as long as possible. As you'll see as we go through some of these modes, the Notecard has several features built in to try to make that as easy for you as possible; we try to be really power conscious with everything we do.
So in this case, I'm saying only connect to cellular networks periodically. And these outbound and inbound control how often that connection should be made. So outbound is saying, if the Notecard has any data on it locally, connect every 60 minutes. So every one hour, if the Notecard has any data, it'll make a connection, it'll send that data up to Notehub. Inbound is in the opposite direction, if you remember Rob's diagrams from earlier. So if there are any settings or configurations in Notehub that need to be pushed down to the Notecard, this 720 means that every 12 hours, the Notecard will check for this. So when you're setting up your own asset trackers, you can tinker with these values, depending on what you need. But we find that outbound 60 and inbound 720 are pretty reasonable defaults, so that's what I'm going with for now. All right, I said three different commands: The first one was hub.set, and the second one is card.location.mode. This request is essentially your GPS configuration. It’s going to configure how often you're actually taking GPS readings. You'll see that there is a mode for this: periodic or continuous. Again, you're probably always going to want to set this to periodic. GPS is especially power hungry to get a signal, a GPS signal, and such. So usually, you want to do that periodically. Almost always, you want to do that periodically, and how often is controlled by the seconds arguments. So in this case, seconds of 3,600 says essentially take a GPS reading every hour. So I'm going to set this up as a default for now. I said three commands, so I'm going to grab the third one, which is card.location.track.
Speaker: Rob Lauer 16:48
Sorry to interrupt you, TJ, one of the things I would add to that second command is that the GPS is only going to enable itself if it detects movement. So there's an onboard accelerometer, as well. So just as another—
Speaker: TJ VanToll 17:01
I was getting to that, Rob. You ruined the whole flow because I was going to say…[laughs]
You’re fine. The built-in accelerometer is nice. It's another battery feature, because again, you don't want to engage that GPS unless you really need to. There is though in this third command, a heartbeat flag. So if my Notecard is just sitting here for hours and hours at a time, if it doesn't phone home, you might want to actually check in periodically, and that's what this heartbeat flag is for. So essentially, this controls how often that happens. So even if the Notecard hasn't moved, it hasn't gone anywhere, every 12 hours, it’ll still take a reading, it’ll still send that up so you can make sure everything's working correctly. Maybe you want to check battery levels and whatnot. Again, this is something you can configure based on what you're doing. This start flag is what actually starts the tracking. So actually, after running this command, I've already got a fully functional asset tracker. If you were building this around like an MCU, or a single-board computer, you might want to play with this start argument, there's a stop argument as well. You might want to have some logic that says start tracking under these situations and stop under these; maybe there are only certain areas you care about or certain situations. So that’s something that you might want to tinker with. But for most standalone trackers like what I’m building here, you’ll usually want to keep things simple and just get things started.
Actually, that's it. At this point, this tracker that I've got sitting here is ready to go: I basically can just plug a battery into this, I can walk out the door and I will start taking readings according to the variables that I set here. If you look in Notehub, if I go into this project, you'll see that my device is now going to be registered, you see it checked in here just a minute ago. If I go to my events—events is where I'm going to see the data coming from my device as it comes in. So right now, I'm just seeing some basic metadata from when this device initialized. What I'll see over time are these track.qo events—these are the events that are actually going to show if I go into the JSON here—if I go into the JSON, I'll actually start to see the latitude and longitudes that are reported from GPS readings. Rob and Simon are going to be taking that and doing some interesting stuff with it later. But I don't have any of those track.qo events coming in yet for this device that's sitting on my desk, because I set these values to more production-ready values, like taking a reading every hour, talking to a cell network every hour, which is probably what I might want, if I'm getting ready to actually send this hardware out into the field. But for demo purposes, or for your own internal purposes, as you first get your hardware and you want to test it out and see it working, you’ll want to crank these down to lower numbers just to see everything working. I definitely want to do that for a demo. So what I'm going to do is I'm going to run through these commands one more time with some more demo-friendly values. Instead of doing it in the browser, I want to show you another way that you can sort of initialize your Notecards with a set of tracking commands. I'm going to disconnect from my browser, and I'm going to bring over Visual Studio code where I've got the Notecard CLI up and ready to go. So I've got a Mac—this is the Mac version of the Notecard CLI. You can also do this on Windows or Linux as well. One cool thing that Notecard CLI allows you to do is there is this setup flag that lets you point at a file that you can put a bunch of different Notecard requests that you want to run in sequence. So in this case, a lot of these commands are going to look really similar to what I just ran. But I'll quickly point out what differences are there.
So first of all, I'm going to start with a card.restore. This is essentially a reset for the Notecards. So if you want to erase any settings, any caches, or whatever, that were on the Notecard before, it's a great way at the start of the script to sort of clear those and make sure you're truly working from a blank slate. I've got my hub.set command—this is the same thing I ran in the browser other than I cranked the outbound way down to every five minutes because I want to be seeing data frequently and have things actually show up on a map; card.location.mode, same thing again, other than I cranked the seconds way down. So we're going to be taking a GPS reading every 30 seconds, assuming I can find some good signal as I’m out driving. Then card.aux, this is leveraging the fact that the Notecard has a built in way of reading from auxiliary, which is a hard word to say, devices that you can attach to a Notecarrier. This specific one is essentially configuring this Notecarrier to work with and if you look at my camera for a second BME 280 connector, I've got it connected to this other Notecarrier, I've got sitting here through this JST, through a quick cable onto the Notecarrier that I'll be using. I'll show where this is in the docs. But what's cool is this is also going to allow me to get temperature, humidity, and air pressure readings as I'm getting location data as well. The rest of this should look familiar, this card.location.track is exactly the same as we had before, to start up the tracking, and then I'm going to sync everything to Notehub. So I'm going to go ahead and run that. While it runs, I just want to point out where you can find this information on the documentation. So if you're going through this later, you have some hardware and want to set everything up, you want to head to the guides and tutorials section on dev.blues.io and find our guide to asset tracking. So this is a really thorough guide and tutorial that goes through exactly what I showed today. If you look here, you'll see a lot of where I got my demo from for how to use this setup command, and what these different requests that you can send to the Notecard actually do. There's some additional information if you want to work with a host control to track or you want to set up some sort of MCU single-board computer to actually talk to the Notecard, you can follow this documentation to do that. I also wanted to show just very briefly the reference documentation. So if you wanted to learn more about the different requests that I was sending, like card.aux or these cards.location requests are all in here as well. The reference docs are a great way to see how the APIs work. All right, so my config worked, you can see it just runs through these commands in sequence. So at this point, I've got this Notecarrier ready to go. I've got a second one here that I pre-configured as well. So this is the same essential thing: I've got a battery hooked up to this, and I've got the BME 280 ready to go. So Rob, if that all looks good, I am actually going to hit the road. Assuming that goes well, that Notehub project that I just showed—so we saw the events, but we didn't see any tracking events—if the demo gods are with me today, we'll start to see those fill up with some actual location data that we can look at. I think we're done, and I think we're going to turn it over to Simon so we can get started on some dashboarding stuff.
Speaker: Rob Lauer 23:59
Yeah. All right, Simon, you're good.
Speaker: Simon Kemper - Co-founder and CEO of Datacake
Yeah. Okay. I just wanted to ask if I'm already on the screen, because I couldn't see if that already has happened. So let me first of all share my screen. Yeah, that should work now. So yes, thank you very much everyone, for being here and for giving me the chance to participate in the webinar. That was a great idea. And thanks, everybody, for joining. First of all, TJ, I'm not sure if you already left, but maybe if you're there, just make sure we have the route set up. Rob, you have access to his project that we can get there. Great. Just checking. I think that most of you who are here on the webinar might know Datacake and what we are doing, but I would like to give you a short introduction. So Blues Wireless is the hardware side and also the middleware side that makes sure that your hardware is connected to the cloud and that you can use it. And then you need an end application to use this data to present it to your customers, and this is basically what an IoT platform does. It collects data, it stores the data from devices on databases and allows people to access the data. You can show things to customers, and Datacake does that in a really easy way, in the low code, or no code way. We're super focused on making IoT, as you can see here, accessible to everyone. We have various integrations for LoRaWAN, but also for industrial IoT solutions. Yeah, check out our website to see—today it's all about asset tracking. Asset tracking works great with cellular devices such as Blues Wireless, so I would like to start now. Let's connect TJ’s Notecard directly to Datacake, and we are going to start from scratch. We have set up a project already for this webinar, and you can see here there are two devices in there.
These are backup ones that we set up a few days ago, so they recorded some kind of data. The first thing that you need to do on Datacake is you need to sign up. So let me look now for more, Datacake, that's the live thing; I signed off a couple of times, but that didn't happen now because we're live here on the webinar. So Datacake is cloud based. It's a cloud-based solution that runs on servers and you need to sign up with your email address, and signup is free. After you have signed up, simply log in, which brings you to a workspace. A workspace is where you hold all your devices and where you can do stuff like creating dashboards and so on. We have set up this workspace already for the webinar. What we're now going to do is we're showing you how easy it is to create a new device and bring that Notecard to Datacake.
So as you can see here, there's a button which means add device which says add device, and if we click on that, that will bring up the module where you can select the various device types. And because we're adding a generic device to Datacake, we're selecting API. One of the things that we do for our customers is that we try to make adding new devices as easy as possible, so we came up with the idea of providing templates. So once you create a new device, there are some templates available in here, and under the API section, there's also new product from template. When you click on that, you can see that we do have a template for Blues Wireless Notecards. This one is actually a template that works with the Blues Wireless asset tracker mode that TJ’s Notecard currently is running on.
We're going to select that, and then once you select the template, you are ready to go to the next step. In the next step, we are asked for a serial number. In this case, we would need the serial number from the Notecard from TJ. TJ was so friendly and sent me the serial number before, so I can just paste it in here. That's the serial number from TJ’s device that we just saw. We're using this serial number because we need to make sure that the data that is sent to Datacake from the Notehub needs to be routed onto a particular device, and that's why we need this serial number. So I just have to give it a name like TJ’s Notecard 2. Because there is already one in here, we press on next. And last but not least, you're required to select the plan. For every new customer that we have on Datacake, we support three devices. So we can start right away, you can just register, try it out with different kinds of devices, and then select the free plan for example, and we allow adding up to two free devices to Datacake. Then you press on add one device, and this will bring this TJ Notecard 2, what we just created here into Datacake.
Let's open this up. As you can see here, it already comes with a dashboard. So that means that the templates we have are bringing you a dashboard already.
This dashboard is user definable, so that means you can just change the settings or add additional widgets. But this is making sure that once you get started with Datacake and the Notecard, that brings all the necessary things in here. So the next thing that we need to do, we need to hook up the Notehub—which you just saw on the video before—to Datacake, and we're doing this by providing a link that we, or Rob, will enter on the Notehub. So we go into the configuration on the device we just created. When we scroll down, you can see various things here, like configuration. You can change the name and also provide a location description. If we scroll down a little bit, we come to the HTTP payload decoder section. This also is completely prefilled. That means that this piece of code here is executed every time there's a new message. So we decode the data coming from the Notehub—you can ignore this at first. The most important thing here is this endpoint URL. So this is a URL that we've created on our backend, especially for the product and device we just created. So this means that this is the URL we need, and this needs to be entered on the Notehub. So I'm going to copy this now, and then there's the question of how to send this to route. But I think if I stop sharing my screen, open up the chat in here, paste it, I hope Rob you see it.
Speaker: Rob Lauer
You're right, we see it.
Speaker: Simon Kemper 31:09
Now we can switch to Rob maybe, so Rob can show you what you need to do with that URL on the Notehub.
Speaker: Rob Lauer
Absolutely. So I’m actually going to do this opposite. I’m going to set up the route just so we start getting TJ’s data through the Datacake as soon as possible. It's not copying from Zoom here. Let's try this again.
Speaker: Simon Kemper
I could just read it.
Speaker: Rob Lauer
We're good now. I did want to talk about routes really briefly before I show you them in practice. So TJ is obviously out in the field, gathering data with his tracker—we've got that dedicated project set up. So the last thing we need to do is to link that Notecard to Datacake through Notehub. This is accomplished, of course, with routes in Notehub. So a route allows you to sync data in near real time with any cloud provider, like Datacake. Recall, everything about Notehub is secure, meaning that the cellular data TJ is transmitting is actually sent off the public internet and can be encrypted as well. And Notehub also allows you to optionally transform your data on the fly with something called JSONata. Actually, I'm going to talk about this. It's a cool capability of Notehub, but it's actually one advantage of Datacake. If you saw that HTTP payload decoder section that Simon showed off, you can do all the transforms there, but I still want to show an example of what this is like in Notehub. So again, while Datacake can do all of these trends for you, I at least wanted to touch on JSONata here. I found it to be a very powerful tool that not many people are aware of. At a high level, it is a declarative language for transforming JSON data. That basically means you can take big giant chunks of JSON, and you can apply some JSONata magic. And then you end up with a new set of JSON that is trimmed down and optimized, maybe even had some calculations run on individual data segments. So here's an example of JSONata transform that you might use in Notehub. I like this example because it shows off a few different capabilities. So you can perform a simple calculation. Like in this case, we're taking a timestamp of when the data was gathered on the Notecard.
So when—that word “when” comes from, it's a data element in the event in Notehub—and then just multiplying by 1000. This next one is great because it provides the ability to conditionally include data. In this specific example, we're asking if the location data came from the GPS module on the Notecard. If so, use it because that's very accurate. If not, if GPS was not available, then the fallback is the cell tower location where the data was sent. So this provides a really great backup location, for instance, and I think Simon actually includes this in the template on Datacake. Here's an example of just retrieving a data element within the original JSON data object. At the end here, another simple calculation allows you to see the difference or the time difference between when the data was gathered on the Notecard versus when it was synced with the cloud. There's also a great JSONata playground available that lets you take some raw JSON data, you can test out your JSONata transform and then see the results for yourself. This is all available at try.jsonata.org. So I want to show you how to actually route data from Notehub to Datacake. So let me share my browser now.
So again, TJ is on the road. Let's see what we've got here. So we do see TJ’s latest device: 10:34. That was three, two and a half minutes ago. So he is getting some data. Let's browse in here and look at specific events that have happened recently. So we do provide a way to actually see the raw data that's coming through on Notehub. But to be honest, this is not where we want you to spend your time. I've repeated this a couple of times: We want you to take this data and send it somewhere else, which is where the routes come into play. So we do provide the capability of creating any number of different types of routes. If you're using a big cloud, or using like MQTT something like that, all those capabilities are baked in here. For Datacake, it really couldn't be any simpler. You're just going to create a general HTTP/HTTPS request response route. This is a webhook. This is a RESTful endpoint, anything like that. At the beginning of my segment, when Simon was done, I did create a new route. Literally, all I did was I named it and I pasted it in that endpoint URL that Simon provided—everything else here is boilerplate defaults. Now, if I needed to apply some authentication headers, for instance, I could add those here. If I wanted to rate limit—if I didn't want to blast my endpoint with too many requests in too short of time—I could do that. You can manage which devices actually send route data through fleets. So if your fleets of devices are set up through Notehub, you can specify which fleets have data routed, and you can also specify which Note files. So these are—remember I talked about how when you queue data up on a Notecard, it's stored in Notes—well, these Notes are in Note files.
In our case, everything's in a track.qo Note file. So if I only wanted to specify certain data to be sent on to the cloud, I can do that here. And finally, there's an opportunity to add different transform options as well at the bottom. This is where the JSONata comes into play. But again, with Datacake, this is all thrown aside because it couldn't be much simpler than just pasting in a URL. So that is the end of my segment; we're going to take a little bit of an interlude and head over to Paige now. We’ll let TJ keep accumulating some data and then come back to TJ in five to ten minutes. All right, Paige. Go ahead.
Speaker: Paige Niedringhaus - Staff Software Engineer - Blues Wireless 37:37
Thanks, Rob. So as everyone knows, I haven't said much up until now, but I am one of the hosts of this webinar. The reason that I am is because I had a Blues Notecard that was functioning as an asset tracker, and it became the star of a carjacking the day after Thanksgiving when I was visiting my parents. To give you a little bit of background, I am actually a web developer first and foremost, not an IoT engineer, not a firmware person—I build websites. I helped build the dev.blues.io website, I helped build blues.io, and various things like that. So what I was actually doing was using a Notecard to gather location data and see how easy it was to take that data from Notehub and display it in my own custom-built dashboard. I was building a dashboard using React, some charts, some maps, and things like that, just to see how simple it could be. So while I was visiting my folks, I actually put a tracker in their car and we drove around for the holidays to see friends and family, go out to Thanksgiving dinner with my aunt and uncle, things like that.
So the day after Thanksgiving, while my parents and I were having dinner together at their house, their car was actually stolen out of their driveway, and the tracker still happened to be in the backseat. This car is not equipped with LoJack, it is not equipped with OnStar—none of that. So as it was stolen, there was no way of knowing where it was going or where it would end up. It just didn't have that capability. So we called the police and they came over, and they actually came over really quickly. So, as I remembered that this was in the backseat, I pulled up my locally developed dashboard on my computer, and I was able to show them on the dashboard map where the thieves were as they were heading away from our house at high speed. So here's interesting point number one that happened while this was going down. When the car was first stolen, the Notecard was reporting its location every 10 minutes, but as Rob mentioned, you can actually remotely configure Notecards via Notehub to update their environment variables. So probably 15 minutes after this happened, one of my co-workers was able to hop on Slack with me, and we actually updated my environment variables on the Notecard via Notehub so that it would take location readings every 60 seconds. So we could have a better idea of where this car was in space and how fast it was moving away from us. So that was interesting point number one. Another thing that I would like to say is that the custom dashboard I was building was actually using the Notehub API instead of Notehub Routes to pull data out of Notehub. So if for some reason, you want more historical data that maybe hasn't been routed to a third party database, or something like a low-code platform like Datacake, you can actually use an API-based system with an auth token and pull events out of Notehub, which is what I was doing. So there's a couple of different ways depending on what your needs are to actually access that data out of Notehub. So back to what was happening in real time, about two hours after the car was stolen, we continued to watch it on my dashboard and through the Notehub events. The tracker was actually found in the backseat, and it was tossed out a window into a park. I doubt that the thieves actually knew what it was, but I'm sure that the blinking green LED light on top didn't give them a good feeling about what it was doing. But it survived being tossed out of the car. It survived living in the park in sub-freezing temperatures. The police actually recovered it two days later, because I was able to tell them exactly where it was, because it kept sending me heartbeat notifications with its current GPS location. So they returned it to my parents—by that time I had gone back to my house. So my parents shipped it back to me, and I could follow the Notecard’s tracking through USPS all the way down to when it reached my house.
In the end, the car was found about a month later in an impound lot. It had bullet holes in the roof, a ruined interior, and the heavy smell of marijuana throughout. So it was totaled as you may imagine. It wasn’t the happy ending that we were hoping for, but it made for a great real-world use case. And one more thing that I would like to point out is that while the police were still trying to find the car within the first few days after it was stolen, they knew that I had this dashboard, they knew that I had Notecard data. And they asked if I could provide them with a spreadsheet of some of the Notecard’s location readings so they had a timestamp and GPS coordinates. I was able to pull that directly out of the Notehub dashboard, just filter down to the events that I wanted between the timeframe that I needed, and then export that as a CSV that I was able to send to them. They were going to use that location data and those timestamps to actually cross reference traffic cams to see if they could see the car as it was travelling around joy riding. So it was certainly not a great occasion by any means, but I learned some really cool things about what the Notecard and Notehub are capable of, and it made for a great story in the end. So you know, talk about turning lemons into pretty good lemonade, I'd say.
Speaker: Rob Lauer
Everybody needs to set up a tracker in their car.
That's great. Thank you, Paige. Yeah, sorry, your parents had to sacrifice a car for a good story for us.
Speaker: Paige Niedringhaus
I know. At least they did have something that came out of this that was fairly positive, though.
Speaker: Rob Lauer
And it's a good point too—we talked about this internally, as well as of course—you can set up a tracker to run off of USB power as well. So you can have it perpetually running in a car, for instance, instead of worrying about battery life. Simon, do you want to show off the dashboard? Dare I say we have enough data from TJ?
Speaker: Simon Kemper 44:32
Yes, sure. Give me one second. Yep. So I'm now just sharing our browser window. I hope this works. I haven't been checking it, but I think we received a lot of data already. So this is where we stopped when we were presenting the Datacake solution. Just to recap what we did, we were using this link, which we just created, sent this over to Rob, and Rob was placing it into the Notehub for TJ’s card. On here you can see there's this button, which says show logs. If we click on that, we can see all the incoming events, over that link, over that URL. As we can see here, it was changing already. There is some data, and this looks completely like Blues Wireless information from the Notehub. Yes, I think this is exactly what the Notecard from TJ is sending us. So that means we would now be able to see some data. So let's scroll up, go back to the dashboard in here. Yes, we can see some data: actually 17 degrees Celsius, 4.14 volts, that means it's almost fully charged, and good cellular signal—two cellular bars—and also we can see the position in here. So if I scroll out, zoom out, sorry, a little bit, we can see that TJ is somewhere over here. I think this is TJ’s hometown. So this seems to be TJ. I'm not sure if you know that he is living there. And we can also switch now, as we can see, this is just like sending information over the current position, what we can do here is we can go into edit mode for dashboards and we can press on this edit icon. Then we are going to edit the actual widget, and in here we can select the timeframe. I can select this timeframe to hour and also I could send this back to one minute, which means that it now shows us high-frequency data and the route that TJ is currently doing, walking or driving, and we can press on save to save these. This is now in the widget here. We can also scroll back and forth in time to see okay; this was the route that TJ was doing. For all the guests in here, what we can do now is we can make this public. That means we have a function, when you click on the edit mode here in Datacake, there's this lighter blue button called public link, if you click on that, this will open up a module where we need to click a couple of times once more. And then it creates a QR code which we could download, print on a device, and send to a customer, or if somebody wants to do it right now they can just scan this QR code. I'm also going to share this link into the public chat, which means that everybody can access it now, and then also see the dashboard. We save the public link. Also checking there is a mobile version of this dashboard as well. Yes, it shows data. We can just see what TJ is actually doing and where he's going. And this is how we create an integration. I think the longest part is on the Notehub where you create all the configuration files. It takes about one minute or two minutes, and then it connects, and then you sent the link or set up the link on the routes on the Notehub. And then the data is already there. And thanks to the preset, we make it super easy to start with IoT projects.
Speaker: Simon Kemper
But as Rob and TJ also mentioned, they are sending extra data like humidity through these additional sensors. When we go back to the decoding in here, we can see also that at some point—there is data in here somewhere—that was humidity and stuff like that. So what we could do is we could change—but this extends, I think, the time of the webinar—to go down there and how to program this. But what you could do, you can simply change the decoder in here and also decode the data, additional data that is coming from your Notecard. Basically, for asset tracking, we already set up a solution.
In this case, Paige, thanks for your story. I think that in this case, we could also track the device directly on Datacake with that solution. And or you could self program it, but basically, we are storing the data and we can go back in time and we can also export data. So it would also be possible to share this live dashboard of your car directly with the police, which would be also cool somehow. So from the Datacake perspective, that's it. That's how you create, or integrate, Notecards directly into Datacake.
And the next steps would be that people or customers could create shared dashboards. We also created this small demo dashboard here before the webinar, where we set up all the devices that are in the workspace. There are two backup Notecards in here, and they show the position of the Notecard. So you could create like global overview dashboards, which you can share with your customers to monitor a fleet. And if you click on one of those, you can see on the sidebar dashboard, the data from individual Notecards.
Speaker: Rob Lauer
I think this is really powerful, because a lot of the demos that we do in these scenarios just show off a single device. But many of you, when you’re building out a solution, you’re going to have ten, a hundred, a thousand devices. To see all that data in one dashboard is really powerful.
Speaker: Simon Kemper
Yeah, thanks. Let me see if I can access it, because I absolutely want to share this with you. This is where the use cases begin to make sense. We accessed—thanks to your integration—we were able to pull a lot of your AirNotes directly on Datacake. AirNotes just to mention, these are small, I can access one and you can see it. They also have tracking capabilities, but they are atmospheric devices. There's no picture, but it's like an air quality monitor from Blues Wireless. What we've done is to show—oh this is actually the device. This is how it's looking. What we've done is we created a dashboard; I hope this was the correct one that shows all of the Notecards on a single map. Of course it's not loading, because it's a live webinar—might be because of the internet connectivity. I don't know, let's give it some time. There it is. As you can see, this would be a use case if you have a lot of different devices on the Datacake platform and a lot of asset tracking devices, for example, but also static devices. What we can do here is—these are the various Notecard positions. When you click on one, you can see the actual data. We're going to work on updates on new features for this map where you can blend in the measurement values directly on the map. So the next stages would be heat maps and stuff like that. But it's pretty cool to really see this fleet view and then select the individual devices and then see what's going on with my devices and the scroll back. But that's where it makes the most sense. I agree.
Speaker: Rob Lauer
Cool. Thank you, Simon. TJ, are you on the call, still? There he is.
Speaker: TJ VanToll
I am here, Rob. I don't know how well you see my background. My audio is probably awful, too, because it's windy here. I wanted to go to the one scenic place I could around here: the Michigan State Capitol. Being from Lansing… yeah. Awesome. Hopefully my audio isn't too crappy, but good stuff.
Speaker: Rob Lauer 53:00
Excellent. So I just have a couple of things to share. I know we're running up on time here. There's Paige again. I was going to mention that a colleague of ours is on a road trip in the Southern US. He put together another great Datacake dashboard to track his location along with some other sensor data. He’s actually using some new hardware we’re testing out. I don’t have much more to say about it at this moment, but this should improve our asset tracking story even more than what you saw today. I also want to mention that one resource that all four of us contribute to quite a bit is Hackster. So we all have some pretty extensive tutorials we’ve published, including machine learning use cases, asset tracking, of course, and remote monitoring. You can see all the scenarios you can address with wireless IoT here, and you can check out all of our projects at hackster.io/Blueswireless. With that, I want to thank you all quickly for attending.
Before we jump into the Q&A, there's a few resources I want to share. One is to visit dev.blues.io for all those technical resources that TJ showed off. Also, just for being here, we welcome you to take 10% off a Blues Wireless starter kit or other Notecard and Notecarrier combo at bitly/blues-datacake. Finally, there's a brand new guide on Datacake for using the Notecard; you can see the link there, and I'll include that in the email as well. With that, I think we can go through some of our questions. I know we only have a couple minutes. A bunch of questions. Let me see here.
A question came in early on: Is it possible to connect LoRa sensors to the Notecard? The answer is yes. If you're embedding the Notecard in an existing solution, if the host microcontroller can speak to a LoRa sensor, that data can be sent to the Notecard. I did want to mention too, that when people talk about LoRa, we actually have a new LoRa-based product coming out. Probably later this spring or early summer called Sparrow. You'll be able to find more information about it at Blues.io as time goes on.
Let's see, a question came in about setting location boundaries to get alerted when an asset is outside of boundaries. Yeah, we do provide geofencing capabilities in the Notecard API, so you can set up a geofence meaning from certain lat/long coordinates, if you get to be like 30 meters outside of those coordinates, to immediately send a note to Notehub. So you can have an alerting system set up that way. That’s all available in the API.
Is the coverage for Notecard global? Yes, there are four different Notecard models. One is the NBGL, which is our global. It's a narrowband global Notecard that works over LTE-M and NB-IoT protocols. There's also some wideband Notecards that work on Cat-M, and those are specific to North America or AMEA. There's also a narrowband North America one. We've got pretty good coverage, globally notable omissions to that global coverage are India and China, just because our wireless partner does not offer service there. However, on almost all of our Notecarriers, there's an opportunity to add an external SIM card and you can use those if you need to in unsupported countries.
Speaker: Rob Lauer
If anybody else saw a good question, feel free to chime in. There was a question. Oh, Simon, somebody is asking if the widget can be shared by secured link only and not public.
Speaker: Simon Kemper
Yes, I was already answering it by text. Basically, what we do have is that if you enable sharing of the dashboard, you cannot share just the widget itself, but you can always share a dashboard, and you can just place one widget on the dashboard. That would be like sharing just the widget. What you can do is you can put passwords on the shared link, but once you stop sharing the link, users need to log in. There's just public sharing links with password protection, optional password protection, or you disable sharing of links, and then the user needs to log in. These are the two options that we have.
Speaker: Rob Lauer
Perfect. Another good question came in about working on projects in rural areas where connection can be really bad. That's a very, very valid question. There are a couple of different answers to that—we do offer a Wi-Fi Notecard. If you have a statically placed Notecard, you could use Wi-Fi as well. Some of our Notecards also include the option to add a diversity antenna. Aside from using the regular antenna, you can add a separate antenna and get, I don't want to say double the connection, but much better connection capabilities with those as well. We've seen that as well ourselves. I mean, when you get outside the range of big cities, sometimes the connection gets a little bit worse, but with those diversity antennas you can really take advantage of—
Speaker: TJ VanToll
The quality might be crap, but I have one hooked up here, the middle one here, because I found it actually helped with my signal when testing this as well.
Speaker: Rob Lauer
Let's see, I know we're running out of time here. I'm just scanning, questions asked about customers in the Middle East region. Yes, absolutely. So our NBGL model is supported in the Middle East as well. So you can definitely use a Notecard there.
Speaker: Simon Kemper
I think I also can answer another question. There is someone asking about whether further calculations like distances and so are done on Blues Wireless platform on the Notehub or on Datacake. Maybe I could share my screen just very quickly. That is possible. Yes, there it is. We do have some features for doing that. That means that you could do it on Datacake, and the decoder we were just showing—it's not just transforming data it is also doing some basic calculations. What we do in here, this is actually a public transport API, which we are accessing. They have some kind of devices, I think there's a unit, maybe there’s also a Notecard. What we're doing here is we're having a function, this is called calculate distance, so that you can just always calculate the distance between two points. We're using that in this map, and here you can see this is also asset tracking for a lot of different devices. If we would access one of those devices… no, the window is just holding it back here, but as you can see here, there's a window over it, I can't. Ahh, here it is. Yes, you can see here we are tracking down the distance, and we're just receiving latitude/longitude. We're using Datacake to convert it to distance covered. If there's more accuracy, so more points per minute, or per hour, of course it has higher accuracy. So just very quickly on that.
Speaker: Rob Lauer
Cool. There's one other question that came in: When you're abroad, do you need to pay for data? No, the data, the prepaid data and service is global, so you don't have to worry about any additional payments when you take your Notecard around the world. With that, I again want to thank everyone for attending, and there will be a recording of this coming up shortly. Thanks to the panelists, and thank you all for attending.
Monitoring Legacy Analog Systems with TinyML, Edge Impulse, and Blues Wireless
Using Machine Learning and modern IoT, we can modernize by tracking and reporting on existing systems in previously unheard of ways.
Rapidly Prototyping Environmental Monitoring IoT Devices
We dive into challenges and solutions for adding wireless connectivity. Between cellular, LoRaWAN, and Wi-Fi there are a myriad options and potential pitfalls. Walk away with real advice for building your next IoT device thanks to the experiences of Clean Earth Rovers and LimnoTech!
How to Create IoT Asset Tracking Applications with Drag-and-Drop Tooling
Datacake and Blues Wireless team members showcase an end-to-end technical demonstration of actively tracking assets with GPS and cellular, securely delivering tracking data to the cloud, and building a robust cloud-based reporting application.
Getting Started with Blues Wireless and the Notecard
Join us to learn the basics of Blues Wireless and the Notecard!
Lightning Fast – From IoT Concept to Pilot With Additive Manufacturing
In this webinar, we discuss innovative ideas that reduce time and risk in hardware product development. We’ll explain how you can get your IoT product to pilot phase much faster and cheaper than your competitors.
From Device to Cloud Dashboard with Cellular IoT
You can build an IoT device with advanced features and capabilities in less than a day with Blues Wireless and Ubidots.