Page 1 of 1
Home Automation by Web
Posted: Fri May 01, 2009 11:33 pm
by pmacpeter

I am new here, not sure if the php can set command to control wireless light switch but through the USB dongal? Please help......

Re: Home Automation by Web
Posted: Mon May 04, 2009 10:52 pm
by alex.barylski
Technically, yes. Practically probably not.
Re: Home Automation by Web
Posted: Tue May 05, 2009 2:09 am
by aaronhall
That's probably a one-liner in python
Re: Home Automation by Web
Posted: Tue May 05, 2009 3:46 am
by pmacpeter
We want to set up a very user friendly for user to set up their own floor plan, no matter big or small. Then add those control easily wherever they need. Then output the signal through USB dongal to RF. It will be fun and exciting.
Re: Home Automation by Web
Posted: Wed May 06, 2009 10:51 pm
by alex.barylski
The API provided by the manufacturer would make it an easy task in any language.
I said practically because PHP is typically used as a web language. That is, you build web applications with it and while you could likely add a PHP wrapper/binding around the API provided by the device unless your web server was connected to the same network as the devices -- I dunno how that would work to be honest.
Those devices work in various ways.
Some use the neutral wire that exists in every modern house, by sending signals of varying voltage, each device connected to the network acts somehting like a node on a bus network topology. Each device knows it's signals and responds accordingly, like dimming the lights after 10PM or whatever.
Other devices are more advanced and rely on WIFI.
What you probably want to do is control those wall unit devices from a central server, using PHP -- which technically is possible but practically would require you to setup a LAMP server in each house hold.
Having a central LAMP server, you "might" be able to notify client applications running on a standard household Windows machine and have that software propagate a request to the WIFI devices. Which is how existing systems work (X10??) -- from what I could tell. It's been years since I looked into this so it's possible the technology has changed drastically.
Anyways, the point is, you wouldn't be controlling the devices directly from a LAMP server you wanted people to login remotely anywhere on the web to turn on lights at home while on vacation in Rome or something.
The PHP server would send a signal to the household server (which would now need to operate like a server and stay on all the time) which would delegate the request to the appropriate device using the devices API that I mention above. In this case it's probably best to use somehting like C/C++ and use the native API (which is 99% chance -- a C API).
Best of luck to you, not many people are interested in home automation once they discover all that needs to go in to it to make it happen. Newer homes are actually hardwirded to support home automation and that is about the only market I see eventually becoming the standard. Only hardcore gadget geeks but into those portable, wireless automation devices.
Cheers,
Alex
Re: Home Automation by Web
Posted: Wed May 06, 2009 11:03 pm
by John Cartwright
I would prefer to use something along the lines of
X10, and use my Iphone as a controller

Re: Home Automation by Web
Posted: Wed May 06, 2009 11:07 pm
by pmacpeter
as X10 needs wiring, it is not better than RF.
Re: Home Automation by Web
Posted: Wed May 06, 2009 11:15 pm
by pmacpeter
Hi Alex,
Thanks for your detail anaylsis, there are something yes and no. Actually, we have been studying many platform, X10, ZWave, ZigBee....
ZWave has very good pc interface, it already has the "lamp server", so the web-program can easily to command these node through that server. However, drop out ZWave for some reasons, we would like to have our RF system, we may build a bridge to communicate with that.....if so, we need a ZWave expert.....anybody here????????
Peter