Go Down

Topic: Standalone Datacollecting Webserver (Read 9061 times) previous topic - next topic

ArduinoGreenHouse


I have done a few projects with Arduino and also know C and know a Bit of web development

I am using the Arudino mega with the Ethernet shield
the sensors I have are thermistor LDR and a Humidity sensor   

Yea I have a hosting site not much done on it!
So far i have the 3 sensors reading the values and printing them on the Ethernet server

oh thats sound cool

Yea I have looked into that site for graphing seems good

Thanks

ArduinoGreenHouse, sorry for the delay getting back to you, I have been working on the project some more, getting the solar current sensor electronics installed and configured in the program.
Hopefully that will start to show values on the overview page as well as the trend page when the sun comes up in the morning Australian time.
For the next few days I unfortunately will not have a chance to do anything in the way of presenting the software as I will be away, though will do at the first opportunity.

Sounds like you have the right hardware bits for this to work, especially need the Mega with the extra memory as the program is too big for the smaller processors.
It might be that you have no need for sections of my code, such as the PID control loop for turbine and for solar dumping of excess energy.

If you are using the Arduino IDE I need to confirm that you can simply use my files from Eclipse IDE, which are filename.cpp and filename.h for the header, by renaming them?
If anybody following this thread knows, then it would be good to know.

Paul

ArduinoGreenHouse

Hi, thanks for replying
yea ok thats fine, yea I have the right hardware and yea i wouldn't think i need them sections of that code, basically my server will show a nice graphical webpage with a graph that shows the 3 sensors over a period of time which can be saved in a certain time intervals.
Quote
If you are using the Arduino IDE I need to confirm that you can simply use my files from Eclipse IDE, which are filename.cpp and filename.h for the header, by renaming them?
I not sure what you mean by this :/

Quote
ArduinoGrenHouse wrote in reply:
Quote
If you are using the Arduino IDE I need to confirm that you can simply use my files from Eclipse IDE, which are filename.cpp and filename.h for the header, by renaming them?

I not sure what you mean by this :/


I use Eclipse as my IDE for all my programming, arduino, html, javascript and so on. I haven't used the Arduino IDE for some time now.
My question is more about confirming that the files I use in Eclipse, you can directly use in the Arduino IDE if that is what you use.
I think you may need to change the file extension of cpp to ino, i.e. 'main.cpp' to main.ino' for it to work in Arduino IDE.
Can anybody else confirm this?
If you use Eclipse, then that is great.

I can't attach the files in these posts as some of them exceed the file size that can be use on the forum.
What I propose, is to use dropbox as the file storage location.

To get you started, I have copied the main section of code, where the setup and main loop are. It's not so big.
You need to look at them and start to see if you can make sense of them, they are documented.
Then as you start to understand the various components and can successfully compile it you should be right to make the necessary chamges for your setup.
I am not going to strip stuff out that you may not need, that will be up to you.

The dropbox location is https://www.dropbox.com/sh/gtjv0k6sos6yuf5/EKzPXRT4zj?m

I will continue to clean up the other files over the coming days and pop them into dropbox as well.
Let me know if you can access the two files.

Start a new project and check that you have the libraries listed at the top of main.cpp.
They are Ethernet, EthernetUDP, TimerThree (from the Arduino playground) as well you will need Webduino library from its Github location, https://github.com/sirleech/Webduino.

Paul

ArduinoGreenHouse

#19
Mar 05, 2013, 06:18 pm Last Edit: Mar 05, 2013, 10:45 pm by ArduinoGreenHouse Reason: 1
Hi, Just out of curiosity, I have the hosting sever set up, uploaded basic HTML website , Just wondering couldn't I use the arduino to send the data of the three singals to  pachube and get pachube to graph and send the graph onto my site? Was looking into this and I guess I found some example of this a setting up a trigger of some sort, can this be done? if so is it anygood/reliable, would cut my time alot!

Ok will give that a shot, have and great looking website now will try with eclipse!

Nick_Pyner


Couldn't I use the arduino to send the data of the three singals to  pachube and get pachube to graph and send the graph onto my site?


I think there has been recent discussion on the cosm forum about this. I just use the cosm site for the graphs.

Also note http://www.desert-home.com/2012/10/alternatives-to-cosm-pachube.html


Just wondering couldn't I use the arduino to send the data of the three singals to  pachube and get pachube to graph and send the graph onto my site?

Yes, you could, COSM exists for that reason.
Though you don't get COSM to send the graph to your site, rather, your site gets it from COSM.


Was looking into this and I guess I found some example of this a setting up a trigger of some sort, can this be done? if so is it anygood/reliable, would cut my time alot!

You 'guess' or you 'did' find an example and if you did, then by implicitly of statement and by my reckoning, it can be done.
A trigger to do what exactly?

I thought from what you were saying;

My plan is to have the sensors graphed in real time on the server with a datalogger with a RTC, my goal would be to have my server to have graphics like this example http://www.cs.helsinki.fi/u/ljlukkar/weatherstation with 3/4 sensors been on the graph

Has 'your goal' now changed?


Ok will give that a shot, have and great looking website now will try with eclipse!

Give what a shot?
Are you saying you have a great looking website (now?), if you are willing to share could we have a look?

Seems like you have raised more questions for me.
To help me, as I prefer to not guess and assume, would you be willing to be more clear and concise with your comments?

_____
Paul

ArduinoGreenHouse

