I want my emoncms server to record and display temperatures collected from multiple DS18B20 sensors (timestamping available with a RTC, if necessary). The DS18B20s will be attached to an Arduino Mega1280, which can communicate with a server via an ethernet shield.
I want dials to display the temperatures from each sensor as they are collected and graphs of sensor histories. So far I have a working emoncms server running in a debian virtual machine.
How should the arduino & ethernet shield broadcast the information? Are there any examples of simple sketches that do this? If so, where?
How do I set the emoncms system to find the temperature from the arduino over the network?
After setting up the arduino, I assume I need to set up a temperature input, but what kind of feeds, processes and arguments do I need?
Overall, does this kind of setup make sense? If not, what adjustments should be made?
Re: getting emoncms to listen to arduino
You should just need to make the Arduino send the data via HTTP requests, see http://openenergymonitor.org/emon/emoncms/using-emoncms#Sending_data_to_...
Re: getting emoncms to listen to arduino
I'm new to this.
I have previously made temperatures gathered from DS18B20s available over my local network (I could see them through a browser), and I see (on that example from your link) there is an http address but don't understand how emoncms identifies data as what it should collect.
What is this API key? How do I identify values broadcast from the arduino as those I want to collect and display?
Re: getting emoncms to listen to arduino
When you log in to emoncms you have an API link at the top. It's will provide you with the URL and key you need.
The work you have done previously has set the arduino up as an http server, you need to find an example to make it a client instead.
Data is identified to emoncms by the parameters at the end of the URL. In the given example, power and temperature are the input names - you could use temp1, temp2 etc.
Re: getting emoncms to listen to arduino
I thought about that and did some poking around, so what I'm thinking is that I have to set up my arduinoðernet-shield as a client with the IP address of the specific server I want it to send info to, then after collecting data have a line like:
client.println("GET /emoncms3/api/post.json?apikey=[crazyLongAPIstring]&json={temperature:variableName} HTTP/1.0");
Does that look right? If so, I also saw that some are having issues putting a variable after the input name, what might be the cause of that?
Re: getting emoncms to listen to arduino
Looks about right to me.
i don't have an arduino + ethershield (only use Nanodes) so can't confirm the issues you've reported with variables in the string, but unless you're trying to use quotes (") to enclose data.i can't see there being an issue - it's just a string of characters.
Best bet is to just give it a go really.