A simple application that will call to webhooks and publish to mqtt based on Eskom events. Also functions as a local copy of the Eskom Se Push API to not hammer their API.
- Integrations into Home-Assistant, but also really anything with a server.
- Business Customers who want a notification engine without having to write EskomSePush integrations
The container/program expects a .env file with the format below:
AREA_ID='some area id'
TOKEN='your Eskom Se Push API Token'
STATUS_AREA='eskom'
AREA_ID
is from the Eskom Se Push Api Areas Nearby (GPS) or Areas Search (Text).TOKEN
is from the Eskom Se Push Team, see the FAQ.STATUS_AREA
is eithereskom
orcapetown
. This may be expanded as more IPP's are brought online.
Fill in the config.ts file with your configuration
export const webhooks : { servers: { url: string, headers: {} }[] } = {
servers: [
{
url: "http://localhost:8080/webhook",
headers: {
'Content-Type': 'application/json',
'Token': "super secret"
}
}
]
}
export const mqttServer: { servers: { url: string, topic: string, username?: string, password?: string }[] } = {
servers: [
{
url: "http://localhost:8080/mqtt",
topic: "some topic",
username: "user",
password: "super secret"
}
]
}
docker build -t eskomsepushnotifier:latest .
docker-compose up -d