Intel Edison Intel IoT Analytics Cloudとの連携:データのログと送信

クラウドIoT



この記事では、データ収集とデバイス管理のためのIntel IoT Analyticsクラウドについて簡単に説明します。 クラウドを使用した実践的な作業は、Intel Edisonの例( Intel Edison。最初の起動 )で検討されています。



デバイスがネットワークと対話できる必要がなかった時代は終わりました。 管理、監視は、すぐ近くだけでなく、リモートでも実行できるようになりました。 インターネット経由でデータを受信し、デバイスを管理する必要がありました。 現時点では、多数のデバイスがすでに開発されており、それらを個別に管理することはかなり難しいタスクであることが証明されています。



統合には、デバイスを操作するための中間層である、普遍的な中間体が必要でした。 そのため、新しいタイプのMachine-to-Cloud(M2C)インタラクション、つまりデバイスとクラウドのインタラクションが登場しました。



デバイスは、標準化されたプロトコルを使用してクラウドと対話します。 クラウドは、データ収集、ストレージ、および管理のすべてのロジックを実装します。 また、コマンドをデバイスに送信して制御することもできます。 クラウドは、互いに異なるさまざまなデバイスの普遍的な「接着剤」です。 ユーザーは、WebインターフェイスまたはパブリックAPIを介してクラウドと対話します。 以下では、 Intel IoT Analyticsクラウドと、Intel Edisonがクラウドと対話する方法について説明します。



現在、クラウドはベータモードです。

Intel IoT Analyticsクラウドの機能には以下が含まれます。



クラウドは、RESTプロトコルを使用してデバイスと通信します。 そのため、イーサネットとSSLをサポートするすべてのデバイスのクラウドで作業を提供できます(すべてのデータは暗号化された形式でのみ送信されます)。 ポータルhttp://dashboard.us.enableiot.comは、最低限のデータ表示とデバイス管理を提供します。 開発者は、RESTプロトコルを使用してダッシュボードとデバイスを制御し、Intel IoT Analyticsクラウドからデータを受信できます。



デバイスへのコマンドは、 WebSocketおよびMQTTプロトコルを介して送信されます。 ほとんどのデバイスにはパブリックIPアドレス(ITUまたはNATの背後にある)がないため、WebSocketを使用してデバイスにコマンドを送信します。



Intel EdisonからのデータはWi-Fi経由で送信されます。



データ構造の作成

デバイスとデータを交換するには、2種類のコンポーネントが使用されます。



センサーまたは制御コンポーネントを作成する前に、 コンポーネントタイプを作成する必要があります



コンポーネントのタイプは以下を説明します。



ポータルでは、温度、湿度、スイッチなどのいくつかの基本的なタイプがすでに作成されています。 各タイプには独自のバージョンがあります。 タイププロパティを変更すると、バージョンに+0.1が追加されます。 つまり Temperature V1.0タイプの下限値を設定すると、新しいバージョンV1.1が自動的に作成されます。



センサーはデバイスに関連付けられており、デバイスは管理アカウントでポータルに接続されます。



管理者アカウントは、 http://dashboard.us.enableiot.comポータルで作成されます。 また、管理者は他の人のデータにアクセスするために、表示のみと管理者の2種類のアカウントを作成できます。



一意のIDを持つIntel Edisonデバイスがポータルに登録されます。 デバイスごとに、追加の属性フィールドが設定されます。 複数のデバイスが存在する場合があります。 コンポーネントは各デバイスに接続されます。 コンポーネントは、データをクラウドまたは制御オブジェクトに送信するためのセンサーです。



概念的には、データ構造は次のようになります。

Intel IoT Analytics



コンポーネントごとに、そのタイプが決定されます。

Intel IoT Analytics



データの送受信はJSON形式で実行されます

例:



POST dashboard.us.enableiot.com/v1/api/data:deviceId

{

"accountId": ”",

"data": [

{

"componentId": ”",

"on": 1412456872000,

"value":"1.23"

}

],

"on": 1412456872000

}



Intel Edison. . : , , .



:





Intel IoT Analytics. Intel Edison Arduino-

Intel IoT Analytics.

1. Intel IoT Analytics. OAuth:



Intel IoT Analytics



2. :



Intel IoT Analytics



3. . :



Intel IoT Analytics



4. . Account . .



Intel IoT Analytics



5. Temperature :



Intel IoT Analytics



0, 40:



Intel IoT Analytics



. , .



Intel IoT Analytics



6. Add a New Catalog Item . .



, meteovesti.ru. , , 31 1968 812,4 ... ( ) 2 1935 -, 669,3 ...



:

1 [] = 7.50063755419211E-03 (0°C) [ ..]

[] 669,3 ... / 0,0075 = 89 240

[] 812,4 ... / 0,0075 = 108 320



:



Intel IoT Analytics



7. - . . 0 - . 100 - .



Float Integer, Percentage. .



Intel IoT Analytics



, .



Intel Edison

Intel Edison Intel Edison. .



Intel Edison , Linux. Agent from the IoT GitHub site. .. WebSocket



Wi-Fi, Intel Edison . .



Intel Edsion , Wi-Fi

PuTTY, Edison. MicroUSB Intel Edison, . , PuTTY.



PuTTY, “Serial” “COM11”, “115200”.

, Enter, .

“root”.



Intel IoT Analytics



Intel Edison

Intel Edison, . Flashing Intel Edison (wired) - Windows.



2. :

# configure_edison --setup

2.1 . 8 -32 :



Intel IoT Analytics



2.2 Intel Edison, - edison_habr( 5 ), Wi-Fi:



Intel IoT Analytics



2.3 10 . :



Intel IoT Analytics



5 - “FSB”:



2.4 IP DHCP:



Intel IoT Analytics



2.5 192.168.1.44 :



