Welcome! Log In Create A New Profile

Advanced

Switching On and Off

Posted by bedek 
Switching On and Off
March 29, 2011 06:06AM
Hi,

As Dockstar don't have any button for switching on and off I would like to discuss possible options.
My target is to have ON-BUTTON solution which means that router + modem + nas will be switched on and off using only one button - to simplify process of turning on and off.

To clarify upfront:
- I don't want to run network devices 24/7 - if we add up router + modem + nas it might some power consumption
- I don't know solution although I've few thoughts.


Possible solutions:

1) script for monitoring router activity - this solution is partial - it only allows for switching off Dockstar and is based on cron script which pings every 5 seconds router ip and if there is no response it shuts down itself, the problem is that if the router goes up again Dockstar can't sense it

2) ups solution - Dockstar is connected to one plug of extension lead which have switches together with router and modem, switching on will bring up all devices, switching off will immediately turn off router and modem while Dockstar will be connected to UPS which at this stage will inform Dockstar over USB cable to turn it self off - problem with this solution is that using UPS might have influence on the power consumption

3) wake-on lan - this probably is not supported by Dockstar but if it was then my router (ddwrt) can wake up any device on the web when switched on - so with combination of script for monitoring router activity it would be some solution

What are you thoughts ?



Edited 1 time(s). Last edit at 03/29/2011 06:12AM by bedek.
Re: Switching On and Off
March 29, 2011 06:13AM
ad2 ups solution:

Probably it would be possible to build some battery powered device which would replace UPS - at the end it will be used only for graceful shutdown of the device.
Can anyone provide me simple electronic schema how to build such device ?



Edited 1 time(s). Last edit at 03/29/2011 06:25AM by bedek.
rat-netbook
Re: Switching On and Off
March 29, 2011 10:17AM
Since the whole point of installing Debian onto a Dockstar was to have an always-on low power system, splitting hairs over power consumption may not even be worth the cost or effort to try to make it possible for it turn itself (and everything else) on and off. The unit generally runs at a maximum of 5 watts... Depending on where you are the rate will vary, but 5 watts where I am amounts to:

1/200th of a kilowatt/hour
Average rate for 1 kWh = $0.20
720 hours in a month
3.6 kWh consumed at 5W for 30 days
Total cost to run the Dockstar 24/7 for one month: $0.72

Modems and routers generally use about the same, or less. Rounded up to the nearest dollar...

Modem + Router + Dockstar = $3/mo to run.

Building a UPS or battery device to shut down the dockstar would never be cost effective.

Just let it run.
Re: Switching On and Off
March 30, 2011 05:11AM
As I wrote in my post "I don't want to run network devices 24/7" - and it's not only because power consumption.

PS
On the weekend I'm going to use power meter to check how much power use my devices and will post it here.
Re: Switching On and Off
March 31, 2011 05:57PM
I've did some tests using power meter, here are my results:

a) modem + router = 10 W to 11 W (file transfer)
b) dockstar nas = 8W to 9W (50% CPU load = torrent + mp3 + test script for creating and deleting tmp 40MB file every 5 seconds)

Overall calculation of average cost in Republic of Ireland are:

a) modem + router = 1.12 EUR per Month
b) dockstar nas = 0.89 EUR per Month

PS
I'm still searching for solution how to switch on/off all above devices using ONE-BUTTON.

Actuallty other possible solution would be using special type of extension lead automatically switches off standby products when your main device is switched off, where main device would be router and modem and standby device would be nas (dockstar). Dockstar would run script to check if router is still up and switch it self down when router is down - the only problem with this type of extension leads it that they do not have build in delay time between main device and standby device which would give time to nas to run shutdown sequence :(
lou
Re: Switching On and Off
April 03, 2011 04:34PM
just use an bistable relais + an uC like ATtiny wired to serial #1 (console) by RS232

"on" is done by a normal switch to, lets say pos "A" (swichting the relais ; supplying your DS)

"off" is done by switching to pos "B"
=> ATtiny will send a "halt"-command to serial #1
=> as soon as ATtiny receives "system halted", he will wait add. 10 secs and flip relais back to "power off."

approx price for components: ATtiny <1E, relais driver ~0.1E, relais ~3E, button ~1E
approx solder-time to built: ~30min
approx power consumption: ATtiny <<1mA, relais 0A

you dont need additional cables, converters, levelshifters etc. ATtinys work with 3.3V

you even could extend the ATtiny functions to "real" power down or up external drives (or whatever) easily by simple RS232 commands.

u like?

;)
Re: Switching On and Off
April 03, 2011 05:14PM
Another option:

