Back to Smartcitizen.me

Getting Sensor Data from other SCKs

Hi!

I’m interested in accessing the publicly available data for research, preferably in realtime. From using it briefly, it seems the API is currently geared toward retrieving information about one’s own SCK, but not the SCK of others.

Am I right thinking that ‘http://data.smartcitizen.me/testjson?device=:device_id’ is the proper way to get publicly available data? How could I query a list of all active SCKs?

Many thanks,
Mike

Hi @mikewinters,

Yes, that is the correct link for a single SCK (mine is http://data.smartcitizen.me/testjson?device=685). Other than writing a custom script to pull this from each active device, I don’t know of a current way to look at everything at once.

I know that this kind of thing was on the “Future Road-map” back in January. I’m not sure if there is a publicly accessible big-data pool that can be dipped into… yet.

Try sending an email to the the development team in Barcelona: support(at)smartcitizen(dot)me.

I’ll also see if I can dig-up a better answer.

-Matt
SCK685

Hey Matt, I still have a problem with capturing data via the API.

I was following the documentation and came to that following link which should run when I’m entering my API key and the ID of the device I want to capture data:

http://api.smartcitizen.me/v0.0.1/1438d2121c00e6b3af8a97849dd05453a1324b52
/685/posts.json

for that example I entered my API key and your ID. But I always get a {device:false}

can u tell me what the problem is?

Thx for your help,
Tobi

Hey @APNOA! Did you receive @guillem’s email!? Is everything ok!? Best

Hi @APNOA,

Try generating a new API key and give it another shot. NOTE: If you are already using your current SCK API key in any other software/hardware applications, you will need to update them with the newly generated API key.

http://api.smartcitizen.me/v0.0.1/d36ee981e85b93224a443d23ac3f2a782246a074/685/posts.json

Replace “d36ee981e85b93224a443d23ac3f2a782246a074” with your unique API key. Also replace “685” with your unique device ID.

I just tested it with mine and was able to get a response. Your’s should look alot like this if it works:

{“device”:{“id”:“685”,“title”:“West Bountiful Kit 1”,“description”:“SCK is in a 3D printed case”,“location”:“West Bountiful, United States”,“city”:“West Bountiful”,“country”:“United States”,“exposure”:“indoor”,“elevation”:“4268.0”,“geo_lat”:“40.893833900000000”,“geo_long”:"-111.901882800000010",“created”:“2014-02-14 16:27:06 UTC”,“last_insert_datetime”:“2015-08-07 15:41:46 UTC”,“posts”:[{“timestamp”:“2015-08-07 15:41:29 UTC”,“temp”:24.6,“hum”:37.9,“co”:26.02,“no2”:149.98,“light”:812.4,“noise”:50,“bat”:100,“panel”:0,“nets”:16,“insert_datetime”:“2015-08-07 15:41:46 UTC”}]}}

Let us know if you continue to have trouble.

-Matt
SCK 685

Hi @rohwer and @APNOA,

I will encourage you to test the new API, it will give you full access to all our platform in a better and most robust way.

http://developer.smartcitizen.me/

Let me know how it works,

Guillem