Intel IoT Analytics



.



3. iotkit:



# iotkit-admin test



Intel IoT Analytics



.



4. ID .



# iotkit-admin device-id



Intel IoT Analytics



ID :



# iotkit-admin set-device-id YOUR_DEVICE_ID



5.

5.1 dashboard.us.enableiot.com, My account , Details

Activation Code :



Intel IoT Analytics



5.2 Intel Edison :



# iotkit-admin activate [ ]



Intel IoT Analytics



5.3 dashboard.us.enableiot.com, Devices. Intel Edison.



Intel IoT Analytics



, . Status - active.



Intel IoT Analytics



6.

6.1 # iotkit-admin register [_] [_]. :

# iotkit-admin register temperature1 temperature.v1.1

# iotkit-admin register pressure1 pressure.v1.0

# iotkit-admin register moisturevalue1 moisturevalue.v1.0



Intel IoT Analytics



iotkit-admin observation, - 21:



# iotkit-admin observation temperature1 21



6.2 :



Intel IoT Analytics





# systemctl start iotkit-agent -

# systemctl stop iotkit-agent -

# systemctl restart iotkit-agent -

# systemctl status iotkit-agent -



Arduino-

, Arduino .



iotkit-agent:



Intel Cloud, <../Wire/Wire.h> Arduino arduino.cc, IoTkit, aJSON, iotkit-samples.



:

#include <IoTkit.h> // include IoTkit.h to use the Intel IoT Kit

#include <Ethernet.h> // must be included to use IoTkit

#include <aJSON.h>



IoTkit:



// create an object of the IoTkit class IoTkit iotkit;




           POST dashboard.us.enableiot.com/v1/api/data:deviceId 
      

{

"accountId": ”",

"data": [

{

"componentId": ”",

"on": 1412456872000,

"value":"1.23"

}

],

"on": 1412456872000

}



Intel Edison. . : , , .



:

Intel IoT Analytics. Intel Edison Arduino-

Intel IoT Analytics.

1. Intel IoT Analytics. OAuth:



Intel IoT Analytics



2. :



Intel IoT Analytics



3. . :



Intel IoT Analytics



4. . Account . .



Intel IoT Analytics



5. Temperature :



Intel IoT Analytics



0, 40:



Intel IoT Analytics



. , .



Intel IoT Analytics



6. Add a New Catalog Item . .



, meteovesti.ru. , , 31 1968 812,4 ... ( ) 2 1935 -, 669,3 ...



:

1 [] = 7.50063755419211E-03 (0°C) [ ..]

[] 669,3 ... / 0,0075 = 89 240

[] 812,4 ... / 0,0075 = 108 320



:



Intel IoT Analytics



7. - . . 0 - . 100 - .



Float Integer, Percentage. .



Intel IoT Analytics



, .



Intel Edison

Intel Edison Intel Edison. .



Intel Edison , Linux. Agent from the IoT GitHub site. .. WebSocket



Wi-Fi, Intel Edison . .



Intel Edsion , Wi-Fi

PuTTY, Edison. MicroUSB Intel Edison, . , PuTTY.



PuTTY, “Serial” “COM11”, “115200”.

, Enter, .

“root”.



Intel IoT Analytics



Intel Edison

Intel Edison, . Flashing Intel Edison (wired) - Windows.



2. :

# configure_edison --setup

2.1 . 8 -32 :



Intel IoT Analytics



2.2 Intel Edison, - edison_habr( 5 ), Wi-Fi:



Intel IoT Analytics



2.3 10 . :



Intel IoT Analytics



5 - “FSB”:



2.4 IP DHCP:



Intel IoT Analytics



2.5 192.168.1.44 :



Intel IoT Analytics



.



3. iotkit:



# iotkit-admin test



Intel IoT Analytics



.



4. ID .



# iotkit-admin device-id



Intel IoT Analytics



ID :



# iotkit-admin set-device-id YOUR_DEVICE_ID



5.

5.1 dashboard.us.enableiot.com, My account , Details

Activation Code :



Intel IoT Analytics



5.2 Intel Edison :



# iotkit-admin activate [ ]



Intel IoT Analytics



5.3 dashboard.us.enableiot.com, Devices. Intel Edison.



Intel IoT Analytics



, . Status - active.



Intel IoT Analytics



6.

6.1 # iotkit-admin register [_] [_]. :

# iotkit-admin register temperature1 temperature.v1.1

# iotkit-admin register pressure1 pressure.v1.0

# iotkit-admin register moisturevalue1 moisturevalue.v1.0



Intel IoT Analytics



iotkit-admin observation, - 21:



# iotkit-admin observation temperature1 21



6.2 :



Intel IoT Analytics





# systemctl start iotkit-agent -

# systemctl stop iotkit-agent -

# systemctl restart iotkit-agent -

# systemctl status iotkit-agent -



Arduino-

, Arduino .



iotkit-agent:



Intel Cloud, <../Wire/Wire.h> Arduino arduino.cc, IoTkit, aJSON, iotkit-samples.



:

#include <IoTkit.h> // include IoTkit.h to use the Intel IoT Kit

#include <Ethernet.h> // must be included to use IoTkit

#include <aJSON.h>



IoTkit:



