LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 01-26-2010, 08:26 PM   #1
bedazzled
LQ Newbie
 
Registered: Jan 2010
Posts: 3

Rep: Reputation: 0
Can you switch on a linux machine using x10?


hi all,

So I'm interested in home automation and specifically in the x10 protocol, primarily as a means to reduce electricity use. While x10 is interesting, it gets a lot more powerful if it's combined with a linux machine (to send stuff over the web, react to alarms, etc). However, if you have a linux machine, even a laptop, switched on all the time, this kinda defeats the goal of saving electricity.

It is possible to use a sensor to switch on power to a linux machine. However, the question is how to get the linux machine to respond to the availability of current by switching on? One possibility I've looked at is WOL (wake on LAN), but I don't see how the x10 gear could send an ethernet packet. Ideally, I just want the linux machine to notice - hey, I've got access to electricity, and switch on. Is that possible?

many thanks for any thoughts!
 
Old 01-26-2010, 09:03 PM   #2
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Desktops, at least, are turned on with a contact closure (the button on the front panel). I think it's 5 volts, but it certainly is low voltage.

Assuming that X10 offers relays to give you the isolated contact closure, that's all you need. (Even if you have to buy a relay, they're cheap...)

I'll bet that laptops are similar.
 
Old 01-27-2010, 07:56 AM   #3
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197
Many motherboards have the option to turn on automatically after power is restored after a power failure. That isn't in any way specific to Linux or Windows etc. It is a motherboard feature.

The simplest use of X10 would be to kill and then restore external power to the entire computer box resulting in the computer turning on and Linux starting.

Check your BIOS menu to see whether your motherboard has that feature (which would be enabled by changing a setting in the BIOS menu).
 
Old 01-27-2010, 08:28 AM   #4
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723
I don't know how X10 works, but if you can remotely operate a relay switch with it you can wire it instead of the computer's power button. Turning the relay on for about a second will start the computer.

Note that the relay has to be turned on and back off, not stay on all the time. That would be like holding down the power button on the computer all the time.
 
Old 01-27-2010, 08:34 AM   #5
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Quote:
Originally Posted by MTK358 View Post

Note that the relay has to be turned on and back off, not stay on all the time. That would be like holding down the power button on the computer all the time.
Good point!! You could probably make it work by putting a capacitor in series with the relay contacts and the switch---but you still need to eventually release the relay. There are also various kind of special-purpose relays--eg time delay.

If X10 can be programmed to close a relay, it presumably can be programmed to open it---but what is the time granularity available?
 
Old 01-27-2010, 08:39 AM   #6
eyemole80
Member
 
Registered: Jun 2004
Distribution: Fedora Core 1
Posts: 47
Blog Entries: 1

Rep: Reputation: 16
I guess Wake on Lan feature should have worked. but not really sure

Last edited by eyemole80; 01-27-2010 at 08:40 AM.
 
Old 01-27-2010, 09:15 AM   #7
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,680

Rep: Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894
There are X10 relay modules that have a momentary mode but you would have to wire it up in parallel with the existing power switch. An appliance module or a wall socket as already stated would be the easiest since it does not require any modifications to the computer itself assuming your computer has the power on BIOS feature. Make sure you get an appliance plug module and not a lamp module because you do not want any dimming functions. Also the electrical noise from the computers power supply may cause some X10 transmission reliability problems. I had to move the X10 transceiver to another socket on the other side of the room away from the computer before it would work.

FYI X10 is a very old protocol and there is better stuff out there like Insteon. CFLs can produce lots of noise which can cause X10 transmission reliability problems but depends on the lamps manufacture. Lots of info can be found by googling...
 
Old 01-27-2010, 09:30 AM   #8
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723
Quote:
Originally Posted by michaelk View Post
There are X10 relay modules that have a momentary mode but you would have to wire it up in parallel with the existing power switch. An appliance module or a wall socket as already stated would be the easiest since it does not require any modifications to the computer itself assuming your computer has the power on BIOS feature. Make sure you get an appliance plug module and not a lamp module because you do not want any dimming functions. Also the electrical noise from the computers power supply may cause some X10 transmission reliability problems. I had to move the X10 transceiver to another socket on the other side of the room away from the computer before it would work.

FYI X10 is a very old protocol and there is better stuff out there like Insteon. CFLs can produce lots of noise which can cause X10 transmission reliability problems but depends on the lamps manufacture. Lots of info can be found by googling...
How will just plugging in a computer turn it on?

Also, shutting down a Linux box by unplugging it (as opposed to a proper shutdown) is a VERY BAD IDEA that could cause data loss.
 
Old 01-27-2010, 09:51 AM   #9
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197
Quote:
Originally Posted by MTK358 View Post
How will just plugging in a computer turn it on?
Many motherboards have an option you can enable in the BIOS that makes them turn on when you plug in power.

If the OS then tells the BIOS to turn the computer off, it will remain off until either you press the power button or external power is removed and then restored.

For all that to work smoothly, you would want your control system to know whether the Linux box was already on. You don't want to turn it on by remove/restore power when it might have already been on.

Last edited by johnsfine; 01-27-2010 at 09:53 AM.
 
Old 01-27-2010, 09:52 AM   #10
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,680

Rep: Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894
Quote:
How will just plugging in a computer turn it on?
Many computers have a BIOS option to wake up after power loss. I do not have a computer that is capable so no real actual experience. In addition some BIOS include a wake up clock timer option and all you have to do is set the on time.

