NanoSense EnOcean User Manual

NanoSense
123 rue de Bellevue, 92100 Boulogne Billancourt
France
Tél : 33-(0) 1 41 41 00 02, fax : 33-(0) 1 41 41 06 72
www.nano-sense.com
S.A.R.L au capital de 500 100 Euro Siret : 444.396.519.00027 APE : 4669A TVA intracom : FR-35444.396.519
EnOcean IP gateway with Cloud services
Rev
Date
Modification
V1 Initiale Version
V2
Sept 2014
Pro version with update and external antenna
V3
Oct 2014
Static IP and triggers
V4
Apr 2015
New REST method
V5
May 2015
Ability to change web UI passwords
S.A.R.L au capital de 500 100 Euro Siret : 444.396.519.00027 APE : 4669A TVA intracom : FR-35444.396.519
Index
1. Presentation ................................................................................................................................. 3
2. Connecting to a PC, tablet or smartphone. .................................................................................. 3
3. . General Settings ........................................................................................................................ 4
4. Pairing ......................................................................................................................................... 5
5. Cloud Services ............................................................................................................................. 8
6. Cloud setup .................................................................................................................................. 9
7. Data retrieval ............................................................................................................................. 11
8. Private data base ........................................................................................................................ 11
9. How to Assign a Static IP Address for your EnOcean gateway ................................................ 12
10. Change the access codes to the web interface ....................................................................... 19
11. Triggers Setup ....................................................................................................................... 19
12. Setup a Xively Trigger to Activate Zapier ............................................................................ 20
13. Connecting Xively to Zap ..................................................................................................... 21
14. Activate your Zap .................................................................................................................. 22
Annex 1: PHP file example (Private server) ..................................................................................... 24
Annex 2: Request body example (Private server) ............................................................................. 25
S.A.R.L au capital de 500 100 Euro Siret : 444.396.519.00027 APE : 4669A TVA intracom : FR-35444.396.519
1. Presentation
This box is a gateway between the EnOcean world and the IP world. The IP address is allocated by DHCP.
EnOcean is an ISO international communication protocol dedicated to wireless and battery less sensors and actuators, for low-energy buildings.
EnOcean radio telegrams are standardized and defined by a profile number (EnOcean Equipment Profile or EEP).
Certain profiles combine several values, such as the CO2 profile that also includes relative humidity and room temperature. So for such telegram there will be 3 outputs channels in 16 bits float on IP.
The gateway allows pairing up to 36 EnOcean devices and sends data in the cloud (Xively) and/or in a remote private database. (Note: this preliminary version does not allow setting up another cloud service than Xively and the customer remote database!
The data recorded in Xively are downloadable in different formats (rtf, excel, XML JSON) with a web browser.
Service storage and graphs display is free of charge and provided by www.xively.com
The data can be confidential or public (shared) according to customer choice.
This gateway has several usages:
• Render a real time dashboard pf the building
• Monitor energy consumption of the building
o Power consumption by function
o Water consumption including hot water.
o Natural Gas Consumption
• Monitor the indoor air quality
• Monitor the comfort (temperature, humidity)
• Archive data (occupancies, windows opening, temperature settings, consumptions
...) for a better understanding of energy consumptions and usages.
Note that there are two versions of the firmware:
One for North America with temperature expressed in °F, gas and water flow in
gallon and radon in Pico curie
One for the rest of the world with temperature expressed in °C and other value as
per ISO.
2. Connecting to a PC, tablet or smartphone.
The gateway has an embedded web server providing a setting web page.
S.A.R.L au capital de 500 100 Euro Siret : 444.396.519.00027 APE : 4669A TVA intracom : FR-35444.396.519
To access to this page:
• For Ethernet connection: Connect the box to the LAN of the building. It is then possible to connect with a PC, or by using a Wi-Fi router: a tablet or a smart phone.
The IP address of the box is provided by the local network (by DHCP). Find this address into the network to access the setting page with a browser.
The identifiers to access the configuration page of the gateway are "admin" for the username and "flyport" for the password.
3. . General Settings
Once connected to the page, if the network is connected to Internet, the gateway will attempt to retrieve the date and time on a dedicated server. Once retrieved, the date and time is displayed.
S.A.R.L au capital de 500 100 Euro Siret : 444.396.519.00027 APE : 4669A TVA intracom : FR-35444.396.519
4. Pairing
In the “EnOcean settingframe, activate the “Pairing” button. The Gateway will start listening pairing EnOcean switch telegrams.
Launch the pairing telegram of an EnOcean sensor or switch.
Upon receipt, the identification number (ID) of the sensor is displayed. If the sensor transmits its profile number (EEP), it also appears.
Click on “Publish” to set the device’s data.
If the sensor does not send its profile (EEP number), use the scroller to specify his EEP and / or if the EEP number is not correct.
Check the product manual in case of doubt.
S.A.R.L au capital de 500 100 Euro Siret : 444.396.519.00027 APE : 4669A TVA intracom : FR-35444.396.519
Click on " Valid " to record the pairing.
The button ‘Paired” list the paired devices.
It is essential to enter an alias for each device because an ID is not understandable to describe a device in the cloud.
Don’t forget to specify its location (eg bed room, bathroom, floor #....) And function (eg light
switch, blind switch, T° sensor, ROP,..). The length of the alias is limited to 11 characters.
If needed you can change the alias and the EEP of the device by clicking on the corresponding button in the published devices area.
The alias appears in the database and in the cloud and the EEP is used for data conversion.
S.A.R.L au capital de 500 100 Euro Siret : 444.396.519.00027 APE : 4669A TVA intracom : FR-35444.396.519
It is possible to modify the alias (11 characters maximum without spaces) and the EEP
When “Valid” is clicked, you will be back to the general setting window.
If you click again on “Paired”, the published devices will appear with their modifications.
S.A.R.L au capital de 500 100 Euro Siret : 444.396.519.00027 APE : 4669A TVA intracom : FR-35444.396.519
The button “Closecloses the under way devices window.
5. Cloud Services
You must first open an account (free of charge) on www.xively.com
The tutorial is here: https://xively.com/dev/tutorials/xively_develop/
Once the account is open you can indicate the location, a feed is created automatically, note carefully the ID and API key.
You can manage your account and access rights.
S.A.R.L au capital de 500 100 Euro Siret : 444.396.519.00027 APE : 4669A TVA intracom : FR-35444.396.519
As Xively is free of charge you will be limited to one account per email address.
On the configuration page of the gateway, simply copy the feed ID and API key to establish communication with Xively.
6. Cloud setup
Feed setup:
Be careful to the API key used. The general API key will work to send data to Xively but may not work for automatic field creation (see below)
If the data field has not been created on Xively, errors will appear while transmitting data.
Location: Not used for Xively
Feed ID
Created device on Xively for data logging
API key to use to send data
S.A.R.L au capital de 500 100 Euro Siret : 444.396.519.00027 APE : 4669A TVA intracom : FR-35444.396.519
In this case, data are lost, but you can automatically create the necessary field on Xively.
Click on “Errors” to get the list of errors encountered.
You just have to click on “Create DataStream” to create the correct field on Xively.
The ID displayed in the error message is not used for the Xively’s field name. Only the 1Alias
and the type of data from the EEP are used
S.A.R.L au capital de 500 100 Euro Siret : 444.396.519.00027 APE : 4669A TVA intracom : FR-35444.396.519
Example of automatically created field:
The frame Cloud Services keeps track of the correct transmission of data in the cloud.
The gateway stores the data then transmit them to the database and in the cloud when the buffer reaches 80% of its capacity (can takes few minutes).
7. Data retrieval
Xively:
Data recorded automatically degrade as and when of the time for not unnecessarily overloading data storage.
The degradation is to reduce the number of data of more than 6 hours old by averaging two consecutive measures and so on.
If you want to keep the data in Xively without degradation, there is a subscription (not free).
8. Private data base
You can also use a private database to store your data. To do this, you have to create a database on your server or your website, and a php file (annex 1) in one of your server or web site folder to send data into your database.
S.A.R.L au capital de 500 100 Euro Siret : 444.396.519.00027 APE : 4669A TVA intracom : FR-35444.396.519
For setting up this facility, click on “Private DB setup”.
- Web site address : address of the web site on which the database is located
- Web site port : specify the port used to send data to your server
- Php file name and location: file pathname and name of the php file that send data in the
database.
In this above case the field will contain: /scripts/MyPhpFile.php
9. How to Assign a Static IP Address for your EnOcean gateway
If you have a network with several computers and devices, it’s a good idea to assign each of
them a specific address. If you use DHCP (Dynamic Host Configuration Protocol), each computer will request and get an assigned address every time it’s booted up.
Scripts
Products
MyphpFile.php
S.A.R.L au capital de 500 100 Euro Siret : 444.396.519.00027 APE : 4669A TVA intracom : FR-35444.396.519
Using Static IPs prevents address conflicts between devices and allows you to manage them more easily. First, we shall assign IPs addresses to a PC. it’s essentially the same process For all Windows OS, but the setting varies between each version in some aspects.
a) Set your Computer as a network gateway
Windows 7 or Windows 8.x
To change the computer’s IP address in Windows 7, type network and sharing into the Search box in the Start Menu and select Network and Sharing Center when it pops up. If you are in Windows 8.x it will be on the Start Screen itself.
Then, when the Network and Sharing Center opens, click on Change adapter settings. This will be the same on Windows 7 or 8.x.
S.A.R.L au capital de 500 100 Euro Siret : 444.396.519.00027 APE : 4669A TVA intracom : FR-35444.396.519
Right-click on the local adapter and select Properties.
In the Local Area Connection Properties window highlight Internet Protocol Version 4
(TCP/IPv4), then click the Properties button.
S.A.R.L au capital de 500 100 Euro Siret : 444.396.519.00027 APE : 4669A TVA intracom : FR-35444.396.519
Now select the radio button Use the following IP address and enter the same IP, Subnet mask, and Default gateway as shown in the hereunder screenshot. When you have finished click OK.
S.A.R.L au capital de 500 100 Euro Siret : 444.396.519.00027 APE : 4669A TVA intracom : FR-35444.396.519
Windows XP
To set a Static IP in XP right-click on My Network Places and select Properties.
S.A.R.L au capital de 500 100 Euro Siret : 444.396.519.00027 APE : 4669A TVA intracom : FR-35444.396.519
Right-click on the adapter you want to set the IP for and select Properties.
Highlight Internet Protocol (TCP/IP) and click the Properties button.
Now change the IP, Subnet mask, Default Gateway, and DNS Server Addresses. When you have finished click OK.
S.A.R.L au capital de 500 100 Euro Siret : 444.396.519.00027 APE : 4669A TVA intracom : FR-35444.396.519
You need to close the Network Connection Properties screen before the changes go into effect.
b) Connect your EnOcean gateway to your computer
Now you can connect the gateway directly to the PC using an RJ45 cable and connect the power supply.
c) Configure a static IP to your EnOcean gateway
Launch your favorite internet browser and go to this address http://192.168.1.115. Once the web page is loaded, click Change in the General Settings window. You can disable the DHCP client and enter IPs addresses that suits to your network. Finally once all configured, click Save Settings.
S.A.R.L au capital de 500 100 Euro Siret : 444.396.519.00027 APE : 4669A TVA intracom : FR-35444.396.519
10. Change the access codes to the web interface
Visit the web interface of the gateway, in the General Settings window, click Change. Once the changes are made, be sure to save the new settings by clicking on Save Settings.
11. Triggers Setup
Triggers are used to send messages automatically when overpassing a threshold values. Triggers can be set by using Zapier services
Go to www.zapier.com and sign in. (Create a free account if you don’t have one)
Click the button to
Create a Trigger Service (left side of zap) a ‘Web Hook’ - then select ‘Catch Hook’
Choose the ‘Action Service’ side of your Zap. This could be anything but an email is a good way to test things out.
S.A.R.L au capital de 500 100 Euro Siret : 444.396.519.00027 APE : 4669A TVA intracom : FR-35444.396.519
Click continue, you will be given a webhook URL. Copy this URL and keep it hand.
Keep this tab open, and return to the Xively workbench. We’re going to come back here in a
minute.
12. Setup a Xively Trigger to Activate Zapier
Go to the Xively device that you would like to create a Trigger for
On the Xively workbench, click
Add the details of the trigger that will activate your Zapier action.
Paste the URL of the Zapier webhook as the HTTP POST URL. This will arrange for the Xively
trigger to be sent to Zapier.
S.A.R.L au capital de 500 100 Euro Siret : 444.396.519.00027 APE : 4669A TVA intracom : FR-35444.396.519
The trigger is set up!
13. Connecting Xively to Zap
Go back to Zapier, click continue twice.
There are options to filter the JSON coming from Xively. This can be very useful if you want
to send the entire Xively Post. If you are just looking for a few data values, go to the next
step.
Next you shall fill in the details of the interaction you desire, this can vary greatly depending
on what the other side of your Zap is. Some Zaps require additional setup, authorization,
and/or API keys.
In the body of your mail you can add some fields that come from the HTTP POST. To do so click
Click twice
Return to the Xively workbench and send a test trigger
S.A.R.L au capital de 500 100 Euro Siret : 444.396.519.00027 APE : 4669A TVA intracom : FR-35444.396.519
Once Zapier found your changes, click All done!
Now you will be able to add fields in the body of your mail:
Then, to check if everything is OK click
14. Activate your Zap
S.A.R.L au capital de 500 100 Euro Siret : 444.396.519.00027 APE : 4669A TVA intracom : FR-35444.396.519
At the end, do not forget activating your Zaps in your dashboard. Now that you have a Xively
trigger activating a Zapier zap, try out few new ones!
You can also build an entire network of devices with triggers.
15. Firmware Update
Since the EnOcean standard evolves regularly, an update OTA (Over The Air) is proposed.
New functions and interface improvement can also be proposed.
To update your firmware just click on "Update Firmware". If your system is up to date, you will see the message below. Otherwise the message will warn you of updates that will be made.
During the update, do not disconnect the power supply and the internet connection. The duration of the update depends on your Internet connection and will end once the red and green LEDs stop blinking.
16. External antenna
The power emitted by an EnOcean chipset is very low (1 mW), this allows emitting to a range of up to 25m indoor. A wip antenna located inside should be sufficient in most cases. However, if the signal is too low you can add an external antenna and increase the range of your EnOcean modules.
S.A.R.L au capital de 500 100 Euro Siret : 444.396.519.00027 APE : 4669A TVA intracom : FR-35444.396.519
Annex 1: PHP file example (Private server)
<?php
/***********************************/ /* CHANGE THESE PARAMETERS */ /***********************************/
$host = "localhost"; $login = "db-login"; $psw = "db-password"; $database = "db-name"; $port = "3306";
/***********************************/ /* CHANGE NOTHING BELOW THIS LINE */ /***********************************/
$queryCreateUsersTableFirstPart = "CREATE TABLE IF NOT EXISTS `";
$queryCreateUsersTableSecPart = "` (
`Index` int(255) NOT NULL AUTO_INCREMENT, `ID` varchar(10) CHARACTER SET ascii NOT NULL, `Location` varchar(60) CHARACTER SET ascii NOT NULL, `TimeDate` datetime NOT NULL, `Value` float NOT NULL, PRIMARY KEY (`Index`) ) ENGINE=InnoDB";
/* create a connection */
$mysqli = new mysqli($host,$login,$psw,$database,$port);
/* check connection */
if (mysqli_connect_errno()) {
printf("Connect failed: %s\n", mysqli_connect_error()); exit(); }
/* grabbing from an HTTP GET or HTTP POST */
$json = file_get_contents("php://input");
/* use json_decode to create object from json */
$json_o=json_decode($json);
/* object method /*
foreach($json_o->datastreams as $DataStream)
{ /* parse first values */ $table = $DataStream->alias; $Location = $DataStream->location; $Id = $DataStream->id;
/* create table if not exist */ $mysqli­>query($queryCreateUsersTableFirstPart.$table.$queryCreateUsersTableSecPart);
/* fill in the table */ foreach($DataStream->datapoints as $DataPoints) { $mysqli->query("INSERT INTO `".$table."` (`Index` ,`ID` ,`Location`
,`TimeDate` ,`Value`)VALUES (NULL , '".$Id."', '".$Location."', '".$DataPoints-
>at."', '".$DataPoints->value."')"); } }
/* close connection */
$mysqli->close();
?>
S.A.R.L au capital de 500 100 Euro Siret : 444.396.519.00027 APE : 4669A TVA intracom : FR-35444.396.519
Annex 2: Request body example (Private server)
{
"version":"1.0.0", "datastreams":[
{
"alias":"test-PM10", "location":"Paris", "id":"FFCDE615", "datapoints":
[ {"at":"2015-03-18T15:56:22Z","value":"193"}, {"at":"2015-03-18T15:56:33Z","value":"197"}
] }, {
"alias":"test-PM2_5", "location":"Paris", "id":" FFCDE615", "datapoints":
[
{"at":"2015-03-18T15:56:22Z","value":"189"},
{"at":"2015-03-18T15:58:03Z","value":"184"}
] }, {
"alias":"test-PM1", "location":"Paris", "id":" FFCDE615", "datapoints":
[
{"at":"2015-03-18T15:56:22Z","value":"167"},
{"at":"2015-03-18T15:58:03Z","value":"162"}
] }
]
}
Loading...