Get started quickly

​ This page provides a quick start API for using the Energy Storage Monitoring Open Platform,For first-time users of this system, it helps users quickly see device data。The order of the interface introduction corresponds to the system architection relationship,The system hierarchy is Power station owners->Project->Collector->Device ,You can obtain the parameters required by the subordinate query to call the interface in the data returned in the higher-level interface。

​ User With a brand new PN codeRegister a power station owner account(After successful registration, a default project will be created based on the PN code used for registration),Before calling the business interface, you need to call the authentication interface。Project,After passing the certification,Cryptographic signatures (described below),Query the list of items(Interface) displays all items under the current user,The return data contains basic information and benefits of the project,pid(Project id)is also obtained from this interface。Query the details of the output active power of a project for a certain day,You can get the full power of a day, and the breakdown is a value of five minutes。Digital collector,Query the data collector(require pid),Query all data collectors under the project。Device,he data obtained by the query data collector can then be used toquery the devicequery the data details of the device for a certain day,The data returned by the data detail is associated with the protocol configured by the device。Therefore, in order to obtain the data of the device, the call of the interface should be progressively progressive by Project->Collector->Device 。 ​ The following is a brief description of the required interfaces (input and exit parameters),The purpose of calling the interface is to quickly and easily build the platform to observe the data of the device,If you need anything else, look for it in the interface documentation。

Signature encryption

Description of signature encryption(sign)

  • Register the user signature

    sign = SHA-1(salt + pwd + action)

    pwd = RC4(SHA-1(PN), SHA-1(PWD))

    action = "&action=reg&usr=" + usr + "&pwd=" +pwd+"&mobile=" + mobile + "&email=" + email + "&sn=" + sn + "&company-key=" + companyKey;

  • Certified signature

    sign = SHA-1(salt + SHA-1(pwd) + "&action=authSource&usr=" + usr + "&company-key=" + company-key);

  • Business API call signature

    sign = SHA-1(salt + secret + token + "&action=...");

    secret and token are the data returned after passing the authentication interface

    Java language example

    salt Unified description:salt is a readable string with a length of at least 8 bytes

    company-keyaccess:

    ​ Emaol: market@eybond.com

    ​ mobile phone: +86-13622344534

User

  • register

    ​ User registration,One needs to be prepared aUnregistered data collector number(hereinafter referred to as PN) and Manufacturer identification company-key(platform-assigned),pn is required for the user to register the interface,used in signature encryption, password encryption, and parameters (corresponding to SN),For details, see Interface documentation

    User registration

    ​ After the registration is complete, a default project is generated based on the pn number: PLANT

  • authentication

    ​ You must pass authentication before calling business APIs, After successful verification, the platform assignment is obtained secret and token,It is used to call the business interface sign cryptographic calculation

    authentication

    Returns data

{
    "err":0,
    "desc":"ERR_NONE",
    "dat":{
        "secret":"ffa1655ee3726840822063a02ac5017795809b18",
        "expire":604800,
        "token":"88d22d819e31897eea2d9d5b9f7792cf4065ac5372aad3672f5e4e147cd25b5f",
        "role":0
    }
}

project

  • Query the list of items

    Interface documentation links: Query the item

    Query all project information under the current user,Through this interface, you can get the project id (pid) 。

    pid is an important parameter for calling the project-related interface

    Returns information:

    {
        "err":0,
        "desc":"ERR_NONE",
        "dat":{
            "total":8,
            "page":0,
            "pagesize":1,
            "plant":[
                {
                    "pid":1,
                    "uid":1,
                    "name":"PLANT",
                    "status":1,
                    "address":{
                        "country":"China",
                        "province":"Guangdong Province",
                        "city":"Shenzhen City",
                        "county":"Shenzhen county",
                        "town":"Bao'an District",
                        "village":"Fenghuanggang Village",
                        "address":"East Lane 4, Fenghuanggang Village",
                        "lon":"101.651442",
                        "lat":"48.144826",
                        "timezone":28800
                    },
                    "profit":{
                        "unitProfit":"1.12",
                        "currency":"¥",
                        "currencyCountry":"CNY",
                        "coal":"0.221",
                        "co2":"0.031",
                        "so2":"0.023"
                    },
                    "nominalPower":"50000",
                    "energyYearEstimate":"5000000",
                    "designCompany":"EYBOND",
                    "picBig":"http://img.shinemonitor.com/picBig.png",
                    "picSmall":"http://img.shinemonitor.com/picSmall.png",
                    "install":"2017-06-29 02:16:21",
                    "gts":"2017-06-29 02:16:21"
                }
            ]
        }
    }
    
  • Query project information

    According to the PID query for the information of a single item, the data returned is the same as the plant of the item list

    Query project information

  • Query the details of the output active power of a project for a certain day

    PID is the required item of the parameter, Show the output active power of the project on a certain day

    Query the details of the output active power of a project for a certain day

    Return parameters

    {
        "err":0,
        "desc":"ERR_NONE",
        "dat":{
            "outputPower":[
                {
                    "val":"29.0001",
                    "ts":"2016-12-31 06:10:10"
                },
                {
                    "val":"30.0001",
                    "ts":"2016-12-31 06:15:10"
                }
            ]
        }
    }
    

    Returns a parameter description,outputPower Each item is arranged in a five-minute set of values in positive chronological order val: value ts: time (format: yyyy-mm-dd hh:mm:ss)

