quick start guide - libelium€¢ thingworx app key: security key to send data to your thingworx...

25
Libelium-ThingWorx Development Kit Quick Start Guide

Upload: vanphuc

Post on 06-May-2018

225 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Quick Start Guide - Libelium€¢ ThingWorx App Key: Security key to send data to your ThingWorx server. (See section 2 for generating App Key)

Libelium-ThingWorx Development Kit Quick Start Guide

Page 2: Quick Start Guide - Libelium€¢ ThingWorx App Key: Security key to send data to your ThingWorx server. (See section 2 for generating App Key)

-2-

IoT Application Development Kit

INDEX

1. Identify the products ........................................................................................................................... 3

2. Open the box ........................................................................................................................................ 3

3. Identify Meshlium device and antennas ............................................................................................ 3

4. Antennas set up ................................................................................................................................... 4

5. Power set up ......................................................................................................................................... 4

6. Internet set up ..................................................................................................................................... 5

7. Checking data received at Meshlium ................................................................................................. 6

8. Now you can receive data ................................................................................................................... 7

9. Get Ready to send Data ....................................................................................................................... 7

10. Open the box ..................................................................................................................................... 7

11. Recharge Plug & Sense! ..................................................................................................................... 8

12. Antennas set up ................................................................................................................................. 8

13. Identify Plug & Sense! family ............................................................................................................ 9

14. Check conecction diagram .............................................................................................................. 11

15. Sensors setup ................................................................................................................................... 11

16. Connect sensors ............................................................................................................................... 12

17. Connect Solar Panel ........................................................................................................................ 12

18. Turn ON Plug & Sense! ..................................................................................................................... 13

19. Checking if data is received ............................................................................................................ 14

20. Next Steps ........................................................................................................................................ 1420.1. Generating Application Key in Thingworx ....................................................................................................................1420.2. Setting up Meshlium ............................................................................................................................................................1620.3. Communicating with ThingWorx .....................................................................................................................................2020.4. Troubleshooting ......................................................................................................................................................................25

Page 3: Quick Start Guide - Libelium€¢ ThingWorx App Key: Security key to send data to your ThingWorx server. (See section 2 for generating App Key)

-3-

IoT Application Development Kit

1. Identify the products

2. Open the box

3. Identify Meshlium device and antennas

Page 4: Quick Start Guide - Libelium€¢ ThingWorx App Key: Security key to send data to your ThingWorx server. (See section 2 for generating App Key)

-4-

IoT Application Development Kit

4. Antennas set upAntennas *

a) Dipole 5 dBi (Bluetooth, WiFi, XBee-PRO 802.15.4).

b) 4G / GPS (3 antennas for EU, US or BR models; 2 antennas for AU models).

c) Dipole 4.5 dBi (XBee 868LP, XBee-PRO 900HP).

(*) Number and type of antennas depend on the model purchased.

5. Power set up

Page 5: Quick Start Guide - Libelium€¢ ThingWorx App Key: Security key to send data to your ThingWorx server. (See section 2 for generating App Key)

-5-

IoT Application Development Kit

6. Internet set up

Wifi Access:

• Connect to Meshlium Wifi AP - Meshlium_XXXX, - no password needed

• Access Meshlium IP 10.10.10.1/MeshliumManager using a Web Browser (IE, Chrome, Firefox) - User: admin - Password: libelium

Ethernet Access:

• Access Meshlium assigned IP/MeshliumManager using a Web Browser (IE, Chrome, Firefox) - User: admin - Password: libelium

• Meshlium will use DHCP to get the IP address from your router, check in your router the IP address given.

Page 6: Quick Start Guide - Libelium€¢ ThingWorx App Key: Security key to send data to your ThingWorx server. (See section 2 for generating App Key)

-6-

IoT Application Development Kit

7. Checking data received at Meshlium

Page 7: Quick Start Guide - Libelium€¢ ThingWorx App Key: Security key to send data to your ThingWorx server. (See section 2 for generating App Key)

-7-

IoT Application Development Kit

8. Now you can receive data

9. Get Ready to send Data

10. Open the box

Page 8: Quick Start Guide - Libelium€¢ ThingWorx App Key: Security key to send data to your ThingWorx server. (See section 2 for generating App Key)

-8-

IoT Application Development Kit

11. Recharge Plug & Sense!

12. Antennas set up

Page 9: Quick Start Guide - Libelium€¢ ThingWorx App Key: Security key to send data to your ThingWorx server. (See section 2 for generating App Key)