// create an object of the IoTkit class IoTkit iotkit;








    POST dashboard.us.enableiot.com/v1/api/data:deviceId

    {

    "accountId": ”",

    "data": [

    {

    "componentId": ”",

    "on": 1412456872000,

    "value":"1.23"

    }

    ],

    "on": 1412456872000

    }



    Intel Edison. . : , , .



    :





    Intel IoT Analytics. Intel Edison Arduino-

    Intel IoT Analytics.

    1. Intel IoT Analytics. OAuth:



    Intel IoT Analytics



    2. :



    Intel IoT Analytics



    3. . :



    Intel IoT Analytics



    4. . Account . .



    Intel IoT Analytics



    5. Temperature :



    Intel IoT Analytics



    0, 40:



    Intel IoT Analytics



    . , .



    Intel IoT Analytics



    6. Add a New Catalog Item . .



    , meteovesti.ru. , , 31 1968 812,4 ... ( ) 2 1935 -, 669,3 ...



    :

    1 [] = 7.50063755419211E-03 (0°C) [ ..]

    [] 669,3 ... / 0,0075 = 89 240

    [] 812,4 ... / 0,0075 = 108 320



    :



    Intel IoT Analytics



    7. - . . 0 - . 100 - .



    Float Integer, Percentage. .



    Intel IoT Analytics



    , .



    Intel Edison

    Intel Edison Intel Edison. .



    Intel Edison , Linux. Agent from the IoT GitHub site. .. WebSocket



    Wi-Fi, Intel Edison . .



    Intel Edsion , Wi-Fi

    PuTTY, Edison. MicroUSB Intel Edison, . , PuTTY.



    PuTTY, “Serial” “COM11”, “115200”.

    , Enter, .

    “root”.



    Intel IoT Analytics



    Intel Edison

    Intel Edison, . Flashing Intel Edison (wired) - Windows.



    2. :

    # configure_edison --setup

    2.1 . 8 -32 :



    Intel IoT Analytics



    2.2 Intel Edison, - edison_habr( 5 ), Wi-Fi:



    Intel IoT Analytics



    2.3 10 . :



    Intel IoT Analytics



    5 - “FSB”:



    2.4 IP DHCP:



    Intel IoT Analytics



    2.5 192.168.1.44 :



    Intel IoT Analytics



    .



    3. iotkit:



    # iotkit-admin test



    Intel IoT Analytics



    .



    4. ID .



    # iotkit-admin device-id



    Intel IoT Analytics



    ID :



    # iotkit-admin set-device-id YOUR_DEVICE_ID



    5.

    5.1 dashboard.us.enableiot.com, My account , Details

    Activation Code :



    Intel IoT Analytics



    5.2 Intel Edison :



    # iotkit-admin activate [ ]



    Intel IoT Analytics



    5.3 dashboard.us.enableiot.com, Devices. Intel Edison.



    Intel IoT Analytics



    , . Status - active.



    Intel IoT Analytics



    6.

    6.1 # iotkit-admin register [_] [_]. :

    # iotkit-admin register temperature1 temperature.v1.1

    # iotkit-admin register pressure1 pressure.v1.0

    # iotkit-admin register moisturevalue1 moisturevalue.v1.0



    Intel IoT Analytics



    iotkit-admin observation, - 21:



    # iotkit-admin observation temperature1 21



    6.2 :



    Intel IoT Analytics





    # systemctl start iotkit-agent -

    # systemctl stop iotkit-agent -

    # systemctl restart iotkit-agent -

    # systemctl status iotkit-agent -



    Arduino-

    , Arduino .



    iotkit-agent:



    Intel Cloud, <../Wire/Wire.h> Arduino arduino.cc, IoTkit, aJSON, iotkit-samples.



    :

    #include <IoTkit.h> // include IoTkit.h to use the Intel IoT Kit

    #include <Ethernet.h> // must be included to use IoTkit

    #include <aJSON.h>



    IoTkit:



    // create an object of the IoTkit class IoTkit iotkit;




  1. POST dashboard.us.enableiot.com/v1/api/data:deviceId

    {

    "accountId": ”",

    "data": [

    {

    "componentId": ”",

    "on": 1412456872000,

    "value":"1.23"

    }

    ],

    "on": 1412456872000

    }



    Intel Edison. . : , , .



    :





    Intel IoT Analytics. Intel Edison Arduino-

    Intel IoT Analytics.

    1. Intel IoT Analytics. OAuth:



    Intel IoT Analytics



    2. :



    Intel IoT Analytics



    3. . :



    Intel IoT Analytics



    4. . Account . .



    Intel IoT Analytics



    5. Temperature :



    Intel IoT Analytics



    0, 40:



    Intel IoT Analytics



    . , .



    Intel IoT Analytics



    6. Add a New Catalog Item . .



    , meteovesti.ru. , , 31 1968 812,4 ... ( ) 2 1935 -, 669,3 ...



    :

    1 [] = 7.50063755419211E-03 (0°C) [ ..]

    [] 669,3 ... / 0,0075 = 89 240

    [] 812,4 ... / 0,0075 = 108 320



    :



    Intel IoT Analytics



    7. - . . 0 - . 100 - .



    Float Integer, Percentage. .



    Intel IoT Analytics



    , .



    Intel Edison

    Intel Edison Intel Edison. .



    Intel Edison , Linux. Agent from the IoT GitHub site. .. WebSocket



    Wi-Fi, Intel Edison . .



    Intel Edsion , Wi-Fi

    PuTTY, Edison. MicroUSB Intel Edison, . , PuTTY.



    PuTTY, “Serial” “COM11”, “115200”.

    , Enter, .

    “root”.



    Intel IoT Analytics



    Intel Edison

    Intel Edison, . Flashing Intel Edison (wired) - Windows.



    2. :

    # configure_edison --setup

    2.1 . 8 -32 :



    Intel IoT Analytics



    2.2 Intel Edison, - edison_habr( 5 ), Wi-Fi:



    Intel IoT Analytics



    2.3 10 . :



    Intel IoT Analytics



    5 - “FSB”:



    2.4 IP DHCP:



    Intel IoT Analytics



    2.5 192.168.1.44 :



    Intel IoT Analytics



    .



    3. iotkit:



    # iotkit-admin test



    Intel IoT Analytics



    .



    4. ID .



    # iotkit-admin device-id



    Intel IoT Analytics



    ID :



    # iotkit-admin set-device-id YOUR_DEVICE_ID



    5.

    5.1 dashboard.us.enableiot.com, My account , Details

    Activation Code :



    Intel IoT Analytics



    5.2 Intel Edison :



    # iotkit-admin activate [ ]



    Intel IoT Analytics



    5.3 dashboard.us.enableiot.com, Devices. Intel Edison.



    Intel IoT Analytics



    , . Status - active.



    Intel IoT Analytics



    6.

    6.1 # iotkit-admin register [_] [_]. :

    # iotkit-admin register temperature1 temperature.v1.1

    # iotkit-admin register pressure1 pressure.v1.0

    # iotkit-admin register moisturevalue1 moisturevalue.v1.0



    Intel IoT Analytics



    iotkit-admin observation, - 21:



    # iotkit-admin observation temperature1 21



    6.2 :



    Intel IoT Analytics





    # systemctl start iotkit-agent -

    # systemctl stop iotkit-agent -

    # systemctl restart iotkit-agent -

    # systemctl status iotkit-agent -



    Arduino-

    , Arduino .



    iotkit-agent:



    Intel Cloud, <../Wire/Wire.h> Arduino arduino.cc, IoTkit, aJSON, iotkit-samples.



    :

    #include <IoTkit.h> // include IoTkit.h to use the Intel IoT Kit

    #include <Ethernet.h> // must be included to use IoTkit

    #include <aJSON.h>



    IoTkit:



    // create an object of the IoTkit class IoTkit iotkit;




  2. POST dashboard.us.enableiot.com/v1/api/data:deviceId

    {

    "accountId": ”",

    "data": [

    {

    "componentId": ”",

    "on": 1412456872000,

    "value":"1.23"

    }

    ],

    "on": 1412456872000

    }



    Intel Edison. . : , , .



    :





    Intel IoT Analytics. Intel Edison Arduino-

    Intel IoT Analytics.

    1. Intel IoT Analytics. OAuth:



    Intel IoT Analytics



    2. :



    Intel IoT Analytics



    3. . :



    Intel IoT Analytics



    4. . Account . .



    Intel IoT Analytics



    5. Temperature :



    Intel IoT Analytics



    0, 40:



    Intel IoT Analytics



    . , .



    Intel IoT Analytics



    6. Add a New Catalog Item . .



    , meteovesti.ru. , , 31 1968 812,4 ... ( ) 2 1935 -, 669,3 ...



    :

    1 [] = 7.50063755419211E-03 (0°C) [ ..]

    [] 669,3 ... / 0,0075 = 89 240

    [] 812,4 ... / 0,0075 = 108 320



    :



    Intel IoT Analytics



    7. - . . 0 - . 100 - .



    Float Integer, Percentage. .



    Intel IoT Analytics



    , .



    Intel Edison

    Intel Edison Intel Edison. .



    Intel Edison , Linux. Agent from the IoT GitHub site. .. WebSocket



    Wi-Fi, Intel Edison . .



    Intel Edsion , Wi-Fi

    PuTTY, Edison. MicroUSB Intel Edison, . , PuTTY.



    PuTTY, “Serial” “COM11”, “115200”.

    , Enter, .

    “root”.



    Intel IoT Analytics



    Intel Edison

    Intel Edison, . Flashing Intel Edison (wired) - Windows.



    2. :

    # configure_edison --setup

    2.1 . 8 -32 :



    Intel IoT Analytics



    2.2 Intel Edison, - edison_habr( 5 ), Wi-Fi:



    Intel IoT Analytics



    2.3 10 . :



    Intel IoT Analytics



    5 - “FSB”:



    2.4 IP DHCP:



    Intel IoT Analytics



    2.5 192.168.1.44 :



    Intel IoT Analytics



    .



    3. iotkit:



    # iotkit-admin test



    Intel IoT Analytics



    .



    4. ID .



    # iotkit-admin device-id



    Intel IoT Analytics



    ID :



    # iotkit-admin set-device-id YOUR_DEVICE_ID



    5.

    5.1 dashboard.us.enableiot.com, My account , Details

    Activation Code :



    Intel IoT Analytics



    5.2 Intel Edison :



    # iotkit-admin activate [ ]



    Intel IoT Analytics



    5.3 dashboard.us.enableiot.com, Devices. Intel Edison.



    Intel IoT Analytics



    , . Status - active.



    Intel IoT Analytics



    6.

    6.1 # iotkit-admin register [_] [_]. :

    # iotkit-admin register temperature1 temperature.v1.1

    # iotkit-admin register pressure1 pressure.v1.0

    # iotkit-admin register moisturevalue1 moisturevalue.v1.0



    Intel IoT Analytics



    iotkit-admin observation, - 21:



    # iotkit-admin observation temperature1 21



    6.2 :



    Intel IoT Analytics





    # systemctl start iotkit-agent -

    # systemctl stop iotkit-agent -

    # systemctl restart iotkit-agent -

    # systemctl status iotkit-agent -



    Arduino-

    , Arduino .



    iotkit-agent:



    Intel Cloud, <../Wire/Wire.h> Arduino arduino.cc, IoTkit, aJSON, iotkit-samples.



    :

    #include <IoTkit.h> // include IoTkit.h to use the Intel IoT Kit

    #include <Ethernet.h> // must be included to use IoTkit

    #include <aJSON.h>



    IoTkit:



    // create an object of the IoTkit class IoTkit iotkit;




  3. POST dashboard.us.enableiot.com/v1/api/data:deviceId

    {

    "accountId": ”",

    "data": [

    {

    "componentId": ”",

    "on": 1412456872000,

    "value":"1.23"

    }

    ],

    "on": 1412456872000

    }



    Intel Edison. . : , , .



    :





    Intel IoT Analytics. Intel Edison Arduino-

    Intel IoT Analytics.

    1. Intel IoT Analytics. OAuth:



    Intel IoT Analytics



    2. :



    Intel IoT Analytics



    3. . :



    Intel IoT Analytics



    4. . Account . .



    Intel IoT Analytics



    5. Temperature :



    Intel IoT Analytics



    0, 40:



    Intel IoT Analytics



    . , .



    Intel IoT Analytics



    6. Add a New Catalog Item . .



    , meteovesti.ru. , , 31 1968 812,4 ... ( ) 2 1935 -, 669,3 ...



    :

    1 [] = 7.50063755419211E-03 (0°C) [ ..]

    [] 669,3 ... / 0,0075 = 89 240

    [] 812,4 ... / 0,0075 = 108 320



    :



    Intel IoT Analytics



    7. - . . 0 - . 100 - .



    Float Integer, Percentage. .



    Intel IoT Analytics



    , .



    Intel Edison

    Intel Edison Intel Edison. .



    Intel Edison , Linux. Agent from the IoT GitHub site. .. WebSocket



    Wi-Fi, Intel Edison . .



    Intel Edsion , Wi-Fi

    PuTTY, Edison. MicroUSB Intel Edison, . , PuTTY.



    PuTTY, “Serial” “COM11”, “115200”.

    , Enter, .

    “root”.



    Intel IoT Analytics



    Intel Edison

    Intel Edison, . Flashing Intel Edison (wired) - Windows.



    2. :

    # configure_edison --setup

    2.1 . 8 -32 :



    Intel IoT Analytics



    2.2 Intel Edison, - edison_habr( 5 ), Wi-Fi:



    Intel IoT Analytics



    2.3 10 . :



    Intel IoT Analytics



    5 - “FSB”:



    2.4 IP DHCP:



    Intel IoT Analytics



    2.5 192.168.1.44 :



    Intel IoT Analytics



    .



    3. iotkit:



    # iotkit-admin test



    Intel IoT Analytics



    .



    4. ID .



    # iotkit-admin device-id



    Intel IoT Analytics



    ID :



    # iotkit-admin set-device-id YOUR_DEVICE_ID



    5.

    5.1 dashboard.us.enableiot.com, My account , Details

    Activation Code :



    Intel IoT Analytics



    5.2 Intel Edison :



    # iotkit-admin activate [ ]



    Intel IoT Analytics



    5.3 dashboard.us.enableiot.com, Devices. Intel Edison.



    Intel IoT Analytics



    , . Status - active.



    Intel IoT Analytics



    6.

    6.1 # iotkit-admin register [_] [_]. :

    # iotkit-admin register temperature1 temperature.v1.1

    # iotkit-admin register pressure1 pressure.v1.0

    # iotkit-admin register moisturevalue1 moisturevalue.v1.0



    Intel IoT Analytics



    iotkit-admin observation, - 21:



    # iotkit-admin observation temperature1 21



    6.2 :



    Intel IoT Analytics





    # systemctl start iotkit-agent -

    # systemctl stop iotkit-agent -

    # systemctl restart iotkit-agent -

    # systemctl status iotkit-agent -



    Arduino-

    , Arduino .



    iotkit-agent:



    Intel Cloud, <../Wire/Wire.h> Arduino arduino.cc, IoTkit, aJSON, iotkit-samples.



    :

    #include <IoTkit.h> // include IoTkit.h to use the Intel IoT Kit

    #include <Ethernet.h> // must be included to use IoTkit

    #include <aJSON.h>



    IoTkit:



    // create an object of the IoTkit class IoTkit iotkit;




  4. POST dashboard.us.enableiot.com/v1/api/data:deviceId

    {

    "accountId": ”",

    "data": [

    {

    "componentId": ”",

    "on": 1412456872000,

    "value":"1.23"

    }

    ],

    "on": 1412456872000

    }



    Intel Edison. . : , , .



    :





    Intel IoT Analytics. Intel Edison Arduino-

    Intel IoT Analytics.

    1. Intel IoT Analytics. OAuth:



    Intel IoT Analytics



    2. :



    Intel IoT Analytics



    3. . :



    Intel IoT Analytics



    4. . Account . .



    Intel IoT Analytics



    5. Temperature :



    Intel IoT Analytics



    0, 40:



    Intel IoT Analytics



    . , .



    Intel IoT Analytics



    6. Add a New Catalog Item . .



    , meteovesti.ru. , , 31 1968 812,4 ... ( ) 2 1935 -, 669,3 ...



    :

    1 [] = 7.50063755419211E-03 (0°C) [ ..]

    [] 669,3 ... / 0,0075 = 89 240

    [] 812,4 ... / 0,0075 = 108 320



    :



    Intel IoT Analytics



    7. - . . 0 - . 100 - .



    Float Integer, Percentage. .



    Intel IoT Analytics



    , .



    Intel Edison

    Intel Edison Intel Edison. .



    Intel Edison , Linux. Agent from the IoT GitHub site. .. WebSocket



    Wi-Fi, Intel Edison . .



    Intel Edsion , Wi-Fi

    PuTTY, Edison. MicroUSB Intel Edison, . , PuTTY.



    PuTTY, “Serial” “COM11”, “115200”.

    , Enter, .

    “root”.



    Intel IoT Analytics



    Intel Edison

    Intel Edison, . Flashing Intel Edison (wired) - Windows.



    2. :

    # configure_edison --setup

    2.1 . 8 -32 :



    Intel IoT Analytics



    2.2 Intel Edison, - edison_habr( 5 ), Wi-Fi:



    Intel IoT Analytics



    2.3 10 . :



    Intel IoT Analytics



    5 - “FSB”:



    2.4 IP DHCP:



    Intel IoT Analytics



    2.5 192.168.1.44 :



    Intel IoT Analytics



    .



    3. iotkit:



    # iotkit-admin test



    Intel IoT Analytics



    .



    4. ID .



    # iotkit-admin device-id



    Intel IoT Analytics



    ID :



    # iotkit-admin set-device-id YOUR_DEVICE_ID



    5.

    5.1 dashboard.us.enableiot.com, My account , Details

    Activation Code :



    Intel IoT Analytics



    5.2 Intel Edison :



    # iotkit-admin activate [ ]



    Intel IoT Analytics



    5.3 dashboard.us.enableiot.com, Devices. Intel Edison.



    Intel IoT Analytics



    , . Status - active.



    Intel IoT Analytics



    6.

    6.1 # iotkit-admin register [_] [_]. :

    # iotkit-admin register temperature1 temperature.v1.1

    # iotkit-admin register pressure1 pressure.v1.0

    # iotkit-admin register moisturevalue1 moisturevalue.v1.0



    Intel IoT Analytics



    iotkit-admin observation, - 21:



    # iotkit-admin observation temperature1 21



    6.2 :



    Intel IoT Analytics





    # systemctl start iotkit-agent -

    # systemctl stop iotkit-agent -

    # systemctl restart iotkit-agent -

    # systemctl status iotkit-agent -



    Arduino-

    , Arduino .



    iotkit-agent:



    Intel Cloud, <../Wire/Wire.h> Arduino arduino.cc, IoTkit, aJSON, iotkit-samples.



    :

    #include <IoTkit.h> // include IoTkit.h to use the Intel IoT Kit

    #include <Ethernet.h> // must be included to use IoTkit

    #include <aJSON.h>



    IoTkit:



    // create an object of the IoTkit class IoTkit iotkit;




  5. POST dashboard.us.enableiot.com/v1/api/data:deviceId

    {

    "accountId": ”",

    "data": [

    {

    "componentId": ”",

    "on": 1412456872000,

    "value":"1.23"

    }

    ],

    "on": 1412456872000

    }



    Intel Edison. . : , , .



    :





    Intel IoT Analytics. Intel Edison Arduino-

    Intel IoT Analytics.

    1. Intel IoT Analytics. OAuth:



    Intel IoT Analytics



    2. :



    Intel IoT Analytics



    3. . :



    Intel IoT Analytics



    4. . Account . .



    Intel IoT Analytics



    5. Temperature :



    Intel IoT Analytics



    0, 40:



    Intel IoT Analytics



    . , .



    Intel IoT Analytics



    6. Add a New Catalog Item . .



    , meteovesti.ru. , , 31 1968 812,4 ... ( ) 2 1935 -, 669,3 ...



    :

    1 [] = 7.50063755419211E-03 (0°C) [ ..]

    [] 669,3 ... / 0,0075 = 89 240

    [] 812,4 ... / 0,0075 = 108 320



    :



    Intel IoT Analytics



    7. - . . 0 - . 100 - .



    Float Integer, Percentage. .



    Intel IoT Analytics



    , .



    Intel Edison

    Intel Edison Intel Edison. .



    Intel Edison , Linux. Agent from the IoT GitHub site. .. WebSocket



    Wi-Fi, Intel Edison . .



    Intel Edsion , Wi-Fi

    PuTTY, Edison. MicroUSB Intel Edison, . , PuTTY.



    PuTTY, “Serial” “COM11”, “115200”.

    , Enter, .

    “root”.



    Intel IoT Analytics



    Intel Edison

    Intel Edison, . Flashing Intel Edison (wired) - Windows.



    2. :

    # configure_edison --setup

    2.1 . 8 -32 :



    Intel IoT Analytics



    2.2 Intel Edison, - edison_habr( 5 ), Wi-Fi:



    Intel IoT Analytics



    2.3 10 . :



    Intel IoT Analytics



    5 - “FSB”:



    2.4 IP DHCP:



    Intel IoT Analytics



    2.5 192.168.1.44 :



    Intel IoT Analytics



    .



    3. iotkit:



    # iotkit-admin test



    Intel IoT Analytics



    .



    4. ID .



    # iotkit-admin device-id



    Intel IoT Analytics



    ID :



    # iotkit-admin set-device-id YOUR_DEVICE_ID



    5.

    5.1 dashboard.us.enableiot.com, My account , Details

    Activation Code :



    Intel IoT Analytics



    5.2 Intel Edison :



    # iotkit-admin activate [ ]



    Intel IoT Analytics



    5.3 dashboard.us.enableiot.com, Devices. Intel Edison.



    Intel IoT Analytics



    , . Status - active.



    Intel IoT Analytics



    6.

    6.1 # iotkit-admin register [_] [_]. :

    # iotkit-admin register temperature1 temperature.v1.1

    # iotkit-admin register pressure1 pressure.v1.0

    # iotkit-admin register moisturevalue1 moisturevalue.v1.0



    Intel IoT Analytics



    iotkit-admin observation, - 21:



    # iotkit-admin observation temperature1 21



    6.2 :



    Intel IoT Analytics





    # systemctl start iotkit-agent -

    # systemctl stop iotkit-agent -

    # systemctl restart iotkit-agent -

    # systemctl status iotkit-agent -



    Arduino-

    , Arduino .



    iotkit-agent:



    Intel Cloud, <../Wire/Wire.h> Arduino arduino.cc, IoTkit, aJSON, iotkit-samples.



    :

    #include <IoTkit.h> // include IoTkit.h to use the Intel IoT Kit

    #include <Ethernet.h> // must be included to use IoTkit

    #include <aJSON.h>



    IoTkit:



    // create an object of the IoTkit class IoTkit iotkit;




  6. POST dashboard.us.enableiot.com/v1/api/data:deviceId

    {

    "accountId": ”",

    "data": [

    {

    "componentId": ”",

    "on": 1412456872000,

    "value":"1.23"

    }

    ],

    "on": 1412456872000

    }



    Intel Edison. . : , , .



    :





    Intel IoT Analytics. Intel Edison Arduino-

    Intel IoT Analytics.

    1. Intel IoT Analytics. OAuth:



    Intel IoT Analytics



    2. :



    Intel IoT Analytics



    3. . :



    Intel IoT Analytics



    4. . Account . .



    Intel IoT Analytics



    5. Temperature :



    Intel IoT Analytics



    0, 40:



    Intel IoT Analytics



    . , .



    Intel IoT Analytics



    6. Add a New Catalog Item . .



    , meteovesti.ru. , , 31 1968 812,4 ... ( ) 2 1935 -, 669,3 ...



    :

    1 [] = 7.50063755419211E-03 (0°C) [ ..]

    [] 669,3 ... / 0,0075 = 89 240

    [] 812,4 ... / 0,0075 = 108 320



    :



    Intel IoT Analytics



    7. - . . 0 - . 100 - .



    Float Integer, Percentage. .



    Intel IoT Analytics



    , .



    Intel Edison

    Intel Edison Intel Edison. .



    Intel Edison , Linux. Agent from the IoT GitHub site. .. WebSocket



    Wi-Fi, Intel Edison . .



    Intel Edsion , Wi-Fi

    PuTTY, Edison. MicroUSB Intel Edison, . , PuTTY.



    PuTTY, “Serial” “COM11”, “115200”.

    , Enter, .

    “root”.



    Intel IoT Analytics



    Intel Edison

    Intel Edison, . Flashing Intel Edison (wired) - Windows.



    2. :

    # configure_edison --setup

    2.1 . 8 -32 :



    Intel IoT Analytics



    2.2 Intel Edison, - edison_habr( 5 ), Wi-Fi:



    Intel IoT Analytics



    2.3 10 . :



    Intel IoT Analytics



    5 - “FSB”:



    2.4 IP DHCP:



    Intel IoT Analytics



    2.5 192.168.1.44 :



    Intel IoT Analytics



    .



    3. iotkit:



    # iotkit-admin test



    Intel IoT Analytics



    .



    4. ID .



    # iotkit-admin device-id



    Intel IoT Analytics



    ID :



    # iotkit-admin set-device-id YOUR_DEVICE_ID



    5.

    5.1 dashboard.us.enableiot.com, My account , Details

    Activation Code :



    Intel IoT Analytics



    5.2 Intel Edison :



    # iotkit-admin activate [ ]



    Intel IoT Analytics



    5.3 dashboard.us.enableiot.com, Devices. Intel Edison.



    Intel IoT Analytics



    , . Status - active.



    Intel IoT Analytics



    6.

    6.1 # iotkit-admin register [_] [_]. :

    # iotkit-admin register temperature1 temperature.v1.1

    # iotkit-admin register pressure1 pressure.v1.0

    # iotkit-admin register moisturevalue1 moisturevalue.v1.0



    Intel IoT Analytics



    iotkit-admin observation, - 21:



    # iotkit-admin observation temperature1 21



    6.2 :



    Intel IoT Analytics





    # systemctl start iotkit-agent -

    # systemctl stop iotkit-agent -

    # systemctl restart iotkit-agent -

    # systemctl status iotkit-agent -



    Arduino-

    , Arduino .



    iotkit-agent:



    Intel Cloud, <../Wire/Wire.h> Arduino arduino.cc, IoTkit, aJSON, iotkit-samples.



    :

    #include <IoTkit.h> // include IoTkit.h to use the Intel IoT Kit

    #include <Ethernet.h> // must be included to use IoTkit

    #include <aJSON.h>



    IoTkit:



    // create an object of the IoTkit class IoTkit iotkit;




