NOTICE: All information contained herein is, and remains
the property of TechnoCore Automate.
Updated : 2026-03-16
ObjServiceLoadshedding integrates with the EskomSePush API 2.0 to
retrieve national load shedding status, area-specific schedules and
upcoming events, and area search. Designed for correlation with
solar/battery data to predict grid availability and optimize energy
usage.
The module lives in factory.service/package.gekkoridge/ as part of
the GekkoRidge home monitoring package.
Free tier provides 50 API calls per day. The API token is obtained
from eskomsepush.gumroad.com/l/api
(free — enter $0).
Base URL: https://developer.sepush.co.za/business/2.0
Authentication: token header with API key.
base:
eskomsepush:
token: "your_api_token_here"
settings:
base_url: https://developer.sepush.co.za/business/2.0
area_id: ""
min_record_interval_seconds: 900
The area_id is your suburb's unique identifier. Find it using the
search CLI command (e.g. python ObjServiceLoadshedding.py search "fourways").
National load shedding status.
| Field | Description |
|---|---|
stage |
Current stage (0=none, 1-8) |
stage_label |
Human-readable label |
stage_updated |
Last stage change timestamp |
next_stages |
Upcoming stage changes |
capetown_stage |
Cape Town municipal override (if any) |
Area-specific schedule and upcoming events.
| Field | Description |
|---|---|
area_name |
Suburb/area name |
area_region |
Region/municipality |
events |
List of upcoming events with start/end/stage |
schedule |
Full weekly schedule by day and stage |
Search for areas by name. Returns area IDs for use with
get_area_info().
| Field | Description |
|---|---|
id |
Area ID (use in get_area_info) |
name |
Area name |
region |
Region/municipality |
Find areas near GPS coordinates.
Check remaining daily API quota.
| Field | Description |
|---|---|
count |
Calls used today |
limit |
Daily limit (50 for free tier) |
| Method | Description |
|---|---|
is_loadshedding_active() |
Returns True if national stage > 0 |
get_next_event(area_id) |
Returns the next upcoming event or None |
Stores load shedding status snapshots as time-series rows.
Guid is generated via get_uuid("LOADSHED").
| Column | Type | Description |
|---|---|---|
| Guid | VARCHAR(64) PK | get_uuid("LOADSHED") |
| NationalStage | INT | Current national stage (0-8) |
| StageLabel | VARCHAR(32) | Human-readable stage label |
| StageUpdated | VARCHAR(64) | Last stage change timestamp |
| AreaId | VARCHAR(128) | Configured area ID |
| AreaName | VARCHAR(255) | Area name from API |
| NextEventStart | VARCHAR(64) | Next event start time |
| NextEventEnd | VARCHAR(64) | Next event end time |
| NextEventStage | INT | Next event stage |
| EventCount | INT | Total upcoming events |
| EventsJson | JSON | Full event list as JSON |
| Package | VARCHAR(255) | Axion package |
| Module | VARCHAR(255) | ObjServiceLoadshedding |
| CreateTime | DATETIME | DB insert timestamp |
The get_grid_solar_correlation query joins data_loadshedding
with data_solar by hour, enabling analysis of load shedding
stage vs battery SOC and solar production:
SELECT ls.NationalStage, s.BatterySoc, s.PvPowerTotal,
s.GridPowerTotal, s.ConsumptionPowerTotal
FROM data_loadshedding ls
INNER JOIN data_solar s
ON DATE(ls.CreateTime) = DATE(s.CreateTime)
AND HOUR(ls.CreateTime) = HOUR(s.CreateTime)
record_status(min_interval=900) fetches national status + area
events and inserts one row. Default interval is 15 minutes,
consuming ~4 API calls/hour (status + area per call), or ~96
calls/day — within the 50/day free limit if called every 30
minutes instead. Adjust min_interval accordingly.
For free tier, recommended: min_interval=1800 (30 min, ~48 calls/day).
| Command | Context Keys | Result Key |
|---|---|---|
status |
— | _loadshedding_result (JSON) |
area |
area_id (optional) |
_loadshedding_result (JSON) |
search |
text |
_loadshedding_result (JSON) |
record |
— | _loadshedding_result |
next_event |
area_id (optional) |
_loadshedding_result (JSON) |
is_active |
— | _loadshedding_result (active/inactive) |
python ObjServiceLoadshedding.py status
python ObjServiceLoadshedding.py area [area_id]
python ObjServiceLoadshedding.py search "fourways"
python ObjServiceLoadshedding.py nearby [-25.95] [28.23]
python ObjServiceLoadshedding.py allowance
python ObjServiceLoadshedding.py record
config.yaml under base.eskomsepush.tokenpython ObjServiceLoadshedding.py search "your suburb"area_id in ObjServiceLoadshedding.yaml settingspython ObjServiceLoadshedding.py statusfrom ObjServiceLoadshedding import ObjServiceApi
svc = ObjServiceApi()
status = svc.get_status()
print(f"Stage: {status['stage_label']}")
if svc.is_loadshedding_active():
event = svc.get_next_event()
print(f"Next: {event['start']} — {event['end']}")
areas = svc.search_areas("midrand")
for a in areas:
print(f"{a['id']} — {a['name']}")
Updated : 2026-03-16