-9-

IoT Application Development Kit

13. Identify Plug & Sense! family

Smart Environment Ambient ControlSmart Environment PRO

Smart Agriculture Smart Cities PRO

Page 10: Quick Start Guide - Libelium€¢ ThingWorx App Key: Security key to send data to your ThingWorx server. (See section 2 for generating App Key)

-10-

IoT Application Development Kit

Smart Water

Smart Security

Smart Parking Radiation Control

4-20 mA Current Loop

Smart Water Ions

Page 11: Quick Start Guide - Libelium€¢ ThingWorx App Key: Security key to send data to your ThingWorx server. (See section 2 for generating App Key)

-11-

IoT Application Development Kit

14. Check conecction diagram

15. Sensors setup

Page 12: Quick Start Guide - Libelium€¢ ThingWorx App Key: Security key to send data to your ThingWorx server. (See section 2 for generating App Key)

-12-

IoT Application Development Kit

16. Connect sensors

17. Connect Solar Panel

Page 13: Quick Start Guide - Libelium€¢ ThingWorx App Key: Security key to send data to your ThingWorx server. (See section 2 for generating App Key)

-13-

IoT Application Development Kit

18. Turn ON Plug & Sense!

Page 14: Quick Start Guide - Libelium€¢ ThingWorx App Key: Security key to send data to your ThingWorx server. (See section 2 for generating App Key)

-14-

IoT Application Development Kit

19. Checking if data is received • Access to Meshlium as explained before in page 5-6. • To check that your Plug & Sense! is sending data, see the ID_Wasp. The ID_Wasp of each Plug & Sense! can be found in the

details sticker.

20. Next StepsCheck the following instructions for setting up Meshlium working with the ESRI platform.

20.1. Generating Application Key in ThingworxAn application key is the authentication that you use to send or receive data from your Thing. It is associated with a ‘tag’ that is common to all of the components of your thing. To create the key first get to the home page of your ThingWorx Composer.

• Under the “Security” heading on the left click on “Application Keys.”

Page 15: Quick Start Guide - Libelium€¢ ThingWorx App Key: Security key to send data to your ThingWorx server. (See section 2 for generating App Key)

-15-

IoT Application Development Kit

• Next, click on the “New” button towards the top of the screen. Fill in the required fields

• Now, create a tag by clicking on the wand next to tags. Either choose an existing tag or create a new one. The tag ties your application key to all the components of your Thing.

• After selecting a tag click Save at the top and you will see that an Application Key has populated the “keyId” field.

Page 16: Quick Start Guide - Libelium€¢ ThingWorx App Key: Security key to send data to your ThingWorx server. (See section 2 for generating App Key)

-16-

IoT Application Development Kit

20.2. Setting up MeshliumIn a web browser, you have to access to the Manager System with the IP your Meshlium has assigned.

If you are connected to the Meshlium WiFi Access Point, the IP will be 10.10.10.1. On the other hand, if you are connected to the Ethernet network, you will have to be able to identify the IP your Meshlium has assigned by DHCP in order to access to the Manager System. If your network does not offer DHCP service, Meshlium starts with a default IP (192.168.1.100)

The default credentials are:

• URL: http://<your_ip>/ManagerSystem • user: root • password: libelium

Page 17: Quick Start Guide - Libelium€¢ ThingWorx App Key: Security key to send data to your ThingWorx server. (See section 2 for generating App Key)

-17-

IoT Application Development Kit

20.2.1. ESRI online service setup

In the Cloud Connector section, inside M2M Platform group, clicking on ThingWorx icon, we can see the form in which we can configure all parameter to connect and send the information to the platform.

The parameters to setup are:

• Server address: The address of your ThingWorx server. • Server Port: The port where your ThingWorx server is accessible. • Meshlium bind name: The name of the Meshlium “thing” in ThingWorx. Meshlium thing is detected in ThingWorx but

won’t send any data. • ThingWorx App Key: Security key to send data to your ThingWorx server. (See section 2 for generating App Key)

Click on the “Save” button to write this setup to the ThingWorx service.

20.2.2. Waspmote P&S! Configuration

The next step is configure all Waspmotes you have in Meshlium in order to send the selected information to ThingWorx:

• Click on the button “Get WM fromDB”. This will read Waspmotes that have data in the sensor database.

• Click on the button “Show Waspmotes” to display the devices.

• A panel with the devices is displayed, with a list of the sensors received from each Waspmote.

