Sending measurements over the web

Hello all,

I am new to the forum so nice to meet you :)
I have implemented the measuring mains current only energy monitor following the steps found here
Luckily, I can see, via serial terminal, the Irms and the apparent power values using putty and connecting to the right serial port. Also, instead of using Serial.print and println I have used a function to display the whole double values to have greater precision in the terminal.
Now, all I want is to be able to watch these measurements remotely and ideally via a web browser.
I have a server with a static ip where I can host all necessary php files for a simple UI with user confirmation ability.
But, here is the thing, I am little confused of how to store the measurements to have a history, obviously I can't trust the arduino UNO memory for many reasons and I would like to avoid the use of a SD card. I can provide a full time internet connection to UNO to send the data every 10 - 15 seconds for example.
To be clear enough, all I want is to logging in, after user confirmation from my site running on the server with static IP, and having a "stats" section showing the current measurements and the history.
Is emoncms all I am really asking?
I really would like to know your thoughts and advices.
Thank you!
 

 

TrystanLea's picture

Re: Sending measurements over the web

Sounds like a job for emoncms to me :) its got all that your asking for built into it. If your interested in learning how the code works, a good place to start is here: http://emoncms.org/site/docs/architecture.

TrystanLea's picture

Re: Sending measurements over the web

You might also be interested in the second part of a really old bit of documentation here: http://openenergymonitor.org/emon/node/88 its a very barebones example of a web application for logging data but I wrote it 3 years ago so pretty old. If there is interest I might be tempted to update it.

dim89's picture

Re: Sending measurements over the web

Hello Trystan,

thank you for replying.
I will check you links and will reply soon.
I just don't know if opencms suits best or not.
Anyway, i will come back soon!

dim89's picture

Re: Sending measurements over the web

Had so many things coming around but hopefully I am here right now.
I installed opencms and got my hands dirty with it for a while.
It's really cool but I decided to build from scratch a similar system and I am now thinking about the database, tables and the available javascript chart libraries.
It seems to me that I just founded my summer project!
Anyway, when I will complete the project I will post here the results!

Mattia Rossi's picture

Re: Sending measurements over the web

.. just curious .. why in hell would you do that except (maybe) for the fun of it ?

Different requirements, different ideas ?

dim89's picture

Re: Sending measurements over the web

Actually I am an undergraduate computer engineer and really like web development so I see it as a challenge.
As you logically wonder, in normal circumstances I would use opencms straight forward, but practice never hurt anyone.
This said, I am not reinventing the wheel every now and then but I really liked the idea of this project.
And lastly, yes, maybe there are different requirements because as I plan to do it, I want to have users/admins logged in.
But I want to give the ability to admins, from an option menu, to view the whole consumption from a specific area or town (obviously in areas where users live, as they have filled in the sign up form, and do have a power consumption monitor device).
I haven't searched opencms in so depth and don't know if something like this can be achieved.

Mattia Rossi's picture

Re: Sending measurements over the web

In my opinion (and from my 43 years and about 20 of them spent working with web applications and linux systems in general) i think you would have much more fun building a new module for emoncms than recreating your system from scratch.

You will need to adapt instead of creating everything like you have in mind, but you'll still have to create some tables, write some sql , design the logic for your application and won't have to spend a lot of time creating something that will probably be just an exercise. Your idea sounds really nice, and if you want to have a look at a similar system that tracks weather data instead of power consumption you can have a look at weather underground....

Having said that, just do whatever you think will be the most fun to do .... If you keep working in the software field you'll have plenty of situations where you'll have to write software as someone else says instead of how you want to write it :-) 

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.