Home Automation - Smartkit

Steamy Tom

Executive Member
Joined
Jan 23, 2019
Messages
5,384
That's it - I think - let me see if I can pull it into HA.
cool, would be nice if they returned it in json, i wonder if you can manipulate the header of the request to specify the response type (i am no web dev for sure)
 

Tinuva

The Magician
Joined
Feb 10, 2005
Messages
9,139
cool, would be nice if they returned it in json, i wonder if you can manipulate the header of the request to specify the response type (i am no web dev for sure)
Nope.

Code:
~$ curl -X "GET" "http://loadshedding.eskom.co.za/LoadShedding/GetScheduleM/1062513/2/Western Cape/273?_=1582203120191" \
>     -H "Accept: application/json"
<html><head><title>Request Rejected</title></head><body>The requested URL was rejected. Please consult with your administrator.<br><br>Your support ID is: 12678412591289276556<br><br><a href='javascript:history.back();'>[Go Back]</a></body></html>
 

Steamy Tom

Executive Member
Joined
Jan 23, 2019
Messages
5,384
Nope.

Code:
~$ curl -X "GET" "http://loadshedding.eskom.co.za/LoadShedding/GetScheduleM/1062513/2/Western Cape/273?_=1582203120191" \
>     -H "Accept: application/json"
<html><head><title>Request Rejected</title></head><body>The requested URL was rejected. Please consult with your administrator.<br><br>Your support ID is: 12678412591289276556<br><br><a href='javascript:history.back();'>[Go Back]</a></body></html>
see - no web dev :p
 

ipodmusicman

Senior Member
Joined
Aug 11, 2003
Messages
707
That's it - I think - let me see if I can pull it into HA.
All I did was create a Google calendar and added the stage 1-3 times on it for our area. Now HA turns off lights, etc and shuts down before the power goes out. Works lekker.
 

Steamy Tom

Executive Member
Joined
Jan 23, 2019
Messages
5,384
All I did was create a Google calendar and added the stage 1-3 times on it for our area. Now HA turns off lights, etc and shuts down before the power goes out. Works lekker.
My schedule is also static as I am sure most are, so I have mine hardcoded also
 

xrapidx

Honorary Master
Joined
Feb 16, 2007
Messages
37,648
That sounds like a lot of manual labour... but has given me an idea - I think it would be better off pulling the data from the site, and writing it to Google Calendar.
 

xrapidx

Honorary Master
Joined
Feb 16, 2007
Messages
37,648
Found a JSON source for Eskom's schedule - will see what I can do with it over the weekend.
 

Steamy Tom

Executive Member
Joined
Jan 23, 2019
Messages
5,384
That sounds like a lot of manual labour... but has given me an idea - I think it would be better off pulling the data from the site, and writing it to Google Calendar.
it really isn't, my schedule literally repeats itself every 5 day cycle, so it is 5 if cases, the benefit is that I don't need to rely on some unreliable third party service
 

xrapidx

Honorary Master
Joined
Feb 16, 2007
Messages
37,648
Random question - if you guys are using google calendar with HA for loadshedding, how are you naming the entries for the different stages?

i.e. - if its Stage 2 - it would need to select the Stage 2 entries from the calendar.
 

SauRoNZA

Honorary Master
Joined
Jul 6, 2010
Messages
37,065
So, I have just about finished making my garage "smart" :cool:

Here's the automations done to the garage:

- Opening the back door:

Turns the lights on only if: Both roller doors are shut. Or if they are both open and the sun has set, light goes on.

- Opening the roller doors: (Left or right door):

Turns the lights on, only if the sun has set. Turns the light off, only if all doors to the garage has been closed and 30 seconds has passed since the last door closed.

And finally, when the house detects my wife's car or my car is leaving; it will open door for the car. So in my case, it will open the right door and in my wife's case, it will open the left door.

So in the morning for example, I open the back door to garage, light goes on, close the door and then get into the car, start the car and the garage door opens. Once the car has left, the door will close on its own too.

Then when I arrive home, the door will start opening as I get to my gate and by the time I get to the garage, it has opened fully. Park, get out and leave. Door closes after a minute.:D
Pretty happy with the overall setup - might need slight fine tuning as we use it more and discover any flaws in the system.
What are you using to detect the car starting? Or it’s motion?

And what fail safe is in place so that the wife doesn’t drive through the garage door should it not open?
 

xrapidx

Honorary Master
Joined
Feb 16, 2007
Messages
37,648
Load shed proofing my system is almost complete - the Kodi instances now start when mysql comes up - the servers shutdown before load shedding, and come on when power on is restored.

An interesting scenario though, how would the servers startup if loadshedding doesn't occur? e.g. Load shedding meant to start at 1pm, server shuts down - load shedding doesn't happen - so there's no power restored event to start the server :/

What are you using to detect the car starting? Or it’s motion?

And what fail safe is in place so that the wife doesn’t drive through the garage door should it not open?
You can probably use Torque - it's something I still want to look into.
 

SauRoNZA

Honorary Master
Joined
Jul 6, 2010
Messages
37,065
Load shed proofing my system is almost complete - the Kodi instances now start when mysql comes up - the servers shutdown before load shedding, and come on when power on is restored.

An interesting scenario though, how would the servers startup if loadshedding doesn't occur? e.g. Load shedding meant to start at 1pm, server shuts down - load shedding doesn't happen - so there's no power restored event to start the server :/



You can probably use Torque - it's something I still want to look into.
UPS?

Set a condition to only power down if it goes to battery, otherwise ignore the load shed instructions.
 

xrapidx

Honorary Master
Joined
Feb 16, 2007
Messages
37,648
UPS?

Set a condition to only power down if it goes to battery, otherwise ignore the load shed instructions.
The problem is my NAS - it doesn't seem to accept the commands to shutdown from the UPS, its configured for it - but - ignores it - so basically runs until the UPS battery dies.
 

SauRoNZA

Honorary Master
Joined
Jul 6, 2010
Messages
37,065
The problem is my NAS - it doesn't seem to accept the commands to shutdown from the UPS, its configured for it - but - ignores it - so basically runs until the UPS battery dies.
Use nut instead of whatever you are using now.

Setup a cron job against the status if you have to.
 
Top