Page 18: Quick Start Guide - Libelium€¢ ThingWorx App Key: Security key to send data to your ThingWorx server. (See section 2 for generating App Key)

-18-

IoT Application Development Kit

• It is possible to delete a Waspmote from the list clicking on its “Delete” button. This device won’t be published to the ThingWorx platform.

• Once the list is correct, clicking on the button “Write ThingWorx setup” will push this setup to theThingWorx EMS service.

Page 19: Quick Start Guide - Libelium€¢ ThingWorx App Key: Security key to send data to your ThingWorx server. (See section 2 for generating App Key)

-19-

IoT Application Development Kit

Finally, we’ll start EMS and LUA Script processes by clicking on “Start” button in both sections.

Page 20: Quick Start Guide - Libelium€¢ ThingWorx App Key: Security key to send data to your ThingWorx server. (See section 2 for generating App Key)

-20-

IoT Application Development Kit

20.3. Communicating with ThingWorxOnce LUA and EMS daemons are running, we can access to the Thingworx platform (“Monitoring” → “Remote Things”), we will see the EMS gateway published with the same name written in the parameter Meshlium bind name in the configuration form of Meshlium.

Page 21: Quick Start Guide - Libelium€¢ ThingWorx App Key: Security key to send data to your ThingWorx server. (See section 2 for generating App Key)

-21-

IoT Application Development Kit

20.3.1. Publishing Waspmote P&S! Remote Things

If we hit on the Unbound tab, we’ll see all the Waspmote devices we’ve configured previously.

The next step is creating a “New thing” in the ThingWorx Composer backend.

Page 22: Quick Start Guide - Libelium€¢ ThingWorx App Key: Security key to send data to your ThingWorx server. (See section 2 for generating App Key)

-22-

IoT Application Development Kit

The “New thing” must be created with exactly the same value in the field “Name” than the text string shown in the “Unbound” tab (column “Name”).

If we create new things this manner they will be automatically associated to the Waspmote things published by Meshlium EMS GW.

Furthermore, the “RemoteThing” template must be set to this “New thing”.

20.3.2. Publishing Waspmote P&S! Sensor Values

If we’ve created the Waspmote Remote Thing (WRT) successfully, now it’s time to bind Sensors to this Waspmote. To perform this action we’ll edit the Waspmote Remote Thing properties.

Navigate to “Manage Bindings” tab.

Page 23: Quick Start Guide - Libelium€¢ ThingWorx App Key: Security key to send data to your ThingWorx server. (See section 2 for generating App Key)

-23-

IoT Application Development Kit

Navigate to “Remote” tab to show the Sensors available in this Waspmote Remote Thing. Publishing Sensors in Thingworx platform is as easy as Drag&Drop the properties that you want to add.

Hit on “Save” button to finish configuration.

After saving the new properties they will be loaded in the Properties table of the Remote Thing being edited.

Page 24: Quick Start Guide - Libelium€¢ ThingWorx App Key: Security key to send data to your ThingWorx server. (See section 2 for generating App Key)

-24-

IoT Application Development Kit

Finally, in order to get sensor values updated we need to perform following actions:

• Click on the pencil icon located in the first column of the table in the Remote Binding Info section:

• Select “Cache options” to “Fetched from Remote Every Read” • Select “Push type” to “Always Pushed” • Hit on the “Done” button.

Each sensor values are shown in the Properties table. Click on the refresh button located in the ‘top-right’ header of the table to force updating all values of the table.

Repeat this procedure for all remote things shown in the Unbound tab.

Page 25: Quick Start Guide - Libelium€¢ ThingWorx App Key: Security key to send data to your ThingWorx server. (See section 2 for generating App Key)

-25-

IoT Application Development Kit

20.4. Troubleshooting

Problem Solution(s)

1 New sensor has been added to a previously published Waspmote Remote Thing.

If you had configured your Waspmote previously and your Waspmote sensor list has changed, stop LUA and EMS processes and repeat all steps described in “Setting up the Meshlium” section in order to update your templates in Thingwox platform. Finally repeat “Publishing Sensor Values” subsection of “Communicating with Thingworx” section.

2 Some sensor values are not updated.Repeat all steps described in “Setting up the Meshlium” section and “Publishing Sensor Values” subsection of “Communicating with Thingworx” section.

3 New Waspmote node has been added to the Meshlium Repeat all steps described in “Setting up the Meshlium” section and “Communicating with Thingworx” section.