- timer used for bathroom fan
I've just found this device:
http://www.elektrobock.cz/en/timer/product.html?id=6
it's typically used for delayed switching off bathroom fan after the lights are turned off.

So the idea is:
- switching on (router + modem + nas) - just turn on all the device with one button
- switching off - router + modem are turned off immediately, while nas runs every 5 seconds script to check if router is active and if not then shuts it self down, nas power adaptor is connected over device with time delayed off so it's got time to shut itself gracefully.
Re: Switching On and Off
April 03, 2011 05:18PM
lou Wrote:
-------------------------------------------------------
> just use an bistable relais + an uC like ATtiny
> wired to serial #1 (console) by RS232
>
> "on" is done by a normal switch to, lets say pos
> "A" (swichting the relais ; supplying your DS)
>
> "off" is done by switching to pos "B"
> => ATtiny will send a "halt"-command to serial #1
> => as soon as ATtiny receives "system halted", he
> will wait add. 10 secs and flip relais back to
> "power off."
>
> approx price for components: ATtiny <1E, relais
> driver ~0.1E, relais ~3E, button ~1E
> approx solder-time to built: ~30min
> approx power consumption: ATtiny <<1mA, relais 0A
>
> you dont need additional cables, converters,
> levelshifters etc. ATtinys work with 3.3V
>
> you even could extend the ATtiny functions to
> "real" power down or up external drives (or
> whatever) easily by simple RS232 commands.
>
> u like?
>
> ;)


Hi,

I'm not following :) sorry.
Is it going to turn on and off router and modem also ?
My ideas is to have one physical button which will turn on modem + router + nas and then to switch them all - where extra time is needed for nas to gracefully shut it self down.
lou
Re: Switching On and Off
April 03, 2011 05:38PM
ok, to get more "physical", i attached a schematic proposal :)

I use the atmega8535 so far (PLCC, ~2E).
please ignore the most on the right side (OLED, temp sensors).

you will need some basic uC skills; but the uC-firmware for your demand will be quite simple.
(i guess it will be a 50-line program in assembler, or 20 lines in C)

i will add the left side soon in my setup, to hook up the DS with the 8535.
so i have a very simple interface to any external hardware devices. (router, modem, DS-display, HDs, keyboard, etc)
"delays" etc. can be choosen freely by uC firmware.

cu
lou

btw: the "bathroom-fan-timer proposal" is maybe the most economic one. i like :)



Edited 1 time(s). Last edit at 04/03/2011 05:59PM by lou.
Attachments:
open | download - DS_ATMEL_010.gif (40.6 KB)
Re: Switching On and Off
April 03, 2011 06:45PM
bedek Wrote:
-------------------------------------------------------
> Another option:
>
> - timer used for bathroom fan
> I've just found this device:
> http://www.elektrobock.cz/en/timer/product.html?id
> =6
> it's typically used for delayed switching off
> bathroom fan after the lights are turned off.
>
> So the idea is:
> - switching on (router + modem + nas) - just turn
> on all the device with one button
> - switching off - router + modem are turned off
> immediately, while nas runs every 5 seconds script
> to check if router is active and if not then shuts
> it self down, nas power adaptor is connected over
> device with time delayed off so it's got time to
> shut itself gracefully.

Have you looked into this time delayed surge protector ? cost around $US 45-50.
Re: Switching On and Off
April 04, 2011 08:25AM
bodhi Wrote:
-------------------------------------------------------
> bedek Wrote:
> --------------------------------------------------
> -----
> > Another option:
> >
> > - timer used for bathroom fan
> > I've just found this device:
> >
> http://www.elektrobock.cz/en/timer/product.html?id
>
> > =6
> > it's typically used for delayed switching off
> > bathroom fan after the lights are turned off.
> >
> > So the idea is:
> > - switching on (router + modem + nas) - just
> turn
> > on all the device with one button
> > - switching off - router + modem are turned off
> > immediately, while nas runs every 5 seconds
> script
> > to check if router is active and if not then
> shuts
> > it self down, nas power adaptor is connected
> over
> > device with time delayed off so it's got time
> to
> > shut itself gracefully.
>
> Have you looked into this time delayed surge
> protector ? cost around $US 45-50.

