Home Automation - Smartkit

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)
 
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>
 
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
 
That's it - I think - let me see if I can pull it into HA.
Try this in NodeRed:
 
Try this in NodeRed:

Not using node red - but I'll have a look.
 
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
 
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.
 
Found a JSON source for Eskom's schedule - will see what I can do with it over the weekend.
 
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
 
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.
 
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?
 
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.
 
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.
 
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.
 
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.
 
Use nut instead of whatever you are using now.

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

The NAS is standalone (Buffalo NAS) - access is limited - APC UPS is connected directly to it via USB, other than that - I don't have access to the UPS status. (I also can't access the UPS from another server - they're in different rooms)
 
https://github.com/tinuva/nodered-coct-loadshedding

@Tinuva do you do any automations using this? Like turning lights and things off before the event?

Specifically my Yeelights always return to their last state which means if they were left on as load shedding kicks in they tend to surprise you later.
In short, not yet.

For now I only wanted it to send us a message 20 minutes before loadshedding slot and at the start and end. It also tells us the slots for today and tomorrow. Its more so that we can plan around it.

It can be modified to automate things, like shutdown pcs not on inverter power etc.

The lights that I had automated, wouldn't need this, because I have something that check lights during the day every minute and turn them off. What I do miss however, is if the lights missed the turn on time during loadshedding. So far that I could potentially add something in. In short, I rather use continuous checks for lights.

That said, once moving in to the new house, planning on a proper solar/battery setup so that I don't need to automate around loadshedding except for a select few things like pool pump that I dont want on inverter power.
 
Top
Sign up to the MyBroadband newsletter
X