API and sample code be used by API Miner to report data to Arkreen.
You need the authorization
and clientId
to report data to Arkreen Network, please goto the Arkreen website to find contact information, for example: email, telegram or discord etc., then contact Arkreen core team to request the report data permissions.
There are 2 kinds API Miner so far:
Type | Description |
---|---|
Consumption | API Miner be used report energy consumption data. |
Generation | API Miner be used report energy generation data. |
Arkreen Network requires the API Miner to report data following these rules:
Rule | Description |
---|---|
Report Interval | API Miner must report the real time data to Arkreen Network every 3 minutes at least. |
Arkreen Network provides JSON RPC APIs to be used by API Miner:
API | Description |
---|---|
edr_reportConsumeData | For API Miner to report energy consumption data. |
edr_reportGenerationData | For API Miner to report energy generation data. |
This sample code will send the consumption data to Arkreen Network.
The running environment of the sample is Nodejs
, please goto Nodejs Official Website to install.
git clone [email protected]:arkreen/DataReportApi.git
cd DataReportApi/sample
npm install
- Using any text editor to open
consig.js
file - Change the
clientId
variable to your client id - Change the
authorization
variable to your authorization
node app.js
When the application is running, consume data will be uploaded every 3 minutes, including real-time power and accumulated power consumption.
TODO.