A cron job can be used to power the computer down and agree that you do not want to just remove power. There are other missing details as to if the OP wants to use some type of X10 timer to turn on the computer etc.
 
Old 01-27-2010, 01:15 PM   #11
salasi
Senior Member
 
Registered: Jul 2007
Location: Directly above centre of the earth, UK
Distribution: SuSE, plus some hopping
Posts: 4,070

Rep: Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897
Quote:
Originally Posted by bedazzled View Post
However, if you have a linux machine, even a laptop, switched on all the time, this kinda defeats the goal of saving electricity.
Well, it needn't be. Something like a linuxtop is fairly low power, a laptop could be put into a low power mode, there are mobile phone linux products that are very low power (although how to use them in your application could be, err, interesting), but there are distros for things like routers, and given the freedom that running Linux on a box like a router inherently offers and the fact that these things come with network ports, that might be an option for you. And there are things like embedded ARM boards that are low power, too (but to avoid hassle, you'd want a board that comes with a Linux Board Support Package).

So, just because its Linux doesn't mean that the power is elevated, unless you mean by Linux an ordinary desktop PC or a server.

Quote:
It is possible to use a sensor to switch on power to a linux machine.
Yes, but, as has been pointed out, off could be where you have to worry. But you say 'sensor'; what would this sense and how would that switch on the current? And bear in mind that you really want the linux box to do its stuff and then switch to the low power state, so you wouldn't want the sensor mechanism to prevent that from happening.
 
Old 01-27-2010, 04:55 PM   #12
bedazzled
LQ Newbie
 
Registered: Jan 2010
Posts: 3

Original Poster
Rep: Reputation: 0
wow, lots of good info and thoughts here. Okay, let me give some more background.

I'm trying to build a security system for a house, while minimising electricity usage. To achieve this, my thought was as follows. You've got an X10 motion sensor that notices someone inside the house. This triggers a transceiver, which switches on power to the linux box (and yes, I was thinking of a normal laptop rather than a router). My thought was to see if this would be sufficient to switch on the linux-box. As several people have pointed out, however, while it might switch it on, that would only work once - since the linux-box would then switch off (or go into low-power mode). I'll investigate the router option - do they have much lower wattage? Many thanks for all the electronics advice; I have no expertise in this area but it looks interesting.

again, many thanks.

by the way, I'm in the UK, so unfortunately Insteon doesn't seem to be an option.

Last edited by bedazzled; 01-27-2010 at 04:57 PM.
 
Old 01-28-2010, 02:51 PM   #13
salasi
Senior Member
 
Registered: Jul 2007
Location: Directly above centre of the earth, UK
Distribution: SuSE, plus some hopping
Posts: 4,070

Rep: Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897
Quote:
Originally Posted by bedazzled View Post
I'll investigate the router option - do they have much lower wattage?
In general, the typical boxes that you see in PC Warehouses -as opposed to the professional equipment - are in the 5 - 15 watt range, depending on spec, and how modern the equipment is (older using more power, for a given feature set and level of performance, but modern also tends to have a better feature set), so you'd have to be careful in making your choice.

By PC standards, they don't tend to have much memory in the box, and that might force you into memory-efficient programming, which you might look at as interesting challenge or you might look at as something that you are happy to throw money at, in order to avoid, I don't know.
 
Old 01-31-2010, 01:50 PM   #14
bedazzled
LQ Newbie
 
Registered: Jan 2010
Posts: 3

Original Poster
Rep: Reputation: 0
re the routers, do you have any particular recommendations as to model? Also, do you have any experience with the plug computers? (eg. SheevaPlug by Marvell) They're cheap (£100), but they're sold as development kits, so I'm not sure just how user-friendly they are for someone's who's linux-capable but hardly guru-level.

thanks!
 
Old 02-01-2010, 07:07 AM   #15
salasi
Senior Member
 
Registered: Jul 2007
Location: Directly above centre of the earth, UK
Distribution: SuSE, plus some hopping
Posts: 4,070

Rep: Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897
Quote:
Originally Posted by bedazzled View Post
re the routers, do you have any particular recommendations as to model?
Start from the supported lists from the specialist router distros (tomato, dd-wrt, etc...see, for example here)

Quote:
Also, do you have any experience with the plug computers? (eg. SheevaPlug by Marvell)
Sorry, no actual experience. But they seem like an attractive idea.

Quote:
They're cheap (£100), but they're sold as development kits, so I'm not sure just how user-friendly they are for someone's who's linux-capable but hardly guru-level.
Check that whatever you intend to use can be programmed in a language that you are happy writing in, and check the quality of support materials.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Switch to KDE4.2 on a production machine? How? Peacepunk Slackware 12 02-01-2009 01:54 AM
LXer: Linux on Board: Home Automation Using X10 LXer Syndicated Linux News 0 06-30-2006 03:54 PM
networking my linux machine with my xp machine through a 3com switch chefkahuna Linux - Networking 1 07-06-2005 09:01 AM
LINUX ON LAPTOPS: Samsung X10: NOTHING can be installed arthur1968 Linux - Laptop and Netbook 13 10-11-2003 04:32 PM
How to switch workspace on machine running vncviewer fullscreen? cmisip Linux - Networking 4 07-29-2003 05:41 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 03:11 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration