xively feed?

James Charlton's icon

Anyone had a go at bringing xively feed into max yet?

nnimar's icon

Hi James,

I have got something working. The new dict object makes everything so much more easier with the json format (xml has always been a nightmare).

I'll post something later if you are still interested.

nnimar's icon

Hi,

I'm having some trouble reading the xively data stream using json. While I can manage to read the main branch and the locations, I can't get the datastreams working...

Here is a patch. Can anyone show me how to separate the two streams ? The dic.viewer gives me two streams called 1 and 2 but I can't slice them (dict.slice) or unpack (dic.unpack) since there is a dictionary inside...

Max Patch
Copy patch and select New From Clipboard in Max.

Any ideas ?

nnimar's icon

This is one on of those Max monologues... found the solution, use datastreams[0] and datastreams[1] and it works, I will post the full patch later.

nnimar's icon

Here is a simple xively to JSON parser using the Max 6 dict feature (love it !). You need to enter an API first then your feed. My feed has 2 data streams but it's really easy to add more in the json parsing subpatch. If anyone improves this patch, please post it back !

xively2jsonP.maxpat
Max Patch