Connecting the Pressac Smart Gateway to the IBM Watson IoT Platform
In this guide, we’ll show you how to connect the Pressac Smart Gateway to the IBM Watson IoT Platform to visualise Pressac sensor data.
Pressac smart sensors are connected to the Pressac smart gateway via the EnOcean radio protocol. The Pressac smart gateway serves as a bridge between the EnOcean radio protocol and a TCP/IP network. Available in Ethernet only and Ethernet, LTE and WiFi variants the Pressac smart gateway sends sensor data via MQTT along with facilitating direct integration to cloud platforms including IBM Watson IoT platform. With an easy to use web-interface, the Pressac smart gateway makes managing your devices and cloud connections easy.
For more information on Pressac’s sensor technology, visit www.pressac.com
What you need to get started
- A Pressac smart gateway
- A sensor compatible with the Pressac smart gateway
- An Ethernet cable
- An IBM Bluemix account with a running instance of the Watson IoT service (Details on how to register and manage your Bluemix account can be found here)
- A suitable web browser
Step 1 – Setting up the Pressac EnOcean Gateway
Plug in one end of the Ethernet cable into your network point and plug the opposite end of the cable into the Ethernet port on the Pressac EnOcean gateway.
Connect the EnOcean antenna along by screwing it onto the connection on the Pressac EnOcean Gateway taking care not to cross thread or bend. If your gateway supports LTE and WiFi attach the antennas for these aswell.
Connect your Pressac EnOcean Gateway’s power supply, connecting the power supply will boot up the Pressac EnOcean Gateway and you will see the products LED start blinking. The Pressac EnOcean Gateway will take a few seconds to initialise.
Next you need to find the IP Address of the Pressac EnOcean Gateway the most common way of doing this is to check your routers list of connected devices. If this is not possible the following alternative methods can be used.
Windows: The Pressac EnOcean Gateway announces itself over Universal Plug and Play (UPnP) and can be found in the “Gateways” or “Other Devices” section of the Windows Network area to find this area click “Start” search for “Network” and click “View network connected computers and devices”. Double clicking a gateway from here will open up the web-ui.
Mac: The Pressac EnOcean Gateway can be discovered using Bonjour. One of the easiest ways of using this method is to open “Safari” go to “Preferences” then “Advanced” and tick “Include Bonjour in the Bookmarks menu” close Preferences navigate to “Bookmarks” and you will now see all your networked Bonjour devices including the Pressac EnOcean Gateway.
Now you have the IP Address you can use it to access the Pressac EnOcean Gateways web interface launch your chosen web browser and type http://<your-ip> e.g. http://192.168.1.188 This will display the Pressac EnOcean Gateway’s first boot wizard. Follow the steps on the wizard to set up your Pressac EnOcean Gateway for the first time.
Step 2: Add a Device to the Pressac EnOcean Gateway
To learn-in a new device click “– Add Devices” in the EnOcean sub-menu on the Pressac EnOcean Gateway web-interface and then click “Start” .
This will initiate a 60 second countdown, during these 60 seconds the Pressac EnOcean Gateway will listen for the learn telegrams of devices in range of the Pressac EnOcean Gateway. This process can be cancelled by clicking “Cancel” and re-started for another 60 second duration by clicking “Search” again.
Ensure the Pressac EnOcean Gateway is listening for learn telegrams and press the “Learn” button on your Pressac device to locate the learn button for your device please consult your devices manual. In this example we will be using the Pressac CO2, Temperature and Humidity Sensor this devices learn button can be exposed by removing the CO2, Temperature and Humidity Sensor back plate as shown in the image below.
A new device entry will now appear in a table with the following columns
Last Seen – The Date and Time the Pressac EnOcean Gateway last received a telegram from the device
Device ID – The unique identification number of the device
EEP – EnOcean Equipment Profile used by the device.
Security – Security enabled on the device Yes / No
dBm – Signasl strength of the device to the gateway
Action – The action column contains a menu containing options to EDIT AND ADD and DELETE the device.
Click on “Edit and add” from the menu under the Action column as shown in the above image to edit the device a new screen will appear as shown in the image below.
The only required field is the device name this is the identifier which the IBM Watson platform will use for your device. It is advised to use a device name which resembles the function and location of the device. e.g. If your device is a CO2, Temperature and Humidity Sensor and it is situated in Classroom 1, your Device Name could be “Classroom1-CO2-Temperature-Humidity”.
Other optional properties include the location of your physical device. Please note that only characters A-Z, numbers, ‘_’ and ‘-‘ are permitted to be used in any of these fields.
Once you have specified your desired device name and any of the other optional properties click “Save” at the bottom of the screen to save the entry.
You can now navigate to the Devices page and see the device along with its last state.
Step 3: Configuring the IBM Watson IoT Platform
Create Gateway Device Type
Each Gateway connected to IBM Watson IoT Platform is associated with a device type. For the Pressac EnOcean Gateway to communicate with the IBM Watson IoT Platform we need to create its device type. Please follow the steps below for which you will need a Bluemix account with a running instance of the IBM Watson IoT platform.
From the IBM Watson IoT Platform dashboard click “Devices” from the left menu then the “Device Types” tab then finally the “+ Create Type” button as shown in the image below.
You will now be presented with 2 options “Create device type” and “Create gateway type” as shown in the image below. Click on “Create gateway type”.
The screen should now automatically proceed to the “General Information” screen as shown in the image below. In the “Name” field type “EnOcean” this will be the name of our Pressac EnOcean Gateway Device Type.
Click “Next” located at the bottom right of the page you should now see the “Define Template” screen from here you can select attributes for the device type all attributes are optional and for the sake of this recipe we aren’t going to select any.
Click “Next” the Submit Information screen will now appear, if you defined any of this information in the previous step you can confirm it is correct at this point.
Click “Next” the optional Metadata screen will now appear again we will not be defining any.
Now Click “Create” in the bottom right corner of the screen. You will now be taken back to the Devices Dashboard area of the IBM Watson IoT Platform witch should now have a confirmation message of our device type being successfully created and our new entry of “EnOcean” under “Device Types”.
Add Pressac EnOcean Gateway to IBM Watson IoT Platform
Once added Gateway devices can register new devices to the IBM Watson IoT Platform then facilitate the sending and receiving of data on behalf of devices connected to them such as our CO2, Temperature and Humidity Sensor. Register your Pressac EnOcean Gateway by following the below steps.
From the IBM Watson IoT Platform dashboard click “Devices” from the left menu then the “Browse” tab then finally the “+ Add Device” button as shown in the image below.
Select the “EnOcean” “Device Type” we made in the previous step and click “Next” in the bottom right corner of the screen.
A new screen will appear as shown in the image below asking for Device Info in the “Device ID” field put “EnOcean-Gateway” this will be the name of our Pressac EnOcean Gateway on the IBM Watson IoT Platform. Once complete click next in the bottom right corner of the screen.
Next is the Optional Metadata screen shown in the image below we leave this screen blank and click “Next”.
In the Security screen we are given the option to provide an authentication token if a token is not provided the IBM Watson IoT Platform will generate one for us. Leaving the field blank click “Next”.
Finally, we are shown a summary of the options we chose throughout the creation process Verify the details and Click “Add” in the bottom right corner of the screen.
The Gateway is now registered; on your screen, you will now see your registration details which need to be added to the Pressac EnOcean Gateway be sure to make a note of them once you are finished click the “X” in the top right corner to return to the IBM Watson IoT Dashboard.
You will now see the “EnOcean-Gateway“ in your list of devices as shown in the image below.
At this point your “EnOcean-Gateway” device will be displaying a disconnected icon this is because we are yet to connect it to our Pressac EnOcean Gateway.
Step 4: Connecting the Pressac EnOcean Gateway
Go back to the Pressac EnOcean Gateway web interface and click the “IBM Watson IoT” entry on the main menu under connections then from the dropdown at the side of “Connection” select “On” and input the IBM Watson IoT Platform registered gateway credentials we took a note of from the previous step and click “Save”.
Connection will now start if everything goes well you will see the state change to “Connected” your gateway is now ready to send events from your Pressac device to the IBM Watson IoT Platform.
Navigate back to your IBM Watson IoT Dashboard and select “Devices” from the left menu you will now see the “EnOcean-Gateway” shows as connected and it has added our CO2, Temperature and Humidity Sensor as a device .
Step 5: Visualising Pressac Sensor Event Data on the IBM Watson IoT Platform
On the IBM Watson IoT Platform dashboard click “Boards” on the menu then the “+ Create New Board” button as shown in the image below.
A pop up will appear asking you to give a name to your new board in the field marked “Board Name” type the name you want to give your board we have called ours “Classroom 1 CO2, Temperature and Humidity Sensor” click “Next”.
The next screen will ask you to define other members of the board (if any) to add another member to the board click “+ add user ID” once finished click “Create”.
Now you will see your new board in the “your boards” section as shown in the image below to access your new board click on it.
Your new board will be empty click on the “+ Add New Card” button at the upper right of the screen.
You will now be asked to select a card type for this example we will be using a “Gauge”.
Select your device in this example we will select our CO2, Temperature and Humidity Sensor added previously once selected click “Next”.
Now click “Connect new data set” as shown in the image below.
For this example, we are going to display the CO2, Temperature and Humidity Sensors concentration value to do this we defined the following field values. The field values required for your device may vary, if data is availible clicking into the fields will list availible options.
Event – data
Property – concentration.value
Name – Classroom1 Concentration
Type – Float
Unit – ppm
The Precision, Min and Max can be changed to suit your requirement for this instance we have left them as default. When finished click “Next”.
Now select the size you want to display the Gauge we have selected “Large” once you have selected click “Next”.
Now we give our new card a title and select a colour we have gave ours the title of “Classroom 1 Concentration” and selected Blue as the colour once you are finished click “Submit”.
You will now be taken back to the Board you created in the IBM Watson IoT Platform and can now see your newly created card showing the data from your Pressac device for our example we can see our concentration value of the CO2, Temperature and Humidity Sensor in a gauge format.
These steps can be repeated to add other device data to your board for example we can display the additional Temperature and Humidity values availible from our CO2, Temperature and Humidity Sensor.
If any of the properties for your devices are not being displayed it may be because the Watson IoT Platform has not yet received event data for the property. Once the device sends a telegram containing the required values they will be show.