POST dashboard.us.enableiot.com/v1/api/data:deviceId

{

"accountId": ”",

"data": [

{

"componentId": ”",

"on": 1412456872000,

"value":"1.23"

}

],

"on": 1412456872000

}



Intel Edison. . : , , .



:





Intel IoT Analytics. Intel Edison Arduino-

Intel IoT Analytics.

1. Intel IoT Analytics. OAuth:



Intel IoT Analytics



2. :



Intel IoT Analytics



3. . :



Intel IoT Analytics



4. . Account . .



Intel IoT Analytics



5. Temperature :



Intel IoT Analytics



0, 40:



Intel IoT Analytics



. , .



Intel IoT Analytics



6. Add a New Catalog Item . .



, meteovesti.ru. , , 31 1968 812,4 ... ( ) 2 1935 -, 669,3 ...



:

1 [] = 7.50063755419211E-03 (0°C) [ ..]

[] 669,3 ... / 0,0075 = 89 240

[] 812,4 ... / 0,0075 = 108 320



:



Intel IoT Analytics



7. - . . 0 - . 100 - .



Float Integer, Percentage. .



Intel IoT Analytics



, .



Intel Edison

Intel Edison Intel Edison. .



Intel Edison , Linux. Agent from the IoT GitHub site. .. WebSocket



