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.
In this session we will be discussing the use of the cb-cli and their 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, then subtract it from the received device temperature and save the difference in our collection.
Completed Session 9 system or have the .zip file of the system accessible.
Get Temperature API
Temperature Stream Service
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 that are 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 acknowledgement to 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 acknowledgement message.
Completed Session 8 system or have the .zip file of the system accessible.
Toggle Widget Event Parser Data
Temperature Adapter
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 by the fact that they both 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” (Farenheit). Our choice will dictate the unit in which the Speedometer widget (which has been 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 file of the system accessible.
Checking out the Python Adapter Library
Get Temperature API
Temperature Conversion Function
Temperature Stream Service
Python Temperature Adapter
Speedometer Widget Data Parser
Speedometer Widget Event Parser
Date posted: September 11th, 2020
YouTube Link: Click here to see the recording
In this session we will address the situation where 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 such that only temperatures above that limit will be logged.
Then we will modify the stream service to save only Celsius temperatures above the threshold.
Completed Session 6 system or have the .zip file of the system accessible.
Configuration File
Temperature Conversion Function
Temperature Stream Service
Python Temperature Adapter
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 for both will be stored in a single collection on the edge that is synced up to the platform. The data is displayed in a new line chart widget showing one plot for device-1 data and a second plot for device-2 data.
Completed Session 5 system or have the .zip file of the system accessible.
Line Chart Data Parser
Plot Data Internal Resource
Temperature Stream Service
Python Temperature Adapter
Date posted: August 28th, 2020
YouTube Link: Click here to see the recording
In this session, we will be installing the ClearBlade Edge on a Gateway (it can be your personal computer in this case). We will be modifying the Python code written 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 the edge by using a deployment such that our portal will still show incoming data.
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 have a Python program connect 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 publish to 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
In this session, we will be publishing and subscribing to message topics 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 be using our simple system from last session to capture temperature data from an HTTP Endpoint and display it in a Scatter Plot. We will be using 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 that will show 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 that will show 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