What's new
Carbonite

South Africa's Top Online Tech Classifieds!
Register a free account today to become a member! (No Under 18's)
Home of C.U.D.

loadshedding shutdown app

darkstorm369

Epic Member
Rating - 100%
15   0   0
Joined
Feb 2, 2012
Messages
138
Reaction score
61
Points
3,585
Location
Cape Town
Anyone interested in something like this?

I've made an app for myself and a couple of friends that allows you to select your area and shutdown your pc when you're scheduled for loadshedding.

 
Last edited:
Sounds interesting, where do you obtain the loadshedding schedules from?
 
and how secure is this? cause i am assuming you need to go through the firewall of everyones network?
 
No idea about Linux, but in Windows you can just use the auto-shutdown command:

shutdown-s-t XXX - where XXX is the time in seconds till your PC shuts down.

Alternatively, just create a basic task using task scheduler.
 
No idea about Linux, but in Windows you can just use the auto-shutdown command:

shutdown-s-t XXX - where XXX is the time in seconds till your PC shuts down.

Alternatively, just create a basic task using task scheduler.
That doesn't help when loadshedding stages change.
Spunds like he's offering something that is tied to the loadshedding times.
 
Sorry guys only got a chance to reply now, I'll upload something tonight for you guys to test.
Sounds interesting, where do you obtain the loadshedding schedules from?
There is a Github repo with the schedules that gets updated when loadshedding is active / changes stages: GitHub - beyarkay/eskom-calendar: Get your loadshedding schedule in your calendar and never be left in the dark! Open-source, up-to-date, and developer friendly.

This is pulled in from my server which is then processed and cached. The app calls my servers to get areas and times.

and how secure is this? cause i am assuming you need to go through the firewall of everyones network?
There is a network request to my server to get the schedule and current stage etc. I'm not sure you mean by secure in this context? If you're referring to malware, then yes it's secure and free of malware.

No idea about Linux, but in Windows you can just use the auto-shutdown command:

shutdown-s-t XXX - where XXX is the time in seconds till your PC shuts down.

Alternatively, just create a basic task using task scheduler.
This is exactly the command I run BUT based on the loadshedding schedule for your area (hopefully its in the list) so it's timed for your convenience.
That doesn't help when loadshedding stages change.
Spunds like he's offering something that is tied to the loadshedding times.
Yes a combination of both.

---

I've used c# to develop the app and I'm very much not a c# developer so with all the above said it's probably got a few bugs. I'll also need to add an attribution to the above github page before sharing with anyone.
 
There is a network request to my server to get the schedule and current stage etc. I'm not sure you mean by secure in this context? If you're referring to malware, then yes it's secure and free of malware.
Why call to your server, instead of end-user directly to the open source calendar?
 
Why call to your server, instead of end-user directly to the open source calendar?
I second this.

Chances of a github repo having no downtime are much higher than your server, no matter where it's hosted. Also, having that many calls to your server is going to just add unnecessary amounts of traffic, and more than likely push your billing through the roof, depending on your provider.
Another thing is that getting someone's phone to talk to your personal server is giving "command & control". The type of servers used in ransomware and remote access malware type of attacks.
Just my two cents.
 
I second this.

Chances of a github repo having no downtime are much higher than your server, no matter where it's hosted. Also, having that many calls to your server is going to just add unnecessary amounts of traffic, and more than likely push your billing through the roof, depending on your provider.
Another thing is that getting someone's phone to talk to your personal server is giving "command & control". The type of servers used in ransomware and remote access malware type of attacks.
Just my two cents.
Mmmmm... maybe it's a bad idea to share the app. You do raise a valid point and I don't want any problems with people saying they downloaded the app and now their pentium 4 is running slow and has a virus.
 
Mmmmm... maybe it's a bad idea to share the app. You do raise a valid point and I don't want any problems with people saying they downloaded the app and now their pentium 4 is running slow and has a virus.
Can't tell if you're being sincere or sarcastic. A true master at work here...
 
There is a JSON API version as well I believe.


I've been meaning to update my home automation tool that's using the CSV to this but I haven't gotten around to it yet...
Thanks, I did not know about that. I also want to do other projects with the data hence the use on my own server.
 
There is a network request to my server to get the schedule and current stage etc. I'm not sure you mean by secure in this context? If you're referring to malware, then yes it's secure and free of malware.


This is exactly the command I run
I like your idea, it is original.

The issue I see is that you are basically asking for remote shell access to a computer. This is the very conduit used for bot netting as well as the transfer of malware and not to mention jeopardising the data security of the connected devices.

I could go on but long story short, you sent me a link to the source code, so what is stopping a hacker from using that to gain unauthorized access to every device that uses your app?

I would back this idea, I like it, but the amount of security that will need to be implemented for it to meet industry standards is substantial.
 
Also, have you already published to Google Play? Because I can see you getting caught here, they have to approve your app and to an outsider the code will look straight up like malware.

POV: Gain remote access to PC, shut it down. That's a red flag
 
I like your idea, it is original.

The issue I see is that you are basically asking for remote shell access to a computer. This is the very conduit used for bot netting as well as the transfer of malware and not to mention jeopardising the data security of the connected devices.

I could go on but long story short, you sent me a link to the source code, so what is stopping a hacker from using that to gain unauthorized access to every device that uses your app?

I would back this idea, I like it, but the amount of security that will need to be implemented for it to meet industry standards is substantial.
Also, have you already published to Google Play? Because I can see you getting caught here, they have to approve your app and to an outsider the code will look straight up like malware.

POV: Gain remote access to PC, shut it down. That's a red flag
Woah, no that's not what the app does at all. To be 100% clear it's a simple HTTP GET request to my server the get the JSON data and parse it.

I'm not sure when I sent you a link to source code?

It's also a windows only app, no mobile version - not sure why you would want to shutdown your phone for loadshedding? I guess you're talking about using your phone to shutdown remotely, if thats the case then no, its standalone app on windows.
 
Woah, no that's not what the app does at all. To be 100% clear it's a simple HTTP GET request to my server the get the JSON data and parse it.

I'm not sure when I sent you a link to source code?

It's also a windows only app, no mobile version - not sure why you would want to shutdown your phone for loadshedding? I guess you're talking about using your phone to shutdown remotely, if thats the case then no, its standalone app on windows.
I don't understand what the hell these people are on about and I feel like I'm going crazy so just to confirm my sanity:

What you have in mind is just a program you run and you type in Brakpan, it gets the schedule from Github or your server whatever and then it just does a simple shutdown timer for 2400 seconds etc whatever your next schedule is correct?
 
I don't understand what the hell these people are on about and I feel like I'm going crazy so just to confirm my sanity:

What you have in mind is just a program you run and you type in Brakpan, it gets the schedule from Github or your server whatever and then it just does a simple shutdown timer for 2400 seconds etc whatever your next schedule is correct?
I'm going a little crazy also and yes more or less what you said.
 
Woah, no that's not what the app does at all. To be 100% clear it's a simple HTTP GET request to my server the get the JSON data and parse it.
Ah I see, okay well if it is passed with security tokens then that sounds good.
I'm not sure when I sent you a link to source code?
This was an error I saw a github link, I see now that it is jut an open-source plugin for loadshedding schedules.
It's also a windows only app, no mobile version - not sure why you would want to shutdown your phone for loadshedding? I guess you're talking about using your phone to shutdown remotely, if thats the case then no, its standalone app on windows.
Yes I assumed you meant a mobile 'app' which allows you to remotely shut down your PC based on a loadshedding schedule.

I am not criticizing at all, I am a developer myself so I was just curious. I hope we are on the same page.
 
I'm going a little crazy also and yes more or less what you said.
In my humble opinion:

Open Source would be awesome.
Having it run independently from your personal infrastructure would be best.
An option to "Hibernate" instead of Shutdown would be great as an extra option.
It's faster to resume from Hibernation than a Cold Boot.

I manage a fairly large domain environment. I am however not a Developer, although I dabble.
This would help me a lot. Nothing fancy is needed. Just a simple installed App in the Tray with Low Resource usage.
Malware free and I'll be happy.
 
Awesome. I'll give it a shot tomorrow. Do you have any advice on how I could modify it for a Hibernate option?
You could add the option in the dropdown and add a new logic block for `Hibernate`:

C#:
if (action == "Hibernate")
{
string shutdown_string = (warn_interval * 60).ToString();
// do the shutdown now.
Process.Start("shutdown", "/s /t " + shutdown_string); // <----- Change this

shutdownSchedule.Stop();
}

Looks like the option you want is `/hybrid` (i think): shutdown
 
You could add the option in the dropdown and add a new logic block for `Hibernate`:

C#:
if (action == "Hibernate")
{
string shutdown_string = (warn_interval * 60).ToString();
// do the shutdown now.
Process.Start("shutdown", "/s /t " + shutdown_string); // <----- Change this

shutdownSchedule.Stop();
}

Looks like the option you want is `/hybrid` (i think): shutdown
Thank you. I appreciate it. I'll try it tomorrow.
 
I can also add it for you, maybe over the weekend.
Thank you, I would appreciate it.
A mention just needs to be made in your Readme that Hibernation has to be enabled in Windows. It's not always enabled by default. If anyone wants to use the hibernation feature.

As far as my knowledge goes, if it's not enabled, nothing will execute. So the hibernation feature just won't work. It's just a note to add IMHO. Shutdown should work without an issue as is.

Edit:
Yep, not enabled by default, but easy to enable.

 
Last edited:
Good morning.

Some suggestions from me:

It would be great if the last applied Area could be saved. So it doesn't have to be selected each time.
A feature to minimize it to Tray would be great. Launching it as minimized would be better.
A simple Shortcut to the App can then be placed in the Start Menu Startup folder.
This doesn't need to be handled by your App, anyone can do it manually if needed.
I tested the App Shortcut on Startup and it works fine.

The "Warn me in:" text in the App has a mistake. It says Warm me (M).

I'm not 100% certain. But I think it applied a Shutdown today, during the Warning period.
I left it on 10 minutes warning time, it warned that a Shutdown will occur, and it Shutdown.

This is a bit confusing, since a Warning should occur, afterwards a period of Shutdown should occur.
So a Timer option to initiate a Shutdown is needed.
Warning > Timer Period (3 minutes until Shutdown as example) = Shutdown.
I know Windows has a Notification area in Windows 10 & 11. So adding it to the Notification area could work.

It's just my suggestions and I understand if nothing of the above could be implemented :)
 

Users who are viewing this thread

Latest posts

Back
Top Bottom