Quote
Though you don't get COSM to send the graph to your site, rather, your site gets it from COSM.
ok i see, any idea of how that works? I have my temp being graphed on cosm but the temp value isnt right
Quote
find an example and if you did, then by implicitly of statement and by my reckoning, it can be done.
A trigger to do what exactly?
well this is what I was looking into for the trigger http://cosm.com/docs/v2/trigger/

My goal hasn't changed still want to have the 3 sensors graphed on the site

So far here is what I have done for my website still in a working progress http://www.glasshouseenvironment.com/index.php

#23
Mar 06, 2013, 01:17 pm Last Edit: Mar 06, 2013, 01:33 pm by rockwallaby Reason: 1
Stephen, so if one wishes to see anything on your web site, it seems one needs to login, is that right?
If so, are you willing to give details on logging in, so as to allow us to gain further insight?

On your 'about' page you have the following;
Quote
Hi! my name is Stephen I am a 4th year Student, that is studying Computer Engineering

Generally we refer to one's self as 'who' not 'that'.

Quote
Home and commercial growers can have a great piece of mind by knowing how a glasshouse or polytunnel is performing in their absence and that they can check it from a remote computer or mobile device


You are telling the world that home and commercial growers potentially can have a great piece of mind?
I think you are meaning to say something like this, please excuse my editing;
'Today, home and commercial agricultural growers can enjoy a better peace of mind knowing their automated glasshouses or poly-tunnels can be carefully monitored and controlled with Stephen's magic box'

You need to run your spell checker, lest your final year project attracts less marks.

_____
Paul

ArduinoGreenHouse

Yea that's very true thanks for that, will make changes so!

name stephen password 1110557

what is shown at the moment is a table of the user info, in the editor i have this part as private so when the user  (me) logs in it displays that table.

The plan,
when I Login I hope to have the graphs of the sensor displayed!

draythomp

#25
Mar 06, 2013, 05:14 pm Last Edit: Mar 06, 2013, 05:19 pm by draythomp Reason: 1
I collect and store data on cosm for my house; have been doing this for a few years now.  I have an arduino 2560 that acts as a collector for the various sensors and controls around the house and I send some of the data up to cosm, emoncms, and thingspeak.  The reason I send it to all three of these is that I wanted to try out as many of the cloud storage services for this kind of thing as I could.  The arduino collector also serves as a web server for control and monitoring of the house.  I can load its web page and it will tell me what's going on and I can change things if I want to.  

I put together some json code and it runs in the user's browser to present a graph of temperature and power usage for a 24 hour period.  I did it this way because I wanted it to be as close to real time as possible and I wanted to be able to expand the graph enough to see what appliances were running (you get to know them intimately over time).  The cool thing about using the user's browser is that the arduino doesn't have to do any work, it just sends code to the browser.  The json code is held on a cloud server as well so that it doesn't take up space on the arduino.

You can see the screen I put up to monitor the house, but remember, it's an arduino with 4 simultaneous connections, so you may have to try a couple of times to actually get in.  Once you get in and the page starts to load, the data for the last 24 hours is gathered and presented on your browser, so it may take 10 seconds or so to collect, and sometimes cosm will time out first.  The timeout doesn't happen very often so it doesn't bother me.  If you hit it with a cell phone, the little browsers on them sometimes don't like the iframe that holds the graphs and gauges, just use a different browser or use a pc.

This is very much a work in progress and probably will be for a long time.  I change it pretty often, mostly because I can, but sometimes I add or change something based on experience. The little arduino is at <link>, but be kind to it, it's only a little arduino, not a bank of servers like google or bing.

Oh, I also write about this setup on my blog, see the signature line for the link.
Trying to keep my house under control http://www.desert-home.com/

ArduinoGreenHouse

#26
Mar 06, 2013, 10:42 pm Last Edit: Mar 07, 2013, 12:40 am by ArduinoGreenHouse Reason: 1
So yea got my temperature being graphed on my website so now I have to get the other two working so does anyone know if you can send  data of 3sensors to cosm? or is there away to graph all three onto a single graph?

draythomp

You can send the data from a lot of sensors to cosm.  I send several to them.  The provide an easy way to get graphs, one data set at a time.  If you want to graph temperature and humidity, it's easy to send them the data and get graphs for each of them.  If you want both of them on the same graph, it gets harder.  The graph I have is temperature and power usage; that took some javascript code to do.  I just used the google graph api and some javascript code to do mine.

Take an actual look at cosm, they have a ton of articles on how to send the data and get it back to do something with.
Trying to keep my house under control http://www.desert-home.com/

ArduinoGreenHouse

yea got my temperature being graphed on my website! so more less on my way, ok cool thanks :P , so u can use 3sensors sent to cosm so does that mean in the arduino IDE i have to set up extra 2 feeds and API yea?

Nick_Pyner

#29
Mar 07, 2013, 02:47 am Last Edit: Mar 07, 2013, 11:40 pm by Nick_Pyner Reason: 1
You need to distinguish between feeds and datastreams.

Your API key is your personal cosm-usage pin which I understand can be used for several cosm feeds, amongst other things.

The feed id is for a specific feed display. It is to identify that display and the display can have several datastreams.

The datastream is the individual sensor, calculation, or information. If you just want to add a new datastream, you simply change the line in your programme

CosmFeed feed(83153, datastreams, 4) - in this case four streams and configure the extra stream. Cosm does the rest.




Go Up