Retrieve information from the Eskom API
##What's going on here? This code makes a query to the myeskom.co.za website and pulls out the publically available information. Nothing funny is going on here, its just a different way to display the information that Eskom has made available
##Why?
I wanted something that displayed a simple 2-line summary. No fancy webapp, no icons. Just text
##Getting data thats relevant to you
You will need two pieces of information from the myeskom.co.za website in order for this to work. To get these pieces of information:
- Go to http://www.myeskom.co.za/
- Register an account (click on the top left icon -> My profile)
- Open your web browsers Developer console, go to the Network tab.
- Go back to the dashboard (top left icon -> Dashboard)
- Scroll through the Network requests, look for a POST to 24?=, Click it
- Select the Params subtab
- Copy the authKey and city values
- Put authKey and city into the mypowerstats scripts in place of the bogus values
##What you'll get
The response from the myeskom site is a JSON Object.
In the object you'll find some useful things, and some useless things
Useful:
- 'status' = Power Alert Status (Eskom's colour index of grid status)
- 'level' = Power Level (Eskom's way of stating the grid load)
- 'levelstatus' = Power Trend (Trend of the load. Up/Down/Stable)
Sort of useful:
- 'location' = Location (incase you forgot)
- 'tmp' = Outside Temperature (Celcius)
- 'appliances' = An Array of Appliances that Eskom thinks you should turn off
- 'name' = Name of the appliance you should turn off
Useless:
- 'nextloadsheddingdate' = Next Load Shedding Date (I've never seen this populated. It's always null)
- 'tiptitle' and 'tipofday' = Eskom gives you helpful Tips on saving electricity. Like using a blanket instead of a heater.
##License
This code is released under The MIT License (MIT).
##Credits
Written and maintained by Kieran Murphy [email protected]
If you find this helpful in any way and you want to say thanks, feel free to donate Bitcoin at 1Eyr72dHQs3RCo1tpXDeccyxjzqyXdYvuH
Thanks!