Ergon Energy API Client
https://www.homesmartsavvy.ergon.com.au/habi-ws-ergon/api/v1/swagger.json
https://www.homesmartsavvy.ergon.com.au/habi-ws-ergon/api/v1/
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 |
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 |
The general usage of the API to obtain information relating to a user and their sites is:
- use the Token service to login and receive an authentication token.
- use the User service to retrieve information relating to the authenticated user.
- 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:
-
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"}
-
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":""}