Internet Of Things 101 Intel® Edison
  • Cover
  • Summary
  • About This Traning
    • Objectives
    • Skills
    • Prerequisites
    • Requirements
  • Once Upon A Time ...
  • Internet Of Things
    • Examples
    • Consortiums
    • Resources
      • Architecture
      • Associations
      • Awards
      • Contests
      • Events
      • Investors
      • Job Roles
      • People
      • Programming Languages
      • Projects
      • Standards
      • Tendencies
      • Training
        • Coursera
      • Licensing
      • Sites
    • Key Players
      • Amazon
      • Apple
      • ARM
      • AT&T
      • Atari
      • Axeda
      • Bosch
      • Cisco
      • Dell
      • Eclipse
      • Facebook
      • General Electric
      • Google
      • Hewlett Packard
      • Huawei
      • IBM
      • Intel
        • Tools
      • IoT Ticket
      • Libelium
      • Oracle
      • Others
      • Mediatek
      • Micrium
      • Microchip
      • Microsoft
      • Mozilla
      • NXP
      • NVIDIA
      • Nokia
      • Predixion
      • PTC
      • Qualcomm
      • RedHat
      • Renesas
      • Salesforce
      • Samsung
      • SAP
      • Schneider Electric
      • Telefonica
      • Texas Instruments
      • ThingWorx
      • Verizon
      • Vodafone
      • C2M
  • Architecture
    • Thing
      • Boards
        • Arduino
        • Beagleboard
        • C.H.I.P.
        • Raspberry Pi
        • ESP8266
        • Intel Architecture
          • Development Workstation
      • Boot Loaders
        • Labs
      • Operating Systems
      • Embedded Linux
        • Board Support Package
          • Labs
        • Boot Up
          • Labs
        • Command Line Interface
          • Labs
        • File Systems
          • Labs
        • Text Editors
          • Labs
        • Package Management System
          • Labs
        • Version Control Systems
          • Labs
        • Programming Languages
          • Python
          • PiP Package Management System
          • Labs
        • Libraries
          • Labs
      • Integrated Development Environments
    • Data
      • Sensors
        • Labs
        • Project
      • Actuators
        • Labs
        • Project
      • Local Operations
      • Frameworks
    • Gateways
      • Intel® IoT Gateways
    • Communications
      • Connectivity
        • Labs
      • Protocols
        • RESTful
          • Labs
        • MQTT
          • Labs
          • Project
    • Cloud Computing
      • Application Programming Interface
        • Labs
        • Project
      • Services
        • Labs
      • Platforms
        • Labs
  • Wrap-Up
    • Online Training
    • Challenge
  • SandBox
    • Sandbox-NonIT
    • IoTPy
    • Analytics
    • Security
    • Cloud
Powered by GitBook
On this page
  • Challenge
  • 01 Data Reporting, System Data, Device ID
  • 02 Data Reporting, System Communications Protocols, Device ID
  • 03 Data Reporting, System Communications Protocols, RESTFul API
  • 04 Data Reporting, Cloud Computing Services, freeboard.io & dweet.io
  • 05 Data Reporting, Cloud Computing Services, adafruit.io
  • 06 Data Reporting, Cloud Computing Platforms, IBM Watson IoT Platform
  • 07 Physical Sensors Seeed Studio Grove Kit
  • 08 Software Version Control System Pushing Code
  1. Wrap-Up

Challenge

PreviousOnline TrainingNextSandBox

Last updated 7 years ago

Challenge

With this step by step challenge you will have a parallel learning experience of Internet of Things and continue with the implementation of functionality on top of the project you have built during the workshop.

  1. Data Reporting, System Data, Device ID

  2. Data Reporting, System Communications Protocols, Device ID

  3. Data Reporting, System Communications Protocols, RESTFul API

  4. Data Reporting, Cloud Computing Services, freeboard.io & dweet.io

  5. Data Reporting, Cloud Computing Services, adafruit.io

  6. Data Reporting, Cloud Computing Platforms, IBM Watson IoT Platform

  7. Physical Sensors (Seeed Studio Grove Kit)

  8. Software Version Control System Pushing Code