Wi-Fi, Intel Edison . .



Intel Edsion , Wi-Fi

PuTTY, Edison. MicroUSB Intel Edison, . , PuTTY.



PuTTY, “Serial” “COM11”, “115200”.

, Enter, .

“root”.



Intel IoT Analytics



Intel Edison

Intel Edison, . Flashing Intel Edison (wired) - Windows.



2. :

# configure_edison --setup

2.1 . 8 -32 :



Intel IoT Analytics



2.2 Intel Edison, - edison_habr( 5 ), Wi-Fi:



Intel IoT Analytics



2.3 10 . :



Intel IoT Analytics



5 - “FSB”:



2.4 IP DHCP:



Intel IoT Analytics



2.5 192.168.1.44 :



Intel IoT Analytics



.



3. iotkit:



# iotkit-admin test



Intel IoT Analytics



.



4. ID .



# iotkit-admin device-id



Intel IoT Analytics



ID :



# iotkit-admin set-device-id YOUR_DEVICE_ID



5.

5.1 dashboard.us.enableiot.com, My account , Details

Activation Code :



Intel IoT Analytics



5.2 Intel Edison :



# iotkit-admin activate [ ]



Intel IoT Analytics



5.3 dashboard.us.enableiot.com, Devices. Intel Edison.



Intel IoT Analytics



