We are trying to get data to a platform called CommonSense (similar to Cosm), you can find it at http://www.sense-os.nl/commonsense. From what I understand Electric Imp will encode what I put in the string. local outTest = OutputPort("value","string"); local jsonOut = "&data[value]=15"; outTest.set(jsonOut); imp.configure("Name", [input_cosm()], [outTest]);
So, this means that it will be the same as the following curl request: curl -d "value=%26data%5Bvalue%5D%3D144" \\ -d "username=..." \\ -d "password=..." https://api.sense-os.nl/sensors/151525/data
while I would like something like: curl -d "value=&data[value=15]" \\ -d "username=..." \\ -d "password=..." https://api.sense-os.nl/sensors/151525/data
And preferably even something like this, corresponding to their format: curl -d "data[value=15]" \\ -d "username=..." \\ -d "password=..." https://api.sense-os.nl/sensors/151525/data
PS: What can I do to have a CommonSense block there. I think that will make them quite happy.
So, this is easy with agents but not possible with the existing API. See the agent docs on the devwiki - but this is currently in closed beta. If you’d like access to try this (and write some example code) then email manufacturer@electricimpcom.
Thanks! I will be happy to code this indeed! And also write the code to make a standard connector to CommonSense for example. Another provider is https://www.thingspeak.com/ which is used by http://www.myrobots.com, which is nice for us as a "robot cloud" company.
What I want to do basically is sent a HTTP Request POST whose value is a JSON (or another pair of value basically). Do I have to email manufacturer@electricimpcom and try the closed beta for this?
i figure it out yesterday, to set the output port format as string and use jsonize.
Btw, did you sent email @beardedinventor ? I dont think I received any
Yes - I sent it to the email address your forums account is registered with. If you want it sent somewhere else send me a message with the email address you want it to go to.