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-11 - Getting 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).  

 

NumberProjectDescriptionHardware usedKey Concepts CoveredFull Curriculum (Bi-weekly)Compact Curriculum (Weekly)
IntroductionIntroductionOverview of key concepts    
Tutorial-1Serial Temperature Sensor

Single serial sensor, two variations of hardware setups:

1. Arduino with Raspberry Pi

Raspberry Pi 2

Arduino UNO Board - Arduino UNO R3 ATmega328P

Sensor Expansion Shield for Arduino - Gikfun Sensor Shield Digital Analog Module V4 for Arduino Duemilanove UNO Mega2560 EK2138

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:

  • Waspmote Agriculture Sensor Board
  • Digital Temperature & Humidity Sensor
  • Soil Moisture Sensor
  • Atmospheric Pressure Sensor

ZigBee Starter Kit - Waspmote Starter Kit:

  • Waspmote 802.15.4 PCB Antenna
  • Waspmote Gateway 802.15.4 PCB Antenna
  • 2300 mAh LiPo Battery
  • miniUSB Cable

ZigBee Mesh Chips - XBee 2mW Wire Antenna - Series 2 (ZigBee Mesh)

   
Tutorial-2Serial sensors - humidity, moisture, ambient1. Arduino with Raspberry Pi

Humidity Sensor - DHT11 Digital Humidity Temperature Sensor /Arudino 

 Soil Moisture Sensor - Davis Instruments 6440 : Soil Moisture Sensor

 Ambient Sensor - Arduino compatible Light 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-3Phidget servo motor actuatorThe first introduction on actuation on devices

Servo Motor - 3000_1 - Hitec HS-422 Deluxe Servo 

 Motor Controller - 1061_1 - PhidgetAdvancedServo 8-Motor

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-4Irrigation nozzle with flow control actuator 

Flow Controller - Plastic Water Solenoid Valve - 12V - 1/2" Nominal

Flow Meter - Liquid Flow Meter - Plastic 1/2" NPS Threaded

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-5USB 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-6Other 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-7Weather cloud serviceUtilizing 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-8Simulating sensors, actuators, and devicesScale 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-9Combing sensors, actuators and devices with DataModelsManaging 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-10Large numbers of sensors, actuators and devices - intro to edge computingTQL 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-11Bulk 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-12Smart greenhouse - a real-world IoT application at scaleBringing it all together 

TDL -

TIL - Write more Queries

WDL -

Protocol Handlers -

Template Processing -

TQLEngine Runtime - Organizing projects.

Session #14 (Wk8)Session #8 (Wk8)
Tutorial-13Creating HTML and JavaScript appsClient 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)