Digi X4K-Z1U-00011-A1 Скачать руководство пользователя страница 44

iDigi

 

Gateway

 

Development

 

Kit

 

Getting

 

Started

 

Guide

    

 

44

 

 

10.

 

Click

 

on

 

the

 

"POST

 

/ws/sci

 

200”

 

response

 

text

 

to

 

view

 

the

 

entire

 

response

 

from

 

the

 

ConnectPort

 

X4,

 

as

 

well

 

as

 

the

 

request

 

that

 

was

 

sent

 

to

 

generate

 

this

 

response.

 

The

 

channel_dump

 

response

 

shows

 

the

 

current

 

usage,

 

brightness,

 

power

on

 

state,

 

and

 

temperature

 

readings

 

from

 

the

 

rpm0

 

(XBee

 

Smart

 

Plug)

 

device,

 

and

 

the

 

brightness,

 

battery

 

condition,

 

and

 

temperature

 

reading

 

from

 

the

 

sensor0

 

(XBee

 

Sensor)

 

device.

 

 

Figure

 

47:

 

Successful

 

Callback

 

Expanded

 

View

 

 
 
 

You

 

have

 

just

 

completed

 

Goal

 

#4:

 

Using

 

the

 

iDigi

 

Manger

 

Pro

 

Web

 

Services

 

Console

 

to

 

send

 

a

 

web

 

services

 

request

 

to

 

the

 

ConnectPort

 

X4,

 

retrieving

 

the

 

current

 

XBee

 

devices’

 

sensor

 

readings.

 

 

Downloaded from 

Elcodis.com

 

electronic components distributor

 

Содержание X4K-Z1U-00011-A1

Страница 1: ...iDigi Gateway Development Kit Getting Started Guide December 16 2010 90001205 _A Downloaded from Elcodis com electronic components distributor...

Страница 2: ...is subject to change without notice and does not represent a commitment on the part of Digi International Digi provides this document as is without warranty of any kind either expressed or implied inc...

Страница 3: ...ren Road East Minnetonka MN 55343 U S A World Wide Web http www digi com support Telephone US 952 912 3444 or 877 912 3444 Telephone other locations 1 952 912 3444 or 877 912 3444 Conventions used in...

Страница 4: ...n Development Environment 14 Step 5 Create your first iDigi Dia Project 17 Step 6 Perform an iDigi Web Services API Request 38 Step 7 Using the iDigi Gateway Development Kit Demonstration Application...

Страница 5: ...ng Started Guide 5 Is the ASSC LED blinking green 60 iDigi Manager Pro does not discover your ConnectPort X4 61 iDigi Manager Pro lists the ConnectPort X4 as Disconnected 63 Downloaded from Elcodis co...

Страница 6: ...onsole to send a web service request to the ConnectPort X4 retrieving the current XBee devices sensor readings 5 Use the iDigi Gateway Development Kit Demonstration Application to understand how an En...

Страница 7: ...ice Discovery Application For proper kit configuration and operation the Digi Device Discovery Application must be downloaded and installed To download the Digi Device Discovery Application 1 Navigate...

Страница 8: ...you are unable to do this other devices might join the kit network and create interference when deploying your iDigi Dia project You could also encounter issues connecting the XBee Sensor and XBee Sm...

Страница 9: ...ciated with an XBee network 5 Remove the batteries 3 from the box and install them into the XBee Sensor unscrew the two screws on the XBee Sensor to install the batteries The XBee Sensor s ASSC LED wi...

Страница 10: ...red and wireless Digi and third party Gateways called iDigi devices The iDigi platform provides easy integration with M2M and mesh network devices First before you can connect your ConnectPort X4 to i...

Страница 11: ...ogin Page Continue filling in all required fields of the iDigi Registration Form until you complete the iDigi Registration process Figure 6 New User Registration Page d After completing the iDigi Regi...

Страница 12: ...ices on your network automatically the Add Devices applet requires Java Runtime Environment JRE 1 6 or newer If Java Runtime Environment JRE 1 6 is not installed you must add your device manually see...

Страница 13: ...tPort X4 should now appear as Connected Figure 8 iDigi Device Inventory Note If the device still appears as Disconnected after clicking the Refresh button please refer to the iDigi Manager Pro lists t...

Страница 14: ...for Python Development Environment 1 Navigate to http www digi com gatewaydevelopmentkit and click on the Download Digi ESP for Python link 2 You will be redirected to the Python Product page The vari...

Страница 15: ...mework will launch automatically and prompt you to select a workspace directory Use the default workspace directory or click the Browse button and navigate to your desired alternate workspace location...

