1-Wire Code and Sending Temps to Grovestreams

I guess my question is this…I need a strategy to change the Electric Imp 1-Wire Tutorial code such that I can have more control over names of each sensor found, so I can package it up and send to Grovestreams.

When the 1-wire Tutorial code (http://electricimp.com/docs/resources/onewire/) was published, I changed it a bit to send to Xively. I inserted the code which you see below. It had the benefit of auto-populating Xively with any quantity of sensors without the need to name each one, but the downside is that they are all simply “maximtemp_1”, “maximtemp_2”, and so on. No biggie, since heating each sensor in commissioning easily identified “which sensor was which number”.

local id = "maximtemp_" + (device+1); local datapoint = { "idmaxim" : id, "tempmaxim" : format("%.2f",temp_f) } agent.send("maxim_temp",datapoint);

device.on("maxim_temp", function(datapoint) { postToXively(datapoint.tempmaxim, datapoint.idmaxim); });

I’m now attempting to use Grovestreams via their tutorial (https://www.grovestreams.com/developers/getting_started_elec_imp_temp.html). I removed anything that was sensor specific. I did a similar insert of code, as below. It works, but only sends temperature for one sensor, then gives an error in the log:

2014-07-30 11:43:17 UTC-4 [Agent] error sending message: {“message”:"exception.LabradorException: Feed PUT call limit has been exceeded for address - 0c2a69047a97. One call every 10 seconds is allowed. ",“errCode”:“RATE_LIMIT_EXCEEDED”,“success”:false}

`local id = “maximtemp_” + (device+1);
local datapoint = {
“idmaxim” : id,
“tempmaxim” : format("%.2f",temp_f)

local data = { id = hardware.getimpeeid(), mac = imp.getmacaddress(), temp = temp_f, voltage = hardware.voltage()}
agent.send(“GroveStreams”, data);

device.on("GroveStreams", function(data) { server.log("Sending temp: " + data.temp); client.Put(data); });

Have I left anything out which should be included to help people start to answer this? Please let me know if so.


Hi solarishot,

It seems like the error is coming from the cloud provider, meaning there’s a limitation as to how many requests per second you’re allowed to make (apparently 0.1 req/s max).

I can suggest a similar cloud tutorial here.

Good luck!

I saw that error message and for a moment I thought, “Woah! How do Grovestreams get the imp’s MAC address?”, but then I read the example code and realised it sends it explicitly…



currently am sending temperature data to ubidot’s .But i want to send the imp temperature data to Electric imp agent URL in Json format ? I am trying to send the temperature data from agent url to a mobile app using http post. Anyone can help in providing sample code for sending temp data to agent URL?