Hi! I'm a student and with my class I've decided to create a system of Home Automation based on a web page and some Arduinos.
Obviously I don't want you to build the project for me, but it would be great if you could give me some inputs.
Here's how the project should work: on a web page a user can control the shutters opening, heating, outdoor lightning, an alarm system and also see the state of the alarm; we should have only one Arduino with the Ethernet Shield, so this should be responsible of the communication with the web page and then control other Arduinos responsible of the real command of the different parts.
I have got only a few questions:
Should I use HTML or PHP to program the page?
Is it possible to use a domotics protocol such as X10 or KNX?
Could you tell me what Arduino libraries should I study to make all this work?
Thanks a lot!
You don't really have a choice of HTML or PHP, because the web app must inevitably generate HTML in order to provide a web site. Although PC-based web apps use a variety of server-side script engines to generate the HTML, and PHP is a very popular one, I'm not aware of anyone implementing support for anything like that on Arduino and I doubt that it would be feasible to do so. So it would be more realistic for you to generate the HTML directly in your sketch (for example by reading resources from files stored on a local SD card).
Although the Arduino can host a web server and can do everything you want in theory, it's not an ideal platform because it has very little memory and processing power available, only supports four connected sockets at a time (if you're using the commonly used network adapters) and provides no support at all for authentication, security, permissions management, logging and so on. If you don't mind including a PC in your solution you would get a much better solution by hosting the UI on your PC and have the web app communicate with the Arduino as required to send commands and read status data from it. A web service accessed by HTTP would be fine for that; since it would require far less complexity and performance than the main UI this would be a far better fit for the capabilities of the Arduino. You can do the whole thing on the Arduino if you want, but the effort/performance/functionality trade-off will be much worse.
Below is some good reading for a web setup. The X10 CM17A “firecracker” is a very easy interface for controlling x10 products with an arduino.