Страница 16: ...SP for Python the Welcome screen is displayed Figure 11 Digi ESP for Python Welcome Screen 6 Open the Digi ESP for Python Workbench by clicking on the Workbench icon as indicated above Figure 12 Digi...

Страница 17: ...s in this section will help you build download and launch your first iDigi Dia application The resulting iDigi Dia application will contain drivers for the XBee Sensor and XBee Smart Plug The applicat...

Страница 18: ...insert the name of the project to be created name your project This example uses a project name of Demo_Project1 but you can choose any unique name Once the project name has been provided click Next...

Страница 19: ...nd then click the New button to create a new remote configuration Figure 15 Create New Configuration A new Remote Device Configuration is needed to work with each specific target device your ConnectPo...

Страница 20: ...the dialog lists the Remote Configurations that exist in the Workbench b Initially there are no Remote Configurations listed in the Device Manager To begin the process of creating your first Remote C...

Страница 21: ...17 Digi Device Discovery Search Location Selection d When finished the Digi Device Discovery dialog will appear listing all the Digi devices discovered on your local network Your device should be list...

Страница 22: ...ttings configured automatically f Click Set Current to make this configuration the current one which means that the Digi ESP for Python framework will use it to perform several operations that require...

Страница 23: ...fter clicking the Set Current button you will be redirected back to the iDigi Dia Project wizard Ensure that Use Current Remote Device is selected and click Next Figure 20 Remote Device Selection Down...

Страница 24: ...2 4 3 is selected within the Python settings section and that iDigi Dia is supported then click Finish to create the project Figure 21 Remote Device s Information Note If a prompt appears asking you...

Страница 25: ...e Pydev Package Explorer view expand it to see its contents To open the Pydev Package Explorer view select Window Show View Pydev Package Explorer If Pydev Package Explorer does not appear in the list...

Страница 26: ...e project dia yml will be opened and displayed in the Smart Project Editor view It contains the iDigi Dia elements devices services etc that will be used by the iDigi Dia project Figure 24 Smart Proje...

Страница 27: ...ote For non US kits select the XBee Wall Router instead of XBee RPM 8 At this point in time the two XBee devices have been added to your project but the iDigi Dia Project Editor is missing the XBee MA...

Страница 28: ...ice Discovery Path 10 Running the Digi Device Discovery Tool will bring up the Digi Device Discovery Application Devices list Figure 27 Locate your Device in the Device List Locate your device in the...

Страница 29: ...4 Configuration and Management Home Page 11 The ConnectPort X4 s Home page contains several links Click on the XBee Network link from the left menu to access the XBee Configuration page Figure 29 XBee...

Страница 30: ...are not listed try clicking the Discover XBee Devices button to force the ConnectPort X4 to discover its attached XBee devices If this does not fix the problem see the XBee devices fail to join the C...

Страница 31: ...from the ConnectPort X4 s web UI into the MAC address field of the XBee Sensor device in the Smart Project Editor b Then copy the Extended Address of your XBee Smart Plug from the ConnectPort X4 s web...

Страница 32: ...ore often These sensor updates will allow you to see value changes more easily in the steps to follow However changing the sleep interval will impact battery life as well This is something you should...

Страница 33: ...m the menu Figure 33 Save Project 16 Now that the XBee MAC addresses have been configured your iDigi Dia project is fully configured and ready to be deployed Click the Run button on the main toolbar t...

Страница 34: ...gi Dia project builds Downloads files to your ConnectPort X4 Reboots your ConnectPort X4 in order to start the Dia application and finally starts running the Dia application on your ConnectPort X4 Fig...

Страница 35: ...he following Figure 36 Dia Web Presentation Tab The Elements section of the Smart Project Editor for iDigi Dia provides several presentations including an RCI Handler Console Port and a Web Presentati...

Страница 36: ...html Figure 37 XBee Smart Plug Power ON From this page you can turn the XBee Smart Plug off and on as well as view all the current sensor readings In order to demonstrate how this web page can contro...

Страница 37: ...anges button d To update the values displayed by the XBee devices sensors click the Refresh All button You have just completed Goal 3 Using the Digi ESP for Python IDE to build download and launch an...

Страница 38: ...Smart Plug by making a minor modification to one of the provided examples and then sending an HTTP Post request to iDigi which will respond with the current sensor readings from the sensors in your X...

Страница 39: ...this box you will select the target iDigi devices that you would like to send requests to 5 Click on the Add Targets drop down box and choose the device ID corresponding to your ConnectPort X4 Click t...

