Hey guys, I am new in the forum.
Background data:My idea of this thread is to share my project and maybe get your opinion or experiences and also to help you out if anyone wants the code I am working on, etc.
As my house is under construction, I got really excited of being able to apply some domotics on it, after being a Java programmer for 3 years, I finally got the chance to play with hardware. The first version I am working on consists on
Lighting + Security handling.Design:My project relies on:
-Arduino uno
-Ethernet shield
-Server Machine
-IP cameras
I have planned to install an arduino + eth. shield per one or two rooms (when possible).
All this black boxes (uno + eth. shield) will be connected to a router or switch (I like the idea of the switch because I find better to separate the domotic´s net from my actual wifi + internet net), but this can also be done via software so I still don´t know if it is necessary. Below I will add a question about power sourcing this "boxes".
I expect that I´ll be installing 3 to 5 of this "boxes" in total.
The server machine role will be hosting a web page to manage the house remotely, also bring access to the ip cameras (I took a look at zone minder and found it very powerfull, zone handling, alerts, etc). One idea I like is having zoneminder watching the cameras and being able to talk to the arduino boards through ethernet (for example: turn on a light for a while) if something strange has been detected, "House alone" style haha. Server machine will be storing camera´s images and maybe media center (future plan).
Technical stuff:From the beggining of this project I had in mind that the system I used had to be able to work (normal use + soft configuration) regardless of the server availability.
What I have done to achieve this is storing an array of structs on Arduino´s eproom wich (each struct) consists of an input pin, output pin, a name and a type. This config can be read through ethernet by accessing
http://arduinoip/CONFIG, the response is JSON formatted (did it without a parser because of its simplicity). This config purpose is to map inputs to outputs for the lighting adjustment, acting like a flip flop with multiple inputs for each light.
The next thing after being able to read this configuration is how to write it remotely, I am actually working on this having in mind what I said before, that It must be done regardless of the server availability. To achieve this I am planning to host a web page on the arduino displaying this configuration in a form, being able to modify it and saving it (the form will be submitted to the arduino). IP + MAC address will also be displayed for modifications if needed.
If needed, this same web page will be hosted on the server, maybe with extended functionality, or at least nicer

.
Finally, the server communicates to the boards using RESTduino library. As the server is able to read each "box" configuration, it can handle events that affect more than one board (for example turn all the lights off), just by accessing
http://arduinoip/8/LOW will turn the 8 pin output off.
Hardware:The lighting on/off control will be done using the 5v Relay available on dx.com
Doubts:1. What do you recommend, having a power source for each arduino or having only one (more powerfull) all of them (with the advantage of having 9v through all he house for future)?
2. Relays, I don´t know where to install them, near the arduino or near the controlled object. I like that having it near the object (for example a lamp) will separate my arduino from 220v being safer to do maintenance on the board.
Feel free to leave any comment of opinion about any of the ideas I have.
Sory for my english and the extension of this thread, it got large.
Thanks,
Federico