How to export Arduino to Emoncms.org?

I built an Arduino energy monitor similar to what is described on this site. It works fine. Now I want to upload the data to Emoncms.org. I can find only one old sketch by T. Lea showing the code to use. Unfortunately it looks like it uses a function call json which I do not know how to compile with the sketch. Or is there another way to send data via the net to emoncms.org? Thanks.

JC

P.S. I assume emoncms.org is updated via the url line, right? So all the Arduino has to do is parse the power data into a url and send it. I am not sure how to do that.

Robert Wall's picture

Re: How to export Arduino to Emoncms.org?

The OEM system uses an emonTx remote sensing node to collect the data, which is transmitted wirelessly to a base station, which in turn has an Ethernet connection to your router.

You'll find all the information about putting together the JSON string in the sketches for the base here: https://github.com/openenergymonitor/NanodeRF or https://github.com/openenergymonitor/Open-Kontrol-Gateway

jamestford's picture

Re: How to export Arduino to Emoncms.org?

JC,

Wanted to check in to see if you had made any progress on your original quest. I am thinking about the same thing, rather than use separate transmission and receiving boards it would be much simpler to consolidate into one device to stream data to the internet. I was thinking of using a standard arduino with wireless shield. Thoughts?

I'm also interested to see if the funded wireless arduino projects on kickstarter come to fruition, check out the links below.

http://www.kickstarter.com/projects/sparkdevices/spark-core-wi-fi-for-ev...

http://www.kickstarter.com/projects/1608192864/rfduino-iphone-bluetooth-...

joecatch's picture

Re: How to export Arduino to Emoncms.org?

Thank you. That is exactly what I was looking for! I took that code and modified it for my use and got it working. I am now able to send my monitor date up to emoncms and use a dashboard to look at it.

 

My next problem is to figure out how anyone with the url can view my dashboard without logging in. This is fun stuff!

 

JC

joecatch's picture

Re: How to export Arduino to Emoncms.org?

Sorry but I don't think I will be of much help. I am using an Uno board with the Arduino Ethernet shield to upload to the net. I have a wired internet connection not far from my service panel. If I hadn't, my second choice was to use Xbee radios.

 

JC

Robert Wall's picture

Re: How to export Arduino to Emoncms.org?

"My next problem is to figure out how anyone with the url can view my dashboard without logging in."

You make the dashboard "public" and "published". See http://emoncms.org/site/docs/dashboards - "Dashboard configuration"

chaveiro's picture

Re: How to export Arduino to Emoncms.org?

joecatch , see https://github.com/chaveiro/EmonLibPro/tree/master/examples/EmonLibPro_E... for a reliable alternative to send data by ethernet shield. I'm using this at 2sec update rate.

Robert Wall's picture

Re: How to export Arduino to Emoncms.org?

"I'm using this at 2sec update rate"

This is very anti-social. Trystan requests you keep the update interval to not less than 5 seconds on emoncms.org.

chaveiro's picture

Re: How to export Arduino to Emoncms.org?

Robert, I'm using my own server, rules are different right?.

Server is one continent away.

The reason i state that info is to prove reability of the implementation that has to deal with much latency and minimal down time or when dhcp renews.

 

joecatch's picture

Re: How to export Arduino to Emoncms.org?

Thanks for the input. I whenever I make it PUBLIC and PUBLISHED and then go back later to check, the PUBLIC box keeps getting  unchecked. Something is unchecking the box after I check it.

Robert Wall's picture

Re: How to export Arduino to Emoncms.org?

Chaviero:

And joecatch has already said he's using emoncms.org, right? So it's reasonable to assume that if he uses your 2 s update, he will use more than his fair share of server disk space, right? And that is because he won't know that your advice is only for your own set-up, right? And your rules don't apply to emoncms.org, right?

Sorry, but I didn't realise the UK was in a different continent to Portugal.

Joe:

That's weird. Have you tried checking with a different browser? I say that because cache and cookies might be confusing the issue. A different browser won't have your permissions recorded in a cookie, so it will behave as someone else and give you a truer picture (not that we know it is wrong, but it's possible it is).

chaveiro's picture

Re: How to export Arduino to Emoncms.org?

Rob: Never said my hosting was in UK. Please don't troll.
Anyone curious see www.dreamhost.com cheap reliable hosting with ssh access.

 

The demo i pointed out has http code for reference, users can adapt to use any lib with it.

To change posting rate with emonLibPro change variable value in emonlibpro.h as below:

#define CALCULATESAMPLES 50 * 2 // Number of cycles to activate FlagCALC_READY

50hz * 2 = 2 second post rate
50hz * 5 = 5 second post rate
 
 
Joe: I have the same issue as you, need to keep logging in to see dashboard in different browsers/computers.

 

Comment viewing options

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