pgodwin / ErgonClient

Ergon Energy API Client

Repository from Github https://github.compgodwin/ErgonClientRepository from Github https://github.compgodwin/ErgonClient

ErgonClient

Ergon Energy API Client

Swagger

https://www.homesmartsavvy.ergon.com.au/habi-ws-ergon/api/v1/swagger.json

Base Url

https://www.homesmartsavvy.ergon.com.au/habi-ws-ergon/api/v1/

EMS API

Attributes

Metering Attributes

The attributes recorded by the metering devices

ID Name Units
201 Switch State 1=on, 0=off
202 Power milli-watts
203 Voltage milli-volts
205 Current milli-amps
207 Power Factor x1000
208 Frequency milli-hertz

Aggregation Attributes

The attributes computed for aggregations

ID Name Units
202 Power milli-watts
220 Dispatchable Power milli-watts
221 Baseline Power milli-watts
225 Apparent Power milli-volt-amps
226 Dispatchable Apparent Power milli-volt-amps
227 Baseline Apparent Power milli-volt-amps

Usage

The general usage of the API to obtain information relating to a user and their sites is:

  1. use the Token service to login and receive an authentication token.
  2. use the User service to retrieve information relating to the authenticated user.
  3. use the Site service to retrieve information relating to the authenticated user sites. This includes all the sites associated with the user (usually 1). The meters at the sites and energy attributes reported by the meters.

Examples:

  1. Authentication:

    curl -i -H "Accept: application/json" -H "Content-Type: application/json" -X POST http:///habi-ws-eddy/api/v1/token -d '{"userName":"", "password":""}'
               

    Response

    HTTP/1.1 200 OK  
    
    Content-Type: application/json  
    
    Content-Length: 48  
    
    Date: Thu, 17 Mar 2016 03:35:01 GMT  
    
    {"token":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}
               
  2. User:

    curl -i -H "Accept: application/json" -H "Content-Type: application/json" -H "X-Auth-Token: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -X GET http:///habi-ws-eddy/api/v1/user
               

    Response

    HTTP/1.1 200 OK  
    
    Content-Type: application/json  
    
    Content-Length: 109  
    
    Date: Thu, 17 Mar 2016 03:35:01 GMT  
    
    {"id":1,"userName":"","title":"<title>","firstName":"","lastName":"","mobileNo":"","emailAddress":""}
               

About

Ergon Energy API Client