Copy of The Greenhouse Tutorials
In this section we provide a series of self-contained tutorials that put various TQL constructs into real use. Each of the tutorial is self-contained, however together they constitute a real-world, cohesive Smart Greenhouse application, which is described in the last of the series Tutorial 13.
It is highly recommended that you go over the Tutorials/Introduction Section before any of the tutorials here.
Hardware requirement - TQLDOC-11Getting issue details... STATUS
Please note the hardware required in the following curriculum. If you plan to follow each project with your own set up (recommended), it is better that you procure the hardware ahead of time. In Tutorial 1 and 2, you have the options of choosing the Auduino-Pi or Libelium hardware setup. Based on your hardware choice, the sensors are also different. We recommend the Arduino-Pi option for students (it is lower cost) and the Libelium option for enterprise engineers. The latter is more practical for real deployment in the field.
Regardless of which hardware option and setup you choose, the TQL models you would write are the same (remember this is one of the benefits of using an IoT platform). Â
Â
Number | Project | Description | Hardware used | Key Concepts Covered | Full Curriculum (Bi-weekly) | Compact Curriculum (Weekly) |
---|---|---|---|---|---|---|
Introduction | Introduction | Overview of key concepts | Â | Â | Â | Â |
Tutorial-1 | Serial Temperature Sensor | Single serial sensor, two variations of hardware setups: 1. Arduino with Raspberry Pi | Arduino UNO Board - Arduino UNO R3 ATmega328P Temperature sensor - SunFounder NTC Thermistor Sensor Module for Arduino and Raspberry Pi | TDL - Introduction to Type Hierarchy, Namespace and Domains, Using Primitive types, ThingFacet, ThingModel. ThingFacet example using Single Sensor. TIL - Introduction to Queries. Simple CRUD Queries. Create / Save queries for Model Instantiation (Device Activation), Subscription Queries WDL - Usage of Workflow definition Language to build ThingFacets. Protocol Handlers - Introduction to one of the important TQLEngine Extension Point - Protocol Handler Framework. Detailed usage of Peripheral (Perif) Protocol Handler. Template Processing - Introduction to Template Processing. Processing simple message string. TQLEngine Runtime - Download and install TQLEngine, Import Project, Performing Local Edits to the model, Start / Stop Engine, Deploy and UnDeploy from TQLEngine User Interface. | Session #1 (Wk1) | Session #1 (Wk1) |
OR 2. Libelium Micro Controller with laptop | Agriculture Kit - Waspmote Agriculture Sensors Kit:
ZigBee Starter Kit - Waspmote Starter Kit:
ZigBee Mesh Chips - XBee 2mW Wire Antenna - Series 2 (ZigBee Mesh) | Â | Â | Â | ||
Tutorial-2 | Serial sensors - humidity, moisture, ambient | 1. Arduino with Raspberry Pi | Humidity Sensor - DHT11 Digital Humidity Temperature Sensor /Arudino  Soil Moisture Sensor - Davis Instruments 6440 : Soil Moisture Sensor | TDL - Creating Custom Types, ThingFacet with multiple actions. TIL - Writing more Find Queries. WDL - Multiple Invokes within a Task. Examples using Invocation of FacetScript and JavaScript. Topic - Introduction to Topic Facet, Subscription and Notification. Macros - Introduction to Macros to organize TQL Code. FacetScript - Introduction to FacetScript, Conditional Statements, Log Statement, Introduction to Pipeline processing - executing TQL Queries from models, Maintaining Local Cache (ContextData). JavaScript - Complex message processing using Javascript. Protocol Handlers - Peripheral (Perif) Protocol Handler. Parsing Responses. Template Processing - Use of XPath Expressions TQLEngine Runtime - Introduction to deployment package (MQP). Modifying default deployment package. | Session #6 (Wk3) | Session #2 (Wk4) |
 |  | OR 2. Libellium Micro Controller with laptop |  Ambient Sensor - LDR Sensor |  |  |  |
