m3h / loadshedding

Automatic hibernate during loadshedding
GNU General Public License v3.0
2 stars 2 forks source link

Add other areas (CPT, Tshwane) #5

Open knoffelcut opened 3 years ago

knoffelcut commented 3 years ago

Only "City Power" is currently included. Other areas, along with a readme.md describing the porting procedure and any relevant scripts used for porting to this repo's format, would be great.

m3h commented 3 years ago

I don't know of any good resource to get the schedules of different areas. AFAIK, the best is to go to your local municipality or electricity provider's website, and find it there - but the formats tend to be completely inconsistent across areas.

If I remember right, I 'hand-crafted' the "City Power" schedule by copy-pasting from the PDF and tidying up the output - which is where the format comes from.

If you look at https://github.com/m3h/loadshedding/blob/eb5c6e370f3fb94c329af674a6b06255ed7c6270/load_shedding_cp.csv#L1-3

you'll see the first line has the headers for the csv. The headers are 'start', 'end', 'stage', and the day of the month.

The contents is then 'start' - start time of the loadshedding block 'end' - end time of the loadshedding block 'stage' - loadshedding stage for row and then which blocks are affected for which day in that row.

The format also only lists the blocks that start being applicable for a particular stage from that stage upwards. e.g. if block 3A is listed at 10:00 on the 1st of the month for stage 1, it is implied that it is listed for stages 2-8 as well.

m3h commented 3 years ago

There's also a number of projects relating to loadshedding. A quick google turns up things that might come in handy... e.g. look at this

https://ewn.co.za/assets/loadshedding/capetown.html

m3h commented 3 years ago

https://mybroadband.co.za/forum/threads/loadshedding-api.672196/post-24690490

This looks really useful. Might be able to get the stages etc. from Eskom's API