, . Status - active.



Intel IoT Analytics



6.

6.1 # iotkit-admin register [_] [_]. :

# iotkit-admin register temperature1 temperature.v1.1

# iotkit-admin register pressure1 pressure.v1.0

# iotkit-admin register moisturevalue1 moisturevalue.v1.0



Intel IoT Analytics



iotkit-admin observation, - 21:



# iotkit-admin observation temperature1 21



6.2 :



Intel IoT Analytics





# systemctl start iotkit-agent -

# systemctl stop iotkit-agent -

# systemctl restart iotkit-agent -

# systemctl status iotkit-agent -



Arduino-

, Arduino .



iotkit-agent:



Intel Cloud, <../Wire/Wire.h> Arduino arduino.cc, IoTkit, aJSON, iotkit-samples.



:

#include <IoTkit.h> // include IoTkit.h to use the Intel IoT Kit

#include <Ethernet.h> // must be included to use IoTkit

#include <aJSON.h>



IoTkit:



// create an object of the IoTkit class IoTkit iotkit;






初期化:



 void setup() { iotkit.begin(); // call begin on the IoTkit object before calling any other methods }
      
      





データは-sendメソッドを使用して送信されます。ここで、temperature1はセンサーの名前、tempvalueはintの温度です

iotkit.send( "temperature1"、tempvalue);



完全なコードリスト:
 //LCD #include <Wire.h> #include <LCD.h> #include <LiquidCrystal_I2C.h> #define LCD_I2C_ADDR 0x20 // Define I2C Address where the PCF8574T is #define BACKLIGHT 7 #define LCD_EN 4 #define LCD_RW 5 #define LCD_RS 6 #define LCD_D4 0 #define LCD_D5 1 #define LCD_D6 2 #define LCD_D7 3 LiquidCrystal_I2C lcd(LCD_I2C_ADDR,LCD_EN,LCD_RW,LCD_RS,LCD_D4,LCD_D5,LCD_D6,LCD_D7); //BMP085 Barometric Pressure & Temp Sensor #include <Wire.h> #include <Adafruit_BMP085.h> Adafruit_BMP085 bmp; //for Intel Cloud #include <IoTkit.h> // include IoTkit.h to use the Intel IoT Kit #include <Ethernet.h> // must be included to use IoTkit // create an object of the IoTkit class IoTkit iotkit; float temperature1; int pressure1; int moisturevalue1; void setup() { iotkit.begin(); Serial.begin(9600); bmp.begin(); //init LCD lcd.begin (20,4); lcd.setBacklightPin(BACKLIGHT,NEGATIVE); // init the backlight lcd.setBacklight(HIGH); // Backlight on lcd.home (); // go home lcd.setCursor ( 0, 0 ); lcd.print("Edison. Habrahabr"); } void loop() { lcd.setCursor ( 0, 1 ); lcd.print("Tempera. = "); lcd.print(bmp.readTemperature()); lcd.print(" *C"); // lcd.setCursor ( 0, 2 ); lcd.print("Pressure = "); lcd.print(bmp.readPressure()); lcd.print(" Pa"); // lcd.setCursor ( 0, 3 ); lcd.print("Moisture Value = "); lcd.print(analogRead(0)); //read temperature1=bmp.readTemperature(); pressure1=bmp.readPressure(); moisturevalue1=analogRead(0); //Console and Send to Intel Cloud Serial.println("Sensors"); Serial.print("temperature1="); Serial.println(temperature1); iotkit.send("temperature1", temperature1); delay(2000); Serial.print("pressure1="); Serial.println(pressure1); iotkit.send("pressure1", pressure1); delay(2000); Serial.print("moisturevalue1="); Serial.println(moisturevalue1); moisturevalue1=20; iotkit.send("moisturevalue1", moisturevalue1); delay(2000); // wait for a second }
      
      







グラフページ( dashboard.us.enableiot.com/ui/dashboard#/chart)に移動します。ここで、センサーの測定値をリアルタイムで表示できます。



Intel IoT Analytics



簡単な要約を要約します。 デバイス開発者は、Cloud Cloud Intel IoT Analyticsを使用して、デバイスからデータを簡単に送信できます。 RESTおよびJSON形式は非常に人気があります。 APIアクセス関数はGithubで公開されています。 このサービスはインターネット上で常に利用可能です。つまり、データを収集して保存するためにサーバーを展開する必要はありません。 REST API標準によると、イーサネットとSSLをサポートするほとんどすべてのデバイスは、Cloud Intel IoT Analyticsと対話できます。



参照資料

  1. github.com-enableiot
  2. Edison入門ガイド-Windows
  3. Intel Edisonの点滅(有線)-Windows
  4. クラウドインテルIoT分析
  5. Intelモノのインターネット(IoT)開発者キットIoTクラウドベース分析ユーザーガイド2014年11月


目次

  1. Intel Edison 最初の打ち上げ
  2. Intel Edison Intel IoT Analytics Cloudとの連携:データのログと送信
  3. Intel Edison Intel IoT Analytics Cloudの使用:ルールの作成と通知の送信
  4. Intel Edison Intel IoT Analytics Cloud:ASP.NETでSMSおよびRESTfulクライアントを送信する



All Articles