Страница 40: ...ger Pro will now send Web Services API examples to the selected device Within the Web Services Console toolbar click on the Examples drop down menu then go to SCI Python Callback Figure 43 Python Call...

Страница 41: ...rieve the sensor readings from your XBee devices you will need to modify this example text slightly a Locate the following lines of text highlighted in the screenshot below do_command target rci_callb...

Страница 42: ...equest to iDigi you will be prompted to enter your iDigi credentials enter them in the dialog provided Once authenticated iDigi will send this request to the ConnectPort X4 on behalf of your web servi...

Страница 43: ...9 Observe the output displayed within the Web Services Responses panel A POST ws sci 200 response indicates that the web services request was successful Figure 46 Successful Callback Attempt Download...

Страница 44: ...htness power on state and temperature readings from the rpm0 XBee Smart Plug device and the brightness battery condition and temperature reading from the sensor0 XBee Sensor device Figure 47 Successfu...

Страница 45: ...k you through this process 1 Navigate to http www digi com gatewaydevelopmentkit and click on the Link to iDigi Gateway Development Kit Demo Application link 2 You will be redirected to the iDigi Gate...

Страница 46: ...for the XBee Sensor and the XBee Smart Plug connected to your ConnectPort X4 s XBee network Values are updated by clicking the refresh button Every time the screen is refreshed the application also up...

Страница 47: ...sensors are reported Figure 50 XBee Sensor Display In the event that your brightness reading looks similar to the example above simply cover the light sensor on the front of the XBee Sensor and click...

Страница 48: ...application displays the current flowing through the XBee Smart Plug and the On Off state of the XBee Smart Plug Figure 52 XBee Smart Plug Display Current Flowing In the event your XBee Smart Plug dis...

Страница 49: ...ry data click the Refresh button Figure 54 Logged Data Display Off When you log in to this demonstration application Telemetry logging will start automatically and run for an hour Since the logged dat...

Страница 50: ...look similar to the following Figure 56 Logged Data Display XBee Smart Plug Off XBee Sensor Covered Waiting a few moments before turning the XBee back on and uncovering the light sensor on the XBee Se...

Страница 51: ...understand how a web services enabled Enterprise application interacts with iDigi and monitors the data gathered by the XBee device sensors Congratulations you have completed the process of setting up...

Страница 52: ...an on demand platform as a service you will only be charged for what you use Further support can be accessed through our support portal at http www digi com support kw idigi iDigi Dia Device Integrat...

Страница 53: ...Bar and explore the documents listed under the iDigi Dia Resources and iDigi Platform Resources headings Figure 59 iDigi Dia and iDigi Documentation Additional documentation can also be found on the...

Страница 54: ...ations with Python in the Eclipse platform Digi ESP for Python customizes Eclipse and PyDev to support developing specifically with Digi platforms Digi ESP for Python documentation can be found within...

Страница 55: ...itional help documentation can be located by navigating to Help Help Contents from the Digi ESP for Python framework main menu Figure 63 Help Contents Path Figure 64 Digi ESP for Python Help Section D...

Страница 56: ...Web Presentation The Web Presentation iDigi Dia project described in this guide provides details for a new web page idigi_dia html Click on the Dia Web Presentation tab to open this new web page Figur...

Страница 57: ...our ConnectPort X4 using TCP port 4146 and the iDigi Dia CLI will be presented to you Figure 67 Establish a Telnet Connection The will provide a list of the supported CLI commands and the channel_dump...

Страница 58: ...ays support the Python programming language and offer the memory space for local development This allows the gateways to function with enough local intelligence to make decisions about which events ar...

Страница 59: ...regarding the XBee Smart Plug go to http www digi com products wirelessdropinnetworking networkextenders xbee smart plug zb jsp For more information regarding the XBee Wall Router go to http www digi...

Страница 60: ...work or the ConnectPort X4 simply needs to rediscover the list of its attached XBee devices To troubleshoot this problem first try clicking the Discover XBee Devices button on the ConnectPort X4 s XBe...

Страница 61: ...dd the ConnectPort X4 to your iDigi inventory by clicking the Add Manually button and then entering the MAC address found on the bottom of the device into the appropriate field After the MAC address i...

Страница 62: ...management configuration options In the Digi configuration settings page enter the DNS name of the iDigi platform developer idigi com into the iDigi Server Address field under the Enable Device Initia...

Страница 63: ...Internet access 2 The ConnectPort X4 is unable to resolve the DNS address of developer idigi com 3 If you added the ConnectPort X4 to iDigi inventory manually the MAC address provided to iDigi may no...

Отзывы: