This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
francogp's profile picture

[1.32 - 1.4] "Wake on Lan" command/api/program

Started by francogp, 22 March 2012 - 05:26 AM
francogp #1
Posted 22 March 2012 - 06:26 AM
I think that would be great to have a command/program/api to remotely turn on (or off?) an specific computer (Wake on Lan).
Otherwise I have to turn on/off manually my 15-20 PC (GPS net, monitoring, etc) when I need them.

Every pc should have a white-list (what pc are allowed to turn on). The "wakeOnLan" command should have a parameter that allow to execute a startup programs (avoiding startup file modifications thing…) like monitor api.
Edited on 23 March 2012 - 04:43 AM
Casper7526 #2
Posted 22 March 2012 - 10:47 AM
Computer's save their on/off state…. if you exit the game with the computer on, it should be on (rebooted) when you restart.
Liraal #3
Posted 22 March 2012 - 11:58 AM
but it would be cool if such a feature got added. Maybe even as a peripheral.
Xfel #4
Posted 22 March 2012 - 12:14 PM
Well, a computer can access a directly adjacent computer/turtle like a peripheral and is also able to turn it on or off. If you want a specific program to be executed on startup, you can create a startup file.
bbqroast #5
Posted 22 March 2012 - 07:41 PM
Hmm… Maybe a flickering redstone cable should turn on a computer? Or a redstone torch?
francogp #6
Posted 23 March 2012 - 05:43 AM
I edit the original post to expose better the idea
Luanub #7
Posted 23 March 2012 - 05:59 AM
I think this idea only makes sense. I work for a well known database/server company. In our manufacturing system test department we installed computer controlled opto's that will control the power to a system. We simply issue an opto on command from a xterm and the system begins to power up.

Maybe we just need an "opto" periph. I'm just starting to learn Java or I would make one.
Cloudy #8
Posted 23 March 2012 - 09:58 AM
I understand the point, but why not just have the computer on waiting for a command via wireless rednet? When a computer is yielded (waiting for input) it doesn't take any processing power. Added to the fact that if a computer was on at the time of the server/game shutdown or chunk upload, it will automatically turn on on reload/restart, I don't think this would have much use.
francogp #9
Posted 28 March 2012 - 11:53 PM
I understand the point, but why not just have the computer on waiting for a command via wireless rednet? When a computer is yielded (waiting for input) it doesn't take any processing power. Added to the fact that if a computer was on at the time of the server/game shutdown or chunk upload, it will automatically turn on on reload/restart, I don't think this would have much use.

but you have to start the program manualy or modify the startup. With this, all will be hardcoded in the "hardware"
Cloudy #10
Posted 29 March 2012 - 01:02 AM
I understand the point, but why not just have the computer on waiting for a command via wireless rednet? When a computer is yielded (waiting for input) it doesn't take any processing power. Added to the fact that if a computer was on at the time of the server/game shutdown or chunk upload, it will automatically turn on on reload/restart, I don't think this would have much use.

but you have to start the program manualy or modify the startup. With this, all will be hardcoded in the "hardware"

Why is adding a startup file such a big hardship? I doubt a way of waking a computer remotely will be added when people are too lazy to edit one file to run a command.
francogp #11
Posted 29 March 2012 - 01:15 AM
I understand the point, but why not just have the computer on waiting for a command via wireless rednet? When a computer is yielded (waiting for input) it doesn't take any processing power. Added to the fact that if a computer was on at the time of the server/game shutdown or chunk upload, it will automatically turn on on reload/restart, I don't think this would have much use.

but you have to start the program manualy or modify the startup. With this, all will be hardcoded in the "hardware"

Why is adding a startup file such a big hardship? I doubt a way of waking a computer remotely will be added when people are too lazy to edit one file to run a command.

I think that Its an "optimization". If you have a PC waiting… threads are created in memory waiting for a msj. If a PC is shutdown, and hardcoded commnad wake it up (turn it on), you will start to use those threads in that moment (not while waiting) optimizing the use or your real pc/server.
Cloudy #12
Posted 29 March 2012 - 11:28 AM
I understand the point, but why not just have the computer on waiting for a command via wireless rednet? When a computer is yielded (waiting for input) it doesn't take any processing power. Added to the fact that if a computer was on at the time of the server/game shutdown or chunk upload, it will automatically turn on on reload/restart, I don't think this would have much use.

but you have to start the program manualy or modify the startup. With this, all will be hardcoded in the "hardware"

Why is adding a startup file such a big hardship? I doubt a way of waking a computer remotely will be added when people are too lazy to edit one file to run a command.

I think that Its an "optimization". If you have a PC waiting… threads are created in memory waiting for a msj. If a PC is shutdown, and hardcoded commnad wake it up (turn it on), you will start to use those threads in that moment (not while waiting) optimizing the use or your real pc/server.

When a computer is waiting for an event, it is not using up any processing power at all and it is taking up a nominal amount of memory. If you go out of chunk range too, the threads should get unloaded (although they admittedly don't in the current version, even on computer shutdown).

However, I was just voicing my viewpoint; dan may decide to add it, but I think it's unlikely.
Wolvan #13
Posted 29 March 2012 - 06:09 PM
Like the idea! I want it too