IoT Edge Developer Webcast
Tired of the endless IoT Edge marketing and want to get your hands dirty?
Join Akash Sharma each week as he fires up the editor and starts cutting code for everyone to see, use, and learn from.
Join Akash Sharma each week as he fires up the editor and starts cutting code for everyone to see, use, and learn from.
This session will cover using the cb-cli and its local editing commands.
Date posted: November 13th, 2020
YouTube Link: Click here to see the recording
In this session, we modify our getTemperature microservice to retrieve temperature data from the National Weather Service endpoint periodically using a timer. We then save the temperature we receive from the endpoint in a Shared Cache and treat it as an Ambient Temperature.
We modify our logTemperaturesMqtt stream service to read the Ambient Temperature from the Shared Cache, subtract it from the received device temperature, and save the difference in our collection.
Completed Session 9 system or have the zip system file accessible.
Date posted: October 9th, 2020
YouTube Link: Click here to see the recording.
In this session, we will learn how to send messages between MQTT clients connected to one of the different MQTT brokers within one ClearBlade system. There is one MQTT broker in the platform and one broker per edge.
We will modify our Python adapter to subscribe to a “Platform to Edge” topic based on which it returns smooth or raw temperature data. We will also have the adapter publish an acknowledgment of an “Edge to Platform” topic.
We will add a Toggle widget to our portal to allow us to select between smooth and raw data. Then, we will add a Text widget to display the acknowledgment message.
Completed Session 8 system or have the .zip system file accessible.
Date posted: September 18th, 2020
YouTube Link: Click here to see the recording.
In this session, we will tackle two main tasks that are unified in that they involve handling promises:
A. Create a version of the logTemperatures stream service that uses the new MQTT library.
B. Add a Toggle widget to our portal that will allow us to select between “C” (Celsius) and “F” (Fahrenheit). Our choice will dictate the unit where the Speedometer widget (part of our portal since Session 1) displays the temperature. Recall that this temperature is retrieved by the getTemperature microservice we created in Session 1. This code service retrieves an array of time/temperature forecast data from an HTTP endpoint maintained by the National Weather Service. Therefore, this task will involve modifying the getTemperature microservice.
Completed Session 7 system or have the .zip system file accessible.
Checking out the Python Adapter Library
Date posted: September 11th, 2020
YouTube Link: Click here to see the recording.
In this session, we will address the situation in which different devices may send temperature data in different units (Fahrenheit/ Celsius).
We will add a custom string column to our Devices table called temperature_unit, which will hold F (Fahrenheit) or C (Celsius). We will create a Library with a function that converts Fahrenheit to Celsius. We will also create a configuration with an upper-temperature limit to log only temperatures above that limit. Then, we will modify the stream service to save only Celsius temperatures above the threshold.
Completed Session 6 system or have the .zip system file accessible.
Date posted: September 4th, 2020
YouTube Link: Click here to see the recording.
In this session, we modified our system to capture and display data from two devices. We will have two copies of our temperature adapter running on one edge. One will authenticate as device-1 and the other as device-2. The time and temperature data will be stored in a single collection on the edge synced to the platform. The data is displayed in a new line chart widget showing one plot for device-1 and a second plot for device-2.
Completed Session 5 system or have the .zip system file accessible.
Date posted: August 28th, 2020
YouTube Link: Click here to see the recording.
In this session, we will install the ClearBlade Edge on a Gateway (it can be your personal computer). We will modify the Python code in Session 4 to function as an adapter. The adapter will publish messages to the MQTT broker running at the edge. The temperature data will then be stored in a collection on the edge. We will sync relevant assets between the platform and edge by deploying such that our portal will still show incoming data.
Completed Session 4 system or have the .zip system file accessible.
Windows users will need either:
1. A Linux machine / VM you can SSH into (something like a RaspberryPi) OR
2. A Windows Store Linux app running on top of the Windows Subsystem for Linux (WSL).
If using (1) above you will need to install PuTTY
If using (2) above, the most up-to-date instructions on this are here (one modification – rather than the main Ubuntu app, install the “Ubuntu 18.04 LTS” app
Note regarding Ubuntu 18.04:
Ubuntu 18.04 LTS comes preinstalled with Python3.6.9 but not pip3. Follow the “Installing pip for Python 3” instructions here.
Note on installing the clearblade PyPi module:
Install using “pip3 install clearblade”.
Date posted: August 20th, 2020
YouTube Link: Click here to see the recording.
Windows Version
In this session, we will connect a Python program to our temperatureMonitor system as an external MQTT client. This MQTT client will have the following characteristics:
It will authenticate as a device.
It will subscribe to one topic on which a request can be sent.
It will be published on one topic. The data published will be raw or smoothed (averaged) temperature data depending on what request was received.
The temperature data will be displayed in the existing Scatter Plot widget.
Date posted: August 13th, 2020
YouTube Link: Click here to see the recording.
We will publish and subscribe to message topics in this session using MQTT.
The process will include creating a stream service, which will:
(a) subscribe to a topic to get temperature data and
(b) write that data to the existing collection.
Date posted: August 5th, 2020
YouTube Link: Click here to see the recording.
In this session, we will use our simple system from the last session to capture temperature data from an HTTP endpoint and display it in a scatter plot. We will use an array of temperatures from a forecast period from the National Weather Service. The data we capture will then be written into a collection and sorted by timestamp.
The system will include a portal with a Speedometer widget showing temperature data from a microservice we build. The temperature data will be from a National Weather Service API endpoint.
Date posted: July 30th, 2020
YouTube Link: Click here to see the recording.
We will be creating a generic temperature monitoring system. The system will include a portal with a Speedometer widget showing temperature data from a microservice we build. The temperature data will be from a National Weather Service API endpoint.
Date posted: July 23rd, 2020
YouTube Link: Click here to see the recording.