EskomSePush: API available

… ye me=forgot that a area query count as 5 calls… fckd… so exhausted all my calls trying to configure friends setup, still not finding proper area tags for "jeffreysbay, kouga, eastern cape…

is there a way to get a list of available are tags without making the call, are they listed in a doc somewhere ?

or can someone maybe help and make a call and find all the jeffreysbay areas / eastern cape, please.

G

hi all
how do i get rid of this being tagged…
All i was doing was trying to figure out which area etc code to use, and sadly burned through my 50 calls…

still need to figure out what area code etc to use for the below lat/long.

curl --location --request GET ‘https://developer.sepush.co.za/business/2.0/areas_nearby?lat=-34.017138&lon=24.920307&tesT=current’ --header ‘token: 55021691-743F41BD-A40672F8-FED71818’ |jq
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 94 100 94 0 0 178 0 --:–:-- --:–:-- --:–:-- 179
{
“error”: “Free account abuse detected - Limited access :scream_cat:. Please pay if you can.”

whats the exact command you used ?
G

hi h Tinu

you look like the goto to create yaml flows.
Can you maybe point me to an example how i can switch a switch off in HA based on “load shedding” integration.

G

Look through the examples on the integration’s github repo.

One of those should work for you?

… LOOSING it…

When I run : https://developer.sepush.co.za/business/2.0/areas_search?text=jeffreys

I get

{
    "areas": [
        {
            "id": "eskdo-10-jeffreysbaykougaeasterncape",
            "name": "Jeffreys Bay (10)",
            "region": "Eskom Direct, Kouga, Eastern Cape"
        },
        {
            "id": "eskme-10-jeffreysbaykougamunicipalityeasterncape",
            "name": "Jeffrey's Bay (10)",
            "region": "Eskom Municipal, Kouga Municipality, Eastern Cape"
        }
    ]
}

I now go HA/settings/Add Integration.
Enter my token.
it then ask me for region, if i put in jeffreys it finds nothing if i put in “eskme-10-jeffreysbay” or the full “eskme-10-jeffreysbaykougamunicipalityeasterncape”

and FFS after a couple of tries… because it find nothing… it f’ing blocked me due to thinking i’m an abuser again, now back to waiting f’ing 24hours, and if you email their web/contact address the guy say speak to community forum, ask him where that is and he does not respond.
this works great… when you get it working, but to get it working it’s ridiculous, their “i’m scared” settings are crazy sensitive…
G

Use the phone app to narrow it down, then you know what to search for.

Mine is: eskdo-16-portalfredndlambeeasterncape

Try: eskdo-10-jeffreysbaykougaeasterncape

You need to turn on debug logging for this integration before trying to set it up again.

in configuration.yaml you need

logger:
  logs:
    custom_components.load_shedding: debug

Add that config, then restart HA.
Then try to add the integration again by searching.
This time, the error provided by the ESP API should get logged to the logfile.
Without this, you will never figure out what you doing wrong.

… tried…
got the below back, so trying to figure out how to input this, as when I do it says it can’t find it.
This matches the mobile app.
G

{
    "areas": [
        {
            "id": "eskdo-10-jeffreysbaykougaeasterncape",
            "name": "Jeffreys Bay (10)",
            "region": "Eskom Direct, Kouga, Eastern Cape"
        },
        {
            "id": "eskme-10-jeffreysbaykougamunicipalityeasterncape",
            "name": "Jeffrey's Bay (10)",
            "region": "Eskom Municipal, Kouga Municipality, Eastern Cape"
        }
    ]
}

thanks for this…
will go and add it.
my issue has been it’s been telling me when I enter my token followed by region it never finds the region. based on the above area-search I need to figure out what to input, without eating ip tokens and getting blocked for abuse.
PS: where does it log to?
G

Does anyone know where it stores the configuration values, want to check/change it without removing/reading the integration…

love it… one second hit postman, get the json body back, go into hA and try enter information, and I’m f’ing blocked again… on the very first call.

G

The debug logging should give more information. More so than the error you get in HA.

Eskom devs recommend AGAINST using your api key on the postman website. This is probably the whole reason why you get blocked. The only time you should use postman, is if you use the app on your pc. Do not use the website to test against your own key.

I was blocked very first… never gotten it to work there. I eventually tried Postman and got it working/response once…

postman was not the cause of the block, it’s for that matter the only way i got a response body back.

HA still not working, but been a bit stuck with some production issues all day, only mildly one eye looking at it today.

G

so… even with

test=current
calling
https://developer.sepush.co.za/business/2.0/areas_search?text=jeffreys&test=current
https://developer.sepush.co.za/business/2.0/areas_nearby?lat=-34.017138&lon=24.920307&tesT=current
and
https://developer.sepush.co.za/business/2.0/areas_search?text=jeffreys&test=current

account gets locked…
all while allowance is sitting on 1…

at least i got :slight_smile:

making me thing I should be using “Eskom Direct, Kouga, Eastern Cape” in region… me think, lets see when account is unlocked again.

{
    "events": [
        {
            "end": "2023-07-10T22:30:00+02:00",
            "note": "Stage 8 (TESTING: current)",
            "start": "2023-07-10T20:00:00+02:00"
        }
    ],
    "info": {
        "name": "TESTING Jeffreys Bay (10)",
        "region": "Eskom Direct, Kouga, Eastern Cape"
    },
    "schedule": {
        "days": [
            {
                "date": "2023-07-10",
                "name": "Monday",
                "stages": [
                    [
                        "04:00-06:30"
                    ],
                    [
                        "04:00-06:30"
                    ],
                    [
                        "04:00-06:30",
                        "20:00-22:30"
                    ],
                    [
                        "04:00-06:30",
                        "12:00-14:30",
                        "20:00-22:30"
                    ],
                    [
                        "04:00-08:30",
                        "12:00-14:30",
                        "20:00-22:30"
                    ],
                    [
                        "04:00-08:30",
                        "12:00-14:30",
                        "20:00-22:30"
                    ],
                    [
                        "04:00-08:30",
                        "12:00-14:30",
                        "20:00-00:30"
                    ],
                    [
                        "04:00-08:30",
                        "12:00-16:30",
                        "20:00-00:30"
                    ]
                ]
            },
            {
                "date": "2023-07-11",
                "name": "Tuesday",
                "stages": [
                    [
                        "12:00-14:30"
                    ],
                    [
                        "04:00-06:30",
                        "12:00-14:30"
                    ],
                    [
                        "04:00-06:30",
                        "12:00-14:30"
                    ],
                    [
                        "04:00-06:30",
                        "12:00-14:30",
                        "20:00-22:30"
                    ],
                    [
                        "04:00-06:30",
                        "12:00-16:30",
                        "20:00-22:30"
                    ],
                    [
                        "04:00-08:30",
                        "12:00-16:30",
                        "20:00-22:30"
                    ],
                    [
                        "04:00-08:30",
                        "12:00-16:30",
                        "20:00-22:30"
                    ],
                    [
                        "04:00-08:30",
                        "12:00-16:30",
                        "20:00-00:30"
                    ]
                ]
            },
            {
                "date": "2023-07-12",
                "name": "Wednesday",
                "stages": [
                    [
                        "20:00-22:30"
                    ],
                    [
                        "12:00-14:30",
                        "20:00-22:30"
                    ],
                    [
                        "04:00-06:30",
                        "12:00-14:30",
                        "20:00-22:30"
                    ],
                    [
                        "04:00-06:30",
                        "12:00-14:30",
                        "20:00-22:30"
                    ],
                    [
                        "04:00-06:30",
                        "12:00-14:30",
                        "20:00-00:30"
                    ],
                    [
                        "04:00-06:30",
                        "12:00-16:30",
                        "20:00-00:30"
                    ],
                    [
                        "04:00-08:30",
                        "12:00-16:30",
                        "20:00-00:30"
                    ],
                    [
                        "04:00-08:30",
                        "12:00-16:30",
                        "20:00-00:30"
                    ]
                ]
            },
            {
                "date": "2023-07-13",
                "name": "Thursday",
                "stages": [
                    [],
                    [
                        "18:00-20:30"
                    ],
                    [
                        "10:00-12:30",
                        "18:00-20:30"
                    ],
                    [
                        "02:00-04:30",
                        "10:00-12:30",
                        "18:00-20:30"
                    ],
                    [
                        "02:00-04:30",
                        "10:00-12:30",
                        "18:00-20:30"
                    ],
                    [
                        "02:00-04:30",
                        "10:00-12:30",
                        "18:00-22:30"
                    ],
                    [
                        "02:00-04:30",
                        "10:00-14:30",
                        "18:00-22:30"
                    ],
                    [
                        "02:00-06:30",
                        "10:00-14:30",
                        "18:00-22:30"
                    ]
                ]
            },
            {
                "date": "2023-07-14",
                "name": "Friday",
                "stages": [
                    [
                        "02:00-04:30"
                    ],
                    [
                        "02:00-04:30"
                    ],
                    [
                        "02:00-04:30",
                        "18:00-20:30"
                    ],
                    [
                        "02:00-04:30",
                        "10:00-12:30",
                        "18:00-20:30"
                    ],
                    [
                        "02:00-06:30",
                        "10:00-12:30",
                        "18:00-20:30"
                    ],
                    [
                        "02:00-06:30",
                        "10:00-12:30",
                        "18:00-20:30"
                    ],
                    [
                        "02:00-06:30",
                        "10:00-12:30",
                        "18:00-22:30"
                    ],
                    [
                        "02:00-06:30",
                        "10:00-14:30",
                        "18:00-22:30"
                    ]
                ]
            },
            {
                "date": "2023-07-15",
                "name": "Saturday",
                "stages": [
                    [
                        "10:00-12:30"
                    ],
                    [
                        "02:00-04:30",
                        "10:00-12:30"
                    ],
                    [
                        "02:00-04:30",
                        "10:00-12:30"
                    ],
                    [
                        "02:00-04:30",
                        "10:00-12:30",
                        "18:00-20:30"
                    ],
                    [
                        "02:00-04:30",
                        "10:00-14:30",
                        "18:00-20:30"
                    ],
                    [
                        "02:00-06:30",
                        "10:00-14:30",
                        "18:00-20:30"
                    ],
                    [
                        "02:00-06:30",
                        "10:00-14:30",
                        "18:00-20:30"
                    ],
                    [
                        "02:00-06:30",
                        "10:00-14:30",
                        "18:00-22:30"
                    ]
                ]
            },
            {
                "date": "2023-07-16",
                "name": "Sunday",
                "stages": [
                    [
                        "18:00-20:30"
                    ],
                    [
                        "10:00-12:30",
                        "18:00-20:30"
                    ],
                    [
                        "02:00-04:30",
                        "10:00-12:30",
                        "18:00-20:30"
                    ],
                    [
                        "02:00-04:30",
                        "10:00-12:30",
                        "18:00-20:30"
                    ],
                    [
                        "02:00-04:30",
                        "10:00-12:30",
                        "18:00-22:30"
                    ],
                    [
                        "02:00-04:30",
                        "10:00-14:30",
                        "18:00-22:30"
                    ],
                    [
                        "02:00-06:30",
                        "10:00-14:30",
                        "18:00-22:30"
                    ],
                    [
                        "02:00-06:30",
                        "10:00-14:30",
                        "18:00-22:30"
                    ]
                ]
            }
        ],
        "source": "https://example.com/test.schedule/current"
    }
}

G

I think I know what your issue is without knowing what your issue is.

You test on postman, it works. Ok lets ignore this for now.
You try on HA and boom your key is locked for, abuse.

Tell me, who are you using as your ISP? You know, the internet connection your Home Assistant is using?

Before you shoot that down, lets look at the limits of the free ESP API keys.

  1. Only allowed 50 api calls. Not the issue.
  2. Only allowed to use 1 free API key PER ip address.

I think #2 is your issue. ISPs like Afrihost, Vodacom, MTN (well all cellphone/lte providers) uses CGNAT on IPv4. What his mean is, multiple users are on the same ip address.

The solutions around this, is to ask your ISP if its Afrihost, to give you a dedicated ip address. I dont know the process.
Or, move to another ISP if you are on fibre.
If you are on LTE, Afrihost LTE give you, your own public ip address, unlike their fibre (TnC, this is only on some fibre networks, not all).

Anyways, thats my best guess.

1 Like

… I know ::slight_smile: where you going with this…

Not issue, I have a static IP address.

Eventually resolved last night. steps… enter api key, followed by “Jeffreys Bay (10)” this then brought up the correct list…
problem… and this is really strange, I previously entered “Jeffreys” and or “jeffreys” which resulted in no areas returned.
My Postman call based on my Lat/long returned the below which I then used to figure out what it wanted, via a couple of bugger off you blocked again until i found the golden buzzer/answer :wink:

{
    "areas": [
        {
            "id": "eskdo-10-jeffreysbaykougaeasterncape",
            "name": "Jeffreys Bay (10)",
            "region": "Eskom Direct, Kouga, Eastern Cape"
        },
        {
            "id": "eskme-10-jeffreysbaykougamunicipalityeasterncape",
            "name": "Jeffrey's Bay (10)",
            "region": "Eskom Municipal, Kouga Municipality, Eastern Cape"
        }
    ]
}

G

Telkom mobile routes everyone over two IP addresses. Which wreaks havoc with some of our “knocking” setups (where you use one port to auth a connection, and then make a second connection to another port). Telkom typically routes the two connections from different IP addresses, breaking this setup.

Don’t know if Vodacom still does this, but back in the day, they transparently routed all traffic on port 25 through their own mail servers. We had embedded devices in the field using SMTP as their transport protocol, and they could not auth against the wrong server.

But all of this pales compared to the weirdest firewall product I’ve ever seen, a few weeks ago. It is called Netfree, and it appears to be a product for people of the Jewish religion. They literally have real people screening the internet usage of their customers and manually whitelisting good websites. That’s not too weird, the weirder part is this: For ethical reasons, they cannot use Jewish employees. Cannot really have your own people looking at porn in order to protect some of your other people. So they use Indian employees, literally delegating the screening to rooms full of people in India.

This really is by far the weirdest product I’ve ever seen. And it had the same kind of weird behaviour, where connecting to port 443 (https) may not be connecting where you think it does.