Could you add some more links - maybe this description is not fully clear.
Although I don't think that it will do the job, it works other way around, it turns ON device with delay - what I need is to turn OFF device with delay.
Re: Switching On and Off
April 04, 2011 10:51AM
bedek Wrote:
> My ideas is to have one physical button which will
> turn on modem + router + nas and then to switch
> them all ....

I cannot remember its name. But power strips (best without surge protector parts inside) are available that monitor consumption from a first plug. Connect the computer to that receptacle. When it sees a computer drawing power, then it powers on all other receptacles. When the computer powers off, that strip powers off all other receptacles. Now the modem, router, etc can all be powered on only when the computer is powered on. No other power off button required.

Sorry. The name completely escapes me.
Re: Switching On and Off
April 05, 2011 05:16AM
westom Wrote:
-------------------------------------------------------
> bedek Wrote:
> > My ideas is to have one physical button which
> will
> > turn on modem + router + nas and then to switch
> > them all ....
>
> I cannot remember its name. But power strips
> (best without surge protector parts inside) are
> available that monitor consumption from a first
> plug. Connect the computer to that receptacle.
> When it sees a computer drawing power, then it
> powers on all other receptacles. When the
> computer powers off, that strip powers off all
> other receptacles. Now the modem, router, etc can
> all be powered on only when the computer is
> powered on. No other power off button required.
>
> Sorry. The name completely escapes me.


I might not fully understand but I don't think it will work, the problem is that you need to turn off server first - how would you do that if there is no physical button on dockstar ? What's more there might be a problem with dockstar that even if it's down then it still draws energy and this might not be recognized as main device (connected to the main socket) being down - which subsequently is used to power down the rest of devices.

I think this is type of device you're thinking of:
http://www.amazon.co.uk/Masterplug-Extension-Master-Socket-Slave-Sockets-Permanantly/dp/B002HMW2AK/ref=sr_1_7?ie=UTF8&s=diy&qid=1301998423&sr=1-7
Re: Switching On and Off
April 05, 2011 09:52AM
bedek Wrote:
-------------------------------------------------------
> but I don't think it will work, the problem is that
> you need to turn off server first - how would
>you do that if there is no physical button on
> dockstar ? What's more there might be a
> problem with dockstar that even if it's down
> then it still draws energy and this might not
> be recognized as main device (connected
> to the main socket) being down ...

The Amazon device is the concept. But, as usual, your answers will only be as good as the numbers provided. For example, how many watts does that server draw when off? These 'Masterplug' type devices typically do not look for zero power. They monitor for a near zero number. A threshold on some that is even adjustable. I cannot say more because neither you nor the Amazon sheet provided numbers.

When the service powers on, the router, modem, etc power on. Those devices do not power off until the server shutsdown and powers off. The server can be powered off even by a remote shutdown command from any authorized workstation. Software to do that is available both with a resource kit and using script languages (ie CLI).

Workstation somewhere on the network orders the server to shutdown. The workstation shuts off normally. Meanwhile the server does what is necessary to power off (a delay can be included in the command). The powers off thereby powering off any routers, modems, etc.

The version I was thinking of does not waste so much money (even make computer damage easier) by containing surge protector parts.
Re: Switching On and Off
April 06, 2011 06:54AM
You might want to check out an APC AP9211 MasterSwitch Power Distribution w/ AP9606

http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&item=280655431531&viewitem=&sspagename=ADME%3AB%3ASS%3AMOTORS%3A1123

Using SNMP you can control any outlet from multiple devices on the network.

HTH, Jim
Re: Switching On and Off
April 07, 2011 03:51PM
j10152 Wrote:
-------------------------------------------------------
> You might want to check out an APC AP9211
> MasterSwitch Power Distribution w/ AP9606
>
> http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&item
> =280655431531&viewitem=&sspagename=ADME%3AB%3ASS%3
> AMOTORS%3A1123
>
> Using SNMP you can control any outlet from
> multiple devices on the network.
>
> HTH, Jim

Hi,

That would be to much :) I think my option would be to use delayed bathroom switch with combination of script to recognize if router is active.
http://www.elektrobock.cz/en/timer/product.html?id=6
This device I'm planning to build into extension lead.

