Overview

Skill Level: Any Skill Level

Basic knowledge of Watson IoT Platform

Ingredients

  1. element14 EnOcean IoT Starter Kit (Entrepreneur or Enterprise)
  2. IBM Bluemix Account
  3. IBM Watson IoT service instance

 

Step-by-step

  1. Introduction

    Configuring Smart EnOcean Gateway to send EnOcean device events to IBM Watson IoT Platform.

    EnOcean

    Inventor of patented energy harvesting wireless technology for use in building automation, smart home and internet of things.
    The self-powered wireless devices e.g. switches, sensors and controls built over this technology, enables monitoring of various parameters like temperature, humidity, illumination, presence, etc with lower cost of installation and efficient use of energy.

    For more details refer the link https://www.enocean.com/

    element14

    Global electronics distributor and online community. element14 is an online community for engineers, established in 2009 it has become a standard collaboration forum for engineers and electronics enthusiasts. It features a library of technical blogs, videos and webinars providing information on the latest trends in electronics including Internet of Things.
    Distributor of EnOcean IoT starter kits, these kits include energy harvesting EnOcean self-powered devices and a gateway specially designed for EnOcean devices running on a compact, robust and energy efficient hardware platform with direct integration with Watson IoT Platform and TRIRIGA.

    IBM Watson IoT Platform

    The IBM Watson Internet of Things Platform is a fully managed, cloud-hosted service that makes it simple to derive value from Internet of Things (IoT) devices. When combined with the IBM Bluemix platform, Watson IoT Platform provides simple, but powerful application access to IoT devices and data. You can rapidly compose analytics applications, visualization dashboards, and mobile IoT apps. Create IoT applications that feed insights to your backend enterprise applications.
    Integrating EnOcean devices with Watson IoT Platform brings in the capabilities to smartly monitor and manage the building facilities by analyzing real-time data captured using various sensors.

  2. What to expect from this recipe

    Learn to configure Smart EnOcean Gateway to send EnOcean device events to IBM Watson IoT Platform.

  3. Before you start

    For this recipe you will need

    1. Entrepreneur or Enterprise IoT Starter kit (Smart EnOcean Gateway)
    2. EnOcean devices: 3 devices Rocker Switch, Temperature and Window contact supplied with the Entrepreneur kit
    3. Firefox or equivalent browser to connect to IBM Bluemix and web based configuration page of the kit
    4. You will also need
      • Account on IBM Bluemix
      • Running instance of Watson IoT service
  4. Architecture

    EnOcean Devices (Sensors, Switches, Actuators)

    The EnOcean devices are the physical devices built to sense various parameters e.g. Temperature, Illumination, contact, etc. The devices communicate and transmit the parameters values using a patented wireless technology and a hardware device called EnOcean controller.

    The devices come in various packages ranging from simple ones that capture single parameter, to complex multi sensors that can capture multiple parameters.

    Smart EnOcean Gateway

    An Intelligent TCP/IP Gateway with direct integration to IBM Watson IoT Platform, built in EnOcean equipment profiles and a user friendly web-interface, which makes “learning in” new devices an easy task.

    Exposes various REST API’s to communicate with the EnOcean devices.

    For details refer http://enocean-gateway.eu/images/documents/Documentation/index.html?product.html

  5. Getting Started

    For the purpose of this section we will use the 3 devices supplied with the Entrepreneur Kit. But the same steps will apply to the Enterprise kit also and to learn-in any other EnOcean device.

    In the coming sections we will look at the below steps in detail

    Step 1: Setup the Kit

    Step 2: Learn in the 3 EnOcean devices

    Step 3: Configure the Watson IoT Platform page

    Step 4: View the EnOcean devices on Watson IoT Platform dashboard

    Step 5: View device event data on the Watson IoT Platform

  6. Step 1: Setup the Kit

    Snapshot of the core contents of the kit

    The kit comes with a quick start guide inside the box package. It is recommended to read the quick start guide before connecting the various components of the kit and plugging in the power adapter into a electricity socket.

    Plugging in will boot up the Smart EnOcean Gateway, one can see a small red light and a green blinking light from the openings near the power port. It will take a few seconds for the gateway to boot up.

    The next step will be to find its IP address; in case you cannot get it directly from the router, the following methods can be used

    1. Windows: Gateway anounces itself on UPnP and is visible under the “Gateways” section under “Network Neighbourhood”.

    2. Mac: Gatway can be discovered using Bonjour.

    3. Using a USB Stick: Insert a USB stick in one of the USB ports of the Gateway, wait for 10 seconds and take it out. There will be a file named as “dcgw-info.txt” on the stick containg the Mac address and the IP address of the Gateway.

    4. Use a IP scanner

    Check out this video on how to find Gateway IP address

    Once the IP is retrieved it’s time to login to the web interface and do some learn-in of the devices into the Smart EnOcean Gateway

    The Smart EnOcean Gateway web interface can be opened using the IP address of the Gateway e.g. http://192.168.1.70/dcgw/login. This will open the gateway login page as shown below. Login using the default password “admin”.

  7. Step 2: Learn in the 3 EnOcean devices

    Before any of the EnOcean devices can be used, they need to be learned into the Gateway. In the next few steps we will learn-in the 3 devices supplied with the Entrepreneur kit. These steps can be used as it is to learn-in any other EnOcean device.

    To learn-in a device click “EnOcean”->”New Device” menu on the left of the Gateway web interface page as shown below

    The Smart EnOcean Gateway learn-in mode will initiate for a period of 60 seconds and the Gateway waits for learn-in telegram from a new device. Learn-in can be restarted by pressing the “Start” button. (Cancel button in the above image will change to Start when learn-in countdown ends)

    Follow the below steps for learning in the 3 EnOcean devices.

    Rocker Switch:

    During the learn-in countdown press any button of the Rocker-Switch, a new device entry will appear on the screen as shown in image below.

    Click the pencil icon under the “Action” column in the above image to edit the Rocker Switch device entry and add a “Friendly id” for this device as shown below. Press “ok” to save the Rocker Switch device entry.

    Check out this video to learn-in Rocker Switch

    Friendly Id

    A very important property of any EnOcean device, this is the identifier by which a device will be known on the IBM Watson IoT Platform. A general guideline will be to use a Friendly Id which very closely resembles the functioning of the EnOcean device. For e.g. if you are using a rocker switch to control a lamp called lamp1, Friendly Id could be “Switch_Lamp1”.

    Temperature Device

    Follow the same procedure as we followed for Rocker Switch to learn-in the new Temperature device. The only difference being the learn-in switch for this device, a small black button which lies on the back of the device, encircled in Yellow in the image below.

    Edit the device entry to specify the Friendly Id and press “ok” to save the Temperature device entry.

    Check out this video to learn-in Temperature device

    Window Contact

    Follow the same procedure as we followed for Temperature device to learn-in the new Window Contact device. The learn-in switch for this device lies on the side of the device, encircled in Red in the image below.

    Edit the device entry to specify the Friendly Id and press “ok” to save the Window Contact device entry.

    Check out this video to learn-in Window contact

    For detailed information on learning in devices please refer http://www.enocean-gateway.eu/images/documents/DC_GW_Learning_In_EnOcean_Devices_en.pdf

  8. Step 3: Configure the Watson IoT Platform page

    Register a Gateway Device on Watson IoT Platform

    Before we can configure the Watson IoT Platform page of our Smart EnOcean Gateway, we need to register a Gateway device on the Watson IoT Platform. You will need a Bluemix account for this.

    Follow this recipe https://developer.ibm.com/recipes/tutorials/how-to-register-gateways-in-ibm-watson-iot-platform/ to register a Gateway type named “EnOcean” and a Gateway device named “EnOcean-Gateway” in Watson IoT Platform.

    Ensure you save the gateway device credentials; we will need these credentials to configure the Watson IoT Platform page of the Smart EnOcean Gateway.

    Configure the Watson IoT Platform page

    To open this page, click the “Internet of Things” menu item on the Smart EnOcean Gateway web interface as shown below. Click on the “On” radio button, enter the Gateway device credentials that you saved earlier and press “Save and apply”. Connection sequence will start and if everything goes fine, you will see the “Successfully connected! …” state as shown below.

    This completes the configuration of your Gateway. Gateway is now ready to send, probably already sending events by now to Watson IoT Platform.

  9. Step 4: View the EnOcean devices on Watson IoT Platform dashboard

    IBM Watson IoT Platform will implicitly register the devices for you on the first data event, so probably your devices are already registered by now and you should be able to see them on the dashboard.

    Still as a best practice we will first sync our devices with the platform. To sync the devices, go to the “Internet of Things” menu on the Smart EnOcean Gateway web interface and press the “Sync with Cloud” button once. Expect to see some activity messages in front of “State” label followed by “Successfully connected! …” message. This completes the sync with IBM Watson IoT Platform.

    Go to your Watson IoT service dashboard devices sections to view the 3 devices registered there as shown below and observe Friendly Id used as the Device ID. Device Type is implicitly assigned to each device by the Smart EnOcean Gateway and is the EnOcean profile id of the device.

  10. Step 5: View device event data on the Watson IoT Platform

    We will use the Devices page on the Watson IoT Platform dashboard to view the event data. First go to the Devices page on the dashboard and click the Switch_Lamp1 device, a window will popup, now press the button of the Rocker Switch and observe data appear on the screen as shown below

  11. Conclusion

    In this recipe we demonstrated how to integrate Smart EnOcean Gateway with BM Watson IoT Platform and view the incoming EnOcean device events on IBM Watson IoT Platform.

    For details on the Smart EnOcean Gateway kits refer the following links…

    https://www.element14.com/community/docs/DOC-80846/l/intelligent-building-iot-starter-kit-entrepreneur-edition

    https://www.element14.com/community/docs/DOC-80864/l/intelligent-building-iot-starter-kit-enterprise-edition

  12. Follow Up

    • Setup RTI rules on EnOcean device events and trigger TRIRGA work tasks

Join The Discussion