01 Data Reporting, System Data, Device ID

Section

Instruction

Define a global variable "DeviceID" to serve as a Unique Device Identification to your Internet of Things Device

02 Data Reporting, System Communications Protocols, Device ID

Instruction

Include your "DeviceID" global variable under your MQTT Publish and Subscribe Topics IoT101/DeviceID/#

Code in 2 functions needs to change:

  • functionDataSensorMqttPublish

  • functionDataActuatorMqttSubscribe

Here it is how new code might look like:

#!/usr/bin/python

import paho.mqtt.client as paho
...
def functionDataActuatorMqttSubscribe():
...
    mqttclient.subscribe("IoT101/DeviceID/DataActuator", 0)
...
def functionDataSensorMqttPublish():
...
        topic = "IoT101/DeviceID/DataSensor"
...

03 Data Reporting, System Communications Protocols, RESTFul API

Instruction

Incorporate a RESTFul API named "sensor" using Flask-RestFul to send data taken from the Simulated Sensor under functionDataSensor Python function.

Once implemented, run your main.py program and access the network resource using a web browser, you should get the data taken from the the Simulated Sensor:

    root@edison:~/TheIoTLearningInitiative/InternetOfThings101# python main.py
     ...
     ...
     * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
     * Restarting with stat
     * Debugger is active!
     * Debugger pin code: 331-202-890
     ...
     ...

Connect to your boardipaddress:5000/sensor in a web browser, data shall be displayed

    127.0.0.1 - - [28/Dec/2015 15:07:38] "GET /sensor HTTP/1.1" 200 -
    127.0.0.1 - - [28/Dec/2015 15:07:40] "GET /sensor HTTP/1.1" 200 -

04 Data Reporting, Cloud Computing Services, freeboard.io & dweet.io

Instruction

05 Data Reporting, Cloud Computing Services, adafruit.io

Instruction

06 Data Reporting, Cloud Computing Platforms, IBM Watson IoT Platform

Instruction

Implement code to publish the data taken from the Simulated Sensor to the IBM Watson IoT Platform

07 Physical Sensors Seeed Studio Grove Kit

Instruction

Implement code to replace existing functionality/logic under functionDataActuator and functionDataSensor by using a physical actuator and sensor from the Seeed Studio Grove Kit

Code in 2 functions needs to change:

  • functionDataActuator

  • functionDataSensor

Remember UPM library give you Python bindings to easy use of your Grove Sensors

Here it is how new code might look like:

#!/usr/bin/python

import paho.mqtt.client as paho
...
def functionDataActuator(status):
    # Implement logic to drive Actuator / Grove Relay
...
def functionDataSensor():
    # Use Sensor / Grove Light to replace psutil.net_io_counters()
    ...
    return data
...

08 Software Version Control System Pushing Code

Instruction

Confirm every code under your local "TheIoTLearningInitiative" git repository, "InternetOfThings101" directory is uploaded to your remote "TheIoTLearningInitiative" github repository

ToDo Diretory Structure

Section

Section Flask-RESTful Lab

Section

Create a dashboard and send the data taken from the Simulated Sensor using Python library

Do not hesitate to google and see this link

Section

Create an dashboard and send the data taken from the Simulated Sensor using Adafruit MQTT Python Library

Do not hesitate to google and see this link

Section

Remember to reuse the code seen under "System Cloud Platforms IBM Watson IoT Platform Quickstart Physical Device", file

Section

System Data
System Communications Protocols
System Communications Protocols
Cloud Computing Services
freeboard.io
dweet.io
BoardEdison en Freeboard con dweet
Cloud Computing Services
adafruit.Io
Learn Adafruit IO
Cloud Computing Platforms
IBM IoT Quickstart
https://github.com/intel-iot-devkit/upm/tree/master/examples/python
Sensor Grove Light
Actuator Grove Relay
Software Version Control System