Regards,
Adam.
Re: Switching On and Off
April 08, 2011 04:08AM
bedek Wrote:
-------------------------------------------------------
> j10152 Wrote:
> --------------------------------------------------
> -----
> > You might want to check out an APC AP9211
> > MasterSwitch Power Distribution w/ AP9606
> >
> >
> http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&item
>
> >
> =280655431531&viewitem=&sspagename=ADME%3AB%3ASS%3
>
> > AMOTORS%3A1123
> >
> > Using SNMP you can control any outlet from
> > multiple devices on the network.
> >
> > HTH, Jim
>
> Hi,
>
> That would be to much :) I think my option would
> be to use delayed bathroom switch with combination
> of script to recognize if router is active.
> http://www.elektrobock.cz/en/timer/product.html?id
> =6
> This device I'm planning to build into extension
> lead.
>
> Regards,
> Adam.


Hi,

Looks like I was wrong, first the device which should be used is:
http://www.elektrobock.cz/en/timer/product.html?id=7
and not
http://www.elektrobock.cz/en/timer/product.html?id=6
(different functionality)
second - this switch requires that the device which will be turned off with delay must draw at lease 20W - as I've tested dockstar draws about 10W which is not enough for correct functioning of delayed switch :(

So at the end I've no idea how to do it except to ask on some forum how to build such delayed switch by my self :)

Regards,
Adam.
Re: Switching On and Off
April 08, 2011 04:33AM
Adam,

I think the strip I've mentioned above works both ways, power up and down. You'll need to contact BitsLimited and inquire about that.



Edited 1 time(s). Last edit at 04/08/2011 04:34AM by bodhi.
Re: Switching On and Off
April 08, 2011 05:23AM
bodhi Wrote:
-------------------------------------------------------
> Adam,
>
> I think the strip I've mentioned above works both
> ways, power up and down. You'll need to contact
> BitsLimited and inquire about that.

Not sure, looks like this device is switching ON with delay while this what I need is switching OFF with delay.
Where dockstar will be connected to the socket with delayed switch OFF.
Re: Switching On and Off
April 08, 2011 06:05AM
bedek Wrote:
-------------------------------------------------------
> bedek Wrote:
> --------------------------------------------------
> -----
> > j10152 Wrote:
> >
> --------------------------------------------------
>
> > -----
> > > You might want to check out an APC AP9211
> > > MasterSwitch Power Distribution w/ AP9606
> > >
> > >
> >
> http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&item
>
> >
> > >
> >
> =280655431531&viewitem=&sspagename=ADME%3AB%3ASS%3
>
> >
> > > AMOTORS%3A1123
> > >
> > > Using SNMP you can control any outlet from
> > > multiple devices on the network.
> > >
> > > HTH, Jim
> >
> > Hi,
> >
> > That would be to much :) I think my option
> would
> > be to use delayed bathroom switch with
> combination
> > of script to recognize if router is active.
> >
> http://www.elektrobock.cz/en/timer/product.html?id
>
> > =6
> > This device I'm planning to build into
> extension
> > lead.
> >
> > Regards,
> > Adam.
>
>
> Hi,
>
> Looks like I was wrong, first the device which
> should be used is:
> http://www.elektrobock.cz/en/timer/product.html?id
> =7
> and not
> http://www.elektrobock.cz/en/timer/product.html?id
> =6
> (different functionality)
> second - this switch requires that the device
> which will be turned off with delay must draw at
> lease 20W - as I've tested dockstar draws about
> 10W which is not enough for correct functioning of
> delayed switch :(
>
> So at the end I've no idea how to do it except to
> ask on some forum how to build such delayed switch
> by my self :)
>
> Regards,
> Adam.


On more info about these delay OFF timers, I've just received mail from the shop selling these devices, it looks like in stand-by mode they draw about 5W - in this case it looks like there is no point installing one if docskar with turned off HDD draws this same amount of electricity.

As conclusion I think that best solution is to set correctly spin down on HDD and leave device always on :) - if you have HDD installed at all.
Re: Switching On and Off
April 08, 2011 11:06PM
bedek Wrote:
-------------------------------------------------------
> bodhi Wrote:
> --------------------------------------------------
> -----
> > Adam,
> >
> > I think the strip I've mentioned above works
> both
> > ways, power up and down. You'll need to contact
> > BitsLimited and inquire about that.
>
> Not sure, looks like this device is switching ON
> with delay while this what I need is switching OFF
> with delay.
> Where dockstar will be connected to the socket
> with delayed switch OFF.

It does switch OFF with delay, the same amount of time as switching ON.
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: