
ÓÐÈËÔƶþ´Î¿ª·¢µ÷È¡ÃüÁîÏ·¢½Ó¿Ú
Ò»¡¢×ÊÁÏ×¼±¸£º
ÓÐÈËÔÆÍøÖ·£ºhttp://cloud.usr.cn/
¶þ´Î¿ª·¢Îĵµ£ºhttp://cloud.usr.cn/document/237.html
¶þ¡¢×¢Ò⣺
1¡¢¿Í‘ô¿ÉÒÔͨ¹ýhttpÇëÇóÏòÉ豸Ï·¢Êý¾Ý£¬Ä¿Ç°½öÖ§³ÖÊý¾ÝµãÊý¾ÝºÍ͸´«Êý¾ÝµÄÏ·¢
2¡¢Ã¿¸ö¿Í‘ôÿÃë×î¶àÏ·¢10ÌõÊý¾Ý£¬³¬³ö²¿·ÖµÄÊý¾Ý£¬·þÎñÆ÷²»´¦Àí²¢·µ»Ø´íÎóÂë
3¡¢½øÐжþ´Î¿ª·¢Ê±ÐèÒª½«Ê¹ÓõÄÉ豸ÔÚÏß
4¡¢³ÌÐò£º
£¨1£©Í¨¹ý¿Í‘ôµÇ½½Ó¿Ú»ñÈ¡token
£¨2£©»ñÈ¡ÍÆË͵Äurl,»ñÈ¡ÃüÁîÏ·¢µØÖ·,×¢:¸Ã½Ó¿ÚÓÐƵÂÊÏÞÖÆ,»ñÈ¡Ò»´Îºó¿ÉÖظ´Ê¹ÓÃ,²»ÐèƵ·±»ñÈ¡
£¨3£©°´Õսӿڹ淶ÍÆËÍÃüÁîÊý¾Ý
Èý¡¢¾ßÌå²Ù×÷»·½Ú£º
1¡¢ÔÚ½Ó¿ÚÎĵµÖÐÕÒµ½¿Í‘ôµÇ¼½Ó¿Ú£¨¶þ´Î¿ª·¢-API-¿Í‘ô-¿Í‘ôµÇ¼£©
½«ÇëÇóURLºÍÇëÇó·½Ê½Ìîµ½postmanÖÐ
2¡¢ÔÚheadersÖÐÌí¼ÓContent-TypeÇëÇó²ÎÊý£¬ÖµÎªapplication/json
3¡¢½«ÇëÇóʾÀý´óÀ¨ºÅÖеÃÊý¾Ý¸´ÖƵ½bodyµÄrawÖÐ
accountÖÐÌîÓÐÈËÔÆÕ˺ţ¬passwordÖÐÌîÓÐÈËÔÆÃÜÂëmd5¼ÓÃÜÖ®ºóµÄÃÜÂë
ÉèÖÃÍê³Éºóµã»÷Send£¬»ñÈ¡Éú³ÉµÄtoken
4¡¢ÔÚ¶þ´Î¿ª·¢Îĵµ½çÃæ´ò¿ª»ñÈ¡ÃüÁîÏ·¢µØÖ·£¨¶þ´Î¿ª·¢-ÃüÁîÏ·¢-ʹÓÃÎĵµ-»ñÈ¡ÃüÁîÏ·¢µØÖ·£©
5¡¢½«ÃüÁîÏ·¢µÄÇëÇó·½Ê½ºÍÇëÇóURLÌîÈëpostmanÖÐ
ÔÚheadersÖÐÌí¼ÓContent-TypeºÍtoken£¬Öµ·Ö±ðΪapplication/jsonÒÔ¼°¸Õ¸Õ»ñÈ¡µ½µÄtoken
Éú³ÉµÄtokenÁ½Ð¡Ê±ÄÚÓÐЧ
6¡¢½«ÇëÇóʾÀý¸´ÖƵ½bodyµÄrawÖУ¬Ö®ºóµã»÷Send£¬»áÉú³ÉÒ»¸öÁ´½Ó£¬Õâ¸öÁ´½ÓÊÇÃüÁîÏ·¢µØÖ·
7¡¢¶þ´Î¿ª·¢Îĵµ´ò¿ªÃüÁîÏ·¢½çÃ棨¶þ´Î¿ª·¢-ÃüÁîÏ·¢-ʹÓÃÎĵµ£©
ÃüÁîÏ·¢µÄ½Ó¿ÚÀàÐÍΪpost£¬ÐÒéÀàÐÍΪhttps
½«¸Õ¸ÕÉú³ÉµÄÃüÁîÏ·¢µØÖ·¸´ÖƵ½Ð½¨µÄ´°¿ÚµÄURLÖУ¬ºó±ß¼ÓÉÏ/v1.0/{type}/{deviceId}
ÆäÖÐtype: dataPoint»òtransmission(dataPoint:±äÁ¿Êý¾Ý,transmission:͸´«Êý¾Ý)£»deviceId:É豸sn
8¡¢ÔÚheadersÖÐÌí¼ÓContent-TypeºÍtoken£¬Öµ·Ö±ðΪapplication/jsonÒÔ¼°¸Õ¸Õ»ñÈ¡µ½µÄtoken
Éú³ÉµÄtokenÁ½Ð¡Ê±ÄÚÓÐЧ
9¡¢ÔÚbodyÖÐÌîÈëʾÀýÖеĴúÂë
Êý¾Ý͸´«µÄ»°ÌîÈë"data":"YWJjZGVmZw=="£¬ÆäÖÐdataÖеÄÊý¾ÝΪ͸´«µÄÊý¾Ý£¨Êý¾ÝתΪbase64´«Êä,×î´ó³¤¶ÈΪ8000¸ö×Ö·û£©
×é̬Êý¾ÝµÄ»°£¬slaveNameΪ´Ó»úÃû³Æ£¬variableNameΪ±äÁ¿Ãû³Æ£¬valueΪÊý¾Ý±¾Éí
10¡¢Èç¹û·µ»Ø200£¬ÔòÖ¤Ã÷½Ó¿ÚÏ·¢³É¹¦