📜 ⬆️ ⬇️

Intel Edison. Work with Intel IoT Analytics cloud: register and send data

cloud IoT

The article provides a brief description of the Intel IoT Analytics cloud for collecting data and managing devices. Considered practical work with the cloud on the example of Intel Edison ( Intel Edison. First launch ).

Gone are the days when the device did not require the ability to interact with the network. Management, monitoring, should now be performed not only in close proximity, but remotely. Required to receive data and manage devices over the Internet. At the moment, a large number of devices have already been developed and managing them individually has proven to be quite a difficult task to accomplish.
')
For unification it took some universal mediator, an intermediate layer to work with the device. So there was a new type of interaction Machine-to-Cloud (M2C), device interaction with the cloud.

The device communicates with the cloud, using a standardized protocol. The cloud implements all the logic of collecting, storing, managing data. Also allows you to send commands to devices to control it. The cloud is a universal “glue” for a variety of devices that are different from each other. The user interacts with the cloud through a web interface or a public API. Below we will talk about the Intel IoT Analytics cloud and Intel Edison interaction with it.

At the moment, the cloud is in beta mode.
The functionality of the Intel IoT Analytics cloud includes:

The cloud communicates with devices using the REST protocol. Therefore, you can work with the cloud for any device that supports Ethernet and SSL (all data is sent only in encrypted form). The portal http://dashboard.us.enableiot.com provides a basic minimum of data viewing and device management. Developers can make their dashboard and device management using the REST protocol to get data from the Intel IoT Analytics cloud.

Commands to the device are transmitted via WebSocket and MQTT protocols. Due to the fact that most devices do not have a public IP address (located behind the ITU or NAT), we will use WebSocket to send commands to the device.

Data from Intel Edison will recover via Wi-Fi.

Creation of data structure
Two types of components are used to communicate with the device:

Before creating a sensor or control component, you must create a component type.

Component type describes:

The portal has already created several basic types: temperature, humidity, switch. Each type has its own version. After changing any type property, +0.1 is added to the version. Those. if for the type V1.0 we set the lower limit value, a new version V1.1 will be automatically created.

Sensors are tied to devices that are in turn combined on the portal under an administrative account.

An administrator account is created on the portal http://dashboard.us.enableiot.com . In addition to access to data of other persons, the Administrator can create two types of accounts View only and Administrator.

An Intel Edison device with a unique ID is registered on the portal. For each device, additional attribute fields are defined. There may be several devices. A component is attached to each device. The component is a sensor for sending data to the cloud or a controlling object.

Conceptually, the data structure looks like this:
Intel IoT Analytics

For each component its type is determined:
Intel IoT Analytics

Sending and receiving data is carried out in JSON format
Example:

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;
    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;
    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;
    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;

Initialization:

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

Data is sent by the - send method, where temperature1 is the name of the sensor, tempvalue is the temperature value in int
iotkit.send ("temperature1", tempvalue);

Full code listing:
 //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 } 


Let's go to the Charts page ( dashboard.us.enableiot.com/ui/dashboard#/chart) , where you can view the sensor readings in real time.

Intel IoT Analytics

Let's summarize. Using the cloud cloud Intel IoT Analytics, device developers can easily send data from their device. REST and JSON formats are quite popular. API access functions published on Github. The service is always available on the Internet, which means that you do not need to deploy your server to collect and store data. Almost any device with Ethernet and SSL support, according to the REST API standard, can interact with Cloud Intel IoT Analytics.

Links
  1. github.com - enableiot
  2. Edison Getting Started Guide - Windows
  3. Flashing Intel Edison (wired) - Windows
  4. Cloud Intel IoT Analytics
  5. Intel Internet of Things (IoT) Developer Kit IoT Cloud-Based Analytics User Guide November 2014

Table of contents
  1. Intel Edison. First start
  2. Intel Edison. Work with Intel IoT Analytics cloud: register and send data
  3. Intel Edison. Working with the Intel IoT Analytics cloud: creating rules and sending notifications
  4. Intel Edison. Cloud Intel IoT Analytics: sending SMS and RESTful client on ASP.NET

Source: https://habr.com/ru/post/257621/


All Articles