Web server controled pins - what is the best method?

Hi to all, this is my first post and this will also be my first arduino project.

I was contemplating a project to monitor the temperature in each level of my home and display the detected values in a web page. The web page will also need to have buttons to remotely switch pins on the arduino high or low to control relays for switching the AC or heating on or off and also display feedback for the current state of each relay pin so that I know which system is currently active

I have seen a few examples of this sort of thing already and may use some of the code in my project. I can put together html and can also get on with php so that helps a little.

I already have a server at home which handles my files, media, dnla, cloud space and also cctv.

I can't decide which route is best for my proposed project....

A. Create a web page on my existing server and use php to send serial commands to the arduino via usb and use it as an interface between the PC and the control relays and temp sensors.

Or

B. Employ ethernet and sd card sheilds and create the webserver and all the control code for the hardware on the arduino.

Obviously the PC consumes more power than the arduino but what are the other advantages/disadvantages of each method?
Ultimately which way do you guys think is best?

Regards
gromit

Well I'm biased, because I wrote a PC-based web control panel server which you can read about here: GitHub - billroy/bitlash-commander: Web-based dashboard builder for Arduino.

Both approaches are workable. It kind of depends on the tools you like to work with.

-br

billroy, that looks so smooth. I'm gonna have to try and use it ..
Are there any example web interfaces on the net?
I just hope my efforts justify yours.

I'd suggest running the webserver on a raspberrry PI (which is probably cheaper and definitiely easier), and use that to communicate with the arduino. Total power draw is still in single watts I think?

Ultimately which way do you guys think is best?

Well, lots of example arduino server code available. What have you tried so far?

Markvr - I a;ready have a server. A raspberry pi would be nice but It cant replace everything that I currently have.

Zoomkat - I haven't tried any code yet, although I have looked at lots. I was hoping to see some good examples or learn from others to help me decide which route to take.

The arduino has limited resources and usually example web pages are fairly simple. Yours is certainly doable and if you have an arduino with an SD card, there is opportunity to store web pages there and make a quite sophisticated web site.

Personally, I'd prefer to put the web page on something more powerful, be it Pi or PC and let it do the heavy lifting. You'll probably decide you want to enhance the system later - keeping records of your temperatures for example. If your ideas get complex, easier to do it outside of the arduino.

If your PC isn't on all the time, I like the Pi solution, for its low power consumption if nothing else. It need only play front man for the Arduino, no need to replace all your PC functions with it.

You asked about Bitlash Commander examples: I keep a copy running at http://bitlash-commander.herokuapp.com if you'd like to kick the tires without an Arduino attached.

-br

Wildbill - You are correct the project will no doubt continue evolving. I'm satisfied the best path is have a seperate server for the web side of things and keep the arduino for the hardware interface, rtc and one wire bus - will look into the pi ( I've wanted one for a while )

Billroy - its so good, I'll give it my best and share the results, it will take me a long while though.

Many thanks all...

gromit.

I certainly dont have as much experience or knowledge as the previous members who have posted..

but.. (and I may have missed this?) what OS is your server to be running?

If windows.. and PHP.. I dont think/believe you can get a TWO communication going over serial (USB) like you think..

(or maybe its completely different than my previous project attempts)

but I tried sorta the same thing.. (just to play around no real value other than learning/seeing results)

I had an Arduino connected to my PC on COM PORT: X..

The machine the Arduino was connected also had WAMP server installed on it.. (Apache, MySQL, PHP..etc)

had a PHP script as the 'go between' of the SERIAL commands/data being sent/flushed down the port...

however from what I have read/been told.. PHP will not be able to grab/read any data from the COM/SERIAL port.. (only send)

I created a simple Adobe Flash based web page (GUI) with some (3) numeric steppers on the page and a 'send' button.

Each stepper representing 1 die in the RGB led hooked up the Arduino on the other end.

I would enter in a value of 0-255 in each numeric stepper and send the data over.. and the Arduino would parse the data.. and update the color of the RGB led to match the values sent over..

this works over the LAN..

to get WAN (internet) access you woudl have to log into you router and forward over the http port (80) or whatever port you want to use.. to the machine that has WAMP server installed and the Arduino connected to it..

I have a link in my footer with the project details and source code..

but again.. I am in the understanding that PHP will not read data form the Arduino (and hence wont be able to display the temps you want or other data you want in the web page)