Ali cloud IoT + YF3300 [5]. Alink was issued under the model of service

Glossary:

        Service: One of the functions of the device model, device capability, or may be an external method is invoked, you can set the input and output parameters. Compared to the properties, more complex services may be implemented by a service logic instructions, such as performing a particular task. - Excerpt from Ali cloud Things product documentation.

        Conceptually 1991 Professor Kevin Ash-ton States first proposed the Massachusetts Institute of Internet of things, things to today's major cloud platform flowers. Things have been very optimistic about the prospects, but in such a thriving background, hidden costs (implementation costs and maintenance costs) is more and more prominent. Things floor implementation project has been far from the industrial era practice for two reasons: 1 Things project implementation requires a high speed; 2 overall cost sensitive... How to achieve quality industrial project in the case of such a high demand, the key is how to reduce the hidden costs. Alink was issued under the model of service, take you to experience how remote implementation and maintenance.

I. cloud configuration

(1) Things landing Ali cloud platform

(2) In the Device Manager options to create a product

(3) Example

(4) view the product, created the model properties of matter. View product details, select the function definition , self-defined attributes and add custom services added

a. add custom properties, create a template, see Figure 1-1

b. Custom services added. Currently supports two types of service, service parameters and control services, create events including defining the service identifier and the name of the input and output parameters. (According to YFIOs Service Engine define rules: 1 parameter service is identifier must be Server_Parameter_Device , control service of the identifiers must Server_Control_Device invocation. Is asynchronous .2 Each event has two input parameters and two output parameters :(. input parameters: command word and parameter information command (command) is a text (character string) , a data length of 32 bytes; parameter information (parameter) is a text (character string), 1024 bytes of output parameters: execution status and state described . execution state (state) as Int32 (integer) in the range from -100 to 100 in steps of 1, no units, state description (info) is a text (character string), a data length of 256 bytes. ) create a template, see Figure 1-2

 

 Figure 1-2

 

(5) In the new product, the device name must be a Test, and save the associated device certificate (ie equipment triples Productkey, DeviceName, DeviceSecret)

A. Devices are connected

    Operating environment set up: Win7 system, please download the device driver, download address is: Please install the VS2010 / VS2015 and expand the package

Prepare materials: YF3300 equipment package, the configuration key (when purchasing goods manufacturers will be bundled month trial version) official download YFIOsManager configuration management software. Download Link:

http://www.yfiot.com/content/downsort?current=1&title=1  

         Device connection:. A key is inserted into the computer configuration, connect the antenna comes with GPRS, insert the card comes with Things (IOT card can also be used to buy their own)

                            b. Place YF3300 by Type-C connected to the computer.

        Device Configuration:

(1) Open the downloaded YFIOsManager software, select USB connection, connection YF3300

(2) the user equipment new equipment

Click New in driver support, select the other series YFSoft (leaf sail technology) YF3300 official driver in. The device name for the cloud DeviceName ( the Test )

(3) Configure a new attribute data (Test: T)

 

(4) Click Save Project and save custom configuration project

(5) in the list of policies created in the policy, select the policy file SYS > Ali cloud MQTT client (Lite) . Service Configuration fill in the appropriate place equipment triplets, fill the product key, the service will automatically change the address, scan interval can be changed, you can check the upload changes

(6) In the list of policies created in the policy, select the policy file SYS > Ali cloud services issued (example version)

(7) In the debug deployment YFIOs system options, select Lite (cloud) , after the deployment is complete, click on the deployment of a button, the deployment of drivers and policy creation and choose a system reboot , according to the local network, the wait for 5 ~ 10s, communication lights Always , the device communicates with the cloud success. YFIOsManager can also monitor the process on the cloud, appeared the MQTT Connect the OK !!!     , cloud-proven and successful communication equipment.

Third, the service issued under demo

(1) Open Ali cloud platform , click on the monitoring operation and maintenance, to enter the in-circuit debugger.

(2) select the corresponding product name and device name, select the real device debugging, the debug function corresponding to the selected service name, json input character string corresponding to the input box below, select the transmission instruction, issued to complete the service.

                     The issuance control services and service parameters

                      Description: Example 1 edition strategy supports two command control services

A. lights instructions

Json string content

{

“command”:”Open”,

“parameter”:”1”

}

 

B. instruction lights

Json string content

{

“command”:”Close”,

“parameter”:”0”

}

Feedback issued under the service:

Configuration end:

Device side: according to the instruction to determine the status of the lamp blinking state whether to send the success

                     Ali cloud:

2. Sample version strategy supports a command parameter service

Temperature calibration instructions

Json string content

{

"Command": "Temperature Calibration",

"Parameter": "30", // here to fill any temperature value (-100 ~ 100)

}

Service issued feedback:

Configuration end:

 Also see whether the temperature data corresponding to the calibration data in the data monitoring

 Ali cloud:

Want to experience Ali cloud IoT platform users can click on the following link:

https://dev.iot.aliyun.com/sale?source=deveco_partner_yefan

Guess you like

Origin www.cnblogs.com/yefanqiu/p/11459418.html