Please login or register.

Login with username, password and session length
Advanced search  

News:

The Buster PiX10Hub is here! Created by the Community, for the Community.:)% #:)

Author Topic: Advice for my first x10 project  (Read 2998 times)

joemag

  • Newbie
  • Helpful Post Rating: 0
  • Posts: 1
Advice for my first x10 project
« on: July 30, 2010, 02:06:56 AM »

Hello all, I'm a college student studying CS, and I bought some x10 stuff to play with at the end of last semester (the popular CM17a bundle). I was originally inspired by the MIT guys who automated their dorm as well as by the usual geeky desire to have a house that does everything for me one day. I used what I bought to control a few lights  during the last few weeks of school in order to convince my future roommate to let me attempt to do something similar to the MIDAS project in our room. As luck would have it, they also came in handy when a friend needed to turn a few desk lamps on and off at various times while working on a photography project; he was very happy with me after that. After that very fun experience I'm exited to start working on my dorm project. I however have come across an issue I can't seem to find a solution to through searching.

First I'll give some background on my project. The plan is to use an oldish small form factor pc running linux I have laying around for the control server, and use my CM17a to control lights. I also want to hook up a strobe, blacklight, and other party lighting to be controlled by the linux box. The goal is to have a web interface so my roommate and I can control the lights/modes from our laptops/smarthpones easily (he needs a nice GUI). Here is where my issues lies; I can't host a webserver from my dorm room. I have another linux box that I'm using as a simple fileserver at home, and can easily turn it into a LAMP server. What I can't figure out is how to make the webserver at my home to execute the control program in my dorm.

If someone has any idea how to do this your knowledge would be much appreciated. I'm comfortable doing any coding that may be needed, be it modifying something existing like heyu or making my own program. 

Also any advice about hooking up the party lighting would be great. A few lighting questions I can think of are:
What modules to use for blacklight, simple strobe light, disco ball, laser lights, etc.?
Any issues you've had when setting up such lighting?
Also I was wondering if SL575 screw-in dimmable lamp module fits nicely into one of those basic three headed floor lamps?

Thank you for any and all advice you can give me.
Logged

Knightrider

  • Community Organizer
  • Hero Member
  • ***
  • Helpful Post Rating: 62
  • Posts: 1743
  • I love my WM100!
    • This Automated House
Re: Advice for my first x10 project
« Reply #1 on: July 30, 2010, 06:45:52 AM »

Appliance modules work fine on most of my mobile DJ gear, with the exception of my strobes, which I had to isolate with a relay.

Where you going to find a SL575? And no, I doubt it will fit in the lamp.
Logged
Remote control is cool,

but automation rules!

pconroy

  • Hero Member
  • *****
  • Helpful Post Rating: 9
  • Posts: 294
Re: Advice for my first x10 project
« Reply #2 on: July 30, 2010, 11:28:31 AM »

First I'll give some background on my project. The plan is to use an oldish small form factor pc running linux I have laying around for the control server, and use my CM17a to control lights. I also want to hook up a strobe, blacklight, and other party lighting to be controlled by the linux box. The goal is to have a web interface so my roommate and I can control the lights/modes from our laptops/smarthpones easily (he needs a nice GUI). Here is where my issues lies; I can't host a webserver from my dorm room. I have another linux box that I'm using as a simple fileserver at home, and can easily turn it into a LAMP server. What I can't figure out is how to make the webserver at my home to execute the control program in my dorm.

If you're willing to write a LOT of code then you can do anything!  :)

if your Home Linux LAMP server can ping/connect to your dorm server (and you're using static IPs or have the DHCP issues solved) then you're almost there.

You can write PHP code, or 'C/C++/Java' code to open up a socket connection to your dorm box and send it a message.

When they click "Dorm Lamp On" on the web page - the code sends "DORM LAMP ON" in a TCP packet to your dorm server.  You've got a small hunk of code on the dorm server that listens for that message and then sends it to your X10 Controller (for example, it calls "exec( "heyon turn A1 on" );")


More or less, that's what I'm doing.
I have my own code to control the CM11A, CM19A, CP290 - but gave "heyu" a try and like it.  So I'm working *with* heyu.


When "heyu" detects something, I do the opposite:
- I have heyu execute a script (eg. "when A1 goes off, execute a1_off.sh")
- in that script, some small C code sends a TCP packet with ("DORM LAMP OFF") in it back to my home server
- the home server updates the database so the webpage now shows "Dorm Lamp Off"


So - step one to me - is can you ping your dorm box from your home box?
Logged
 

X10.com | About X10 | X10 Security Systems | Cameras| Package Deals
© Copyright 2014-2016 X10.com All rights reserved.