CommonSense

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. :slight_smile:

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.

So, this is easy with agents
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.

Sorry, I’m a little bit confused.
I get to this thread through another thread: http://forums.electricimp.com/discussion/899

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?

Thanks

@fransiskapw - no need, i’ll get you setup. Expect an email shortly :slight_smile:

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.

@beardedinventor I am trying to do the same thing, could you please email me as well. thanks!