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?