SmartMeter Interface / Reading API

Purpose of this API Endpoint is to publish and retrieve readings in a consensus based context.

post
Readings

https://api.corrently.io/core/reading
Persist sensor readings (designed for electricity meters) as a consensus change. Provides decoration for OBIS-Codes based on GreenPowerIndex (GrünstromIndex)
Request
Response
Form Data Parameters
externalAccount
optional
string
Any sort of external identifier of sensor/meter. If provided it requires a secret to be provided. Will return ethereum acount in responds.
secret
optional
string
Required if account or externalAccount is provided
account
optional
string
Ethereum style account. Required if no externalAccount is provided. If provided a secret is required.
signature
optional
string
Valid Hash Signature for account
1.8.0
required
integer
Meter Reading (preffered in wh)
timeStamp
optional
integer
TimeStamp of reading. If not provided current timeserver value is used. (In Unix Milliseconds)
time
optional
integer
alias for timeStamp
reading
optional
integer
alias for 1.8.0
energy
optional
integer
alias for 1.8.0
value
optional
integer
alias for 1.8.0
200: OK
Account updated
{
"err": null,
}

get

https://api.corrently.io/core/reading
Request
Response
Query Parameters
to
optional
number
Timetstamp to retrieve until
from
optional
number
Timestamp to retrieve from
history
optional
number
Number of milliseconds to use as resolution (defaults to 86400000)
account
required
string
Ethereum style address to retrieve reading for.
200: OK
{
1.8.0: 0, // Last Meter Reading
1.8.1: 0, // GreenPower Meter (share of 1.8.0)
1.8.2: 0, // GreyPower Meter (share of 1.8.0)
timeStamp: 1555886600359, // Last Update
credits: 1000, // number of credits
history: [ ], // previous item (if any)
from: 1555694223613, // as given in request query
to: 1556022723613, // as given in request query
resolution: 900000 // as given in requesst query
}