Digital collector

  • Query the data collector

    Query the required parameters for the data collector list plantid.The interface gets from the returned Query the item data

    This interface supports paging,See for details at Query the data collector

    Returns data dat Key data display

    "dat":{
        "collector":[
            {
                "pn":"COLLECTOR0001",
                "datFetch":60,
                "timezone":28800,
                "load":1,
                "uid":1,
                "pid":1
            },
            {
                "pn":"COLLECTOR0002",
                "datFetch":300,
                "timezone":28800,
                "load":1,
                "uid":1,
                "pid":1
            }
        ]
    }
    
  • Query the collection of devices under the data collector

    Query the collection of devices under the data collector

    Query the collection of devices under the data collector,Required parameter PN (data collector number) Can be obtained from the data returned by theQuery Data Collector

    {
        "err":0,
        "desc":"ERR_NONE",
        "dat":{
            "pn":"COLLECTOR0001",
            "dev":[
                {
                    "devcode":752,
                    "devaddr":1,
                    "sn":"687489900018",
                    "alias":"687489900018"
                }
            ]
        }
    }
    

device

  • Query the device

    Query the device

    When calling an interface,parameter pn 、pid Returned data obtained from Query the data collector or Query Data Collector Subordinate Equipment Collection

    Returns the description of the key data of the data device

pn: Digital collector number

sn:Device serial number

devcode: Device protocol encoding

devaddr: Device Address (485 bus)

     "device":[
            {
                "pn":"COLLECTOR0001",
                "devcode":512,
                "devaddr":1,
                "sn":"687489900018",
                "timezone":28800,
                "status":1,
                "uid":1,
                "pid":1
            },
            {
                "pn":"COLLECTOR0002",
                "devcode":512,
                "devaddr":1,
                "sn":"687489900018",
                "timezone":28800,
                "status":1,
                "uid":1,
                "pid":1
            }
        ]
  • Query the data details of the device for a specific day

    Query the data details of the device for a specific day

    Query the data details of the device for a specific day,This interface must pass the entry parameter pn、sn、devcode、devaddr,Can be obtained from the data returned by theQuery Device interface

Returns a description of the data:

title.size()always equals to filed.size()

title contains the name of the device protocol field,The value stored in filed corresponds to the field of the protocol

{
    "err":0,
    "desc":"ERR_NONE",
    "dat":{
        "title":[
            {
                "title":"id"
            },
            {
                "title":"timestamp"
            },
            {
                "title":"Serial number"
            },
            {
                "title":"PV1 input voltage",
                "unit":"V"
            },
            {
                "title":"PV2 input voltage",
                "unit":"V"
            },
            {
                "title":"PV3 input voltage",
                "unit":"V"
            },
            {
                "title":"PV1 input current",
                "unit":"A"
            },
            {
                "title":"PV2 input current",
                "unit":"A"
            },
            {
                "title":"PV3 input current",
                "unit":"A"
            },
            {
                "title":"PV1 input power",
                "unit":"W"
            },
            {
                "title":"PV2 input power",
                "unit":"W"
            },
            {
                "title":"PV3 input power",
                "unit":"W"
            },
            {
                "title":"R-phase grid voltage",
                "unit":"V"
            },
            {
                "title":"S-phase grid voltage",
                "unit":"V"
            },
            {
                "title":"T-phase grid voltage",
                "unit":"V"
            },
            {
                "title":"Grid-connected power",
                "unit":"W"
            },
            {
                "title":"Heat sink temperature",
                "unit":"°C"
            },
            {
                "title":"Module temperature",
                "unit":"°C"
            },
            {
                "title":"Inverter working mode"
            },
            {
                "title":"Elapsed time",
                "unit":"Hour"
            },
            {
                "title":"Power generation time",
                "unit":"Hour"
            },
            {
                "title":"Number of grid connections"
            },
            {
                "title":"Total power generation",
                "unit":"kWh"
            },
            {
                "title":"Power peak after start-up",
                "unit":"W"
            },
            {
                "title":"Power peak of the day",
                "unit":"W"
            }
        ],
        "row":[
            {
                "field":[
                    "bcaa940319ac11e7bde91c6f6593e938",
                    "2017-04-05 11:06:40",
                    "687484400018",
                    "608.4",
                    "582.9",
                    "9.8",
                    "1.76",
                    "1.56",
                    "0.07",
                    "1071",
                    "914",
                    "0",
                    "233.1",
                    "240.3",
                    "225.5",
                    "1977",
                    "29.6",
                    "37.4",
                    "正常",
                    "120",
                    "116",
                    "000067",
                    "336",
                    "8668",
                    "3995"
                ]
            },
            Object{...},
            Object{...},
            Object{...}
        ]
    }
}

results matching ""

    No results matching ""