Tutorial-3 | Phidget servo motor actuator | The first introduction on actuation on devices | TDL - More about Types. ThingFacet for Actuators - Difference between Invoke Arguments vs Invoke Payload. TIL - Create and Update queries for Model Instantiation and Device Actuation. Protocol Handlers - Detailed usage of Phidget Protocol Handler. List of Phidget Devices covered. Template Processing - TQLEngine Runtime - | Session #2 (Wk1) | Offline learning (video) | |
Tutorial-4 | Irrigation nozzle with flow control actuator | Â | Flow Controller - Plastic Water Solenoid Valve - 12V - 1/2" Nominal | TDL - More about Types. ThingFacet for Actuators - Difference between Invoke Arguments vs Invoke Payload. TIL - Writing more queries. Protocol Handlers - Detailed usage of Peripheral Protocol Handler for Actuators. Template Processing - TQLEngine Runtime - | Session #7 (Wk4) | Offline learning (video) |
Tutorial-5 | USB camera | Â | USB Camera - ELP 2.1mm Lens 1080p HD Free Driver USB Camera Module for Linux ELP-USBFHD01M-L21Â | TDL - More about Types. ThingFacet for Actuators - Difference between Invoke Arguments vs Invoke Payload. TIL - Create and Update queries for Model Instantiation and Device Actuation. Protocol Handlers - Detailed usage of USB Camera Handler. Template Processing - TQLEngine Runtime - | Session #3 (Wk2) | Session #2 (Wk2) |
Tutorial-6 | Other IP based devices - light |  | Light - Philips 426353 Hue White and Color Personal Wireless Lighting, Starter Pack | TDL - More about Types - Cardinality. ThingFacet Actions for loading meta-data (device initialization) Vs. device actuation. TIL - Writing more Find Queries. WDL - Protocol Handlers - Detailed Usage of HTTP Protocol Handler for PUT, GET, POST. FacetScript - Template Processing - TQLEngine Runtime - | Session #4 (Wk2) | Offline learning (video) |
Tutorial-7 | Weather cloud service | Utilizing data from cloud services | Â | TDL - More about types. ThingFacet for Device Cloud. TIL - Writing more Find Queries WDL - Protocol Handlers - Detailed usage of HTTP Protocol Handler. FacetScript - Template Processing - TQLEngine Runtime - | Session #5 (Wk3) | (Wk4) |
Tutorial-8 | Simulating sensors, actuators, and devices | Scale up your application in the lab and test | Â | TDL - More about Types. Design pattern to write a ThingFacet for a device in simulation mode. TIL - Write more Queries. Switching from Simulation to Real mode. Sequence - Scheduling an isolated segment of TQL Code to run in pre-defined sequence of time and interval using Sequence Facet. WDL - Protocol Handlers - FacetScript - Template Processing - TQLEngine Runtime - | Session #9 (Wk6) | Session #4 (Wk5) |
Tutorial-9 | Combing sensors, actuators and devices with DataModels | Managing application logic and data with various devices | Â | TDL - Type references. Simple and SmartReference TIL - More about queries - Joins, nested modifiers. WDL - Protocol Handlers - FacetScript - Template Processing - TQLEngine Runtime - | Session #8 (Wk4) | Session #5 (Wk3) |
Tutorial-10 | Large numbers of sensors, actuators and devices - intro to edge computing | TQL applications from gateways to cloud, creating a coherent system | Â | TDL - More about Types TIL - More about Queries. WDL - Protocol Handlers - FacetScript - Template Processing - TQLEngine Runtime - | Session #11 (Wk7) | Session #6 (Wk6) |
Tutorial-11 | Bulk initialization | Â | Â | TDL - More about Types TIL - Find Queries - Limiting the size of the result set. WDL - Protocol Handlers - FacetScript - Template Processing - TQLEngine Runtime - | Session #12 (Wk7) | Session #6 (Wk7) |
Tutorial-12 | Smart greenhouse - a real-world IoT application at scale | Bringing it all together | Â | TDL - TIL - Write more Queries WDL - Protocol Handlers - Template Processing - TQLEngine Runtime - Organizing projects. | Session #14 (Wk8) | Session #8 (Wk8) |
Tutorial-13 | Creating HTML and JavaScript apps | Client applications | Â | TQL-based HTML / JS Application - Framework. TQL EndPoint - Discovering Http and WebSocket EndPoints. Invoking Queries - Handling XML Request and Response in Javascript | Session #10 (Wk6) | Session #5 (Wk3) |