Where have all the data/APIs gone?

Where have all the data/APIs gone?  

  By: straytaoist on Oct. 2, 2017, 9:32 p.m.

This might be a dumb question...but I can see all the sensors on the map...but I can't see get at any of the data they are submitting. Should I be able to see something? Anything? Am I holding it wrong?


Mostly as I have some LoRaWan kit arriving rsn, and want to pump some different info in (in the first instance it will be dB readings taken as I cycle around the city on my commute-route). It will be location specific, with a timestamp.

Or...isn't this the kinda thing you are up to? I used to use the car park data (until South Cambs tripped over the server and it never reappeared, even though the same data seemed to be used by SmartCambridge things in various places I can't remember).

I want to upload data. Is anyone doing this? I really want to submit stuff, then build other things using that (and make models as well, but that is a different kettle of thinkings. My neural net mostly has learned my routes, but I want to feed it with more environmental data).

And crikey, kudos for the reach of the network. Given I live euphemistically south of the city, my whole cycle in to work should be covered.



Re: Where have all the data/APIs gone?  

  By: ijl20 on Oct. 3, 2017, 12:58 p.m.

Congratulations being the first person (other than me) to post to this new forum...

http://smartcambridge.org/csn/network is the picture of the LoraWAN basestations, not the sensors on the network. I.e. it shows you where the antennas are and gives you a clue to where might be good for a signal. You can see we've tried to ensure ok coverage within the City of Cambridge while also covering a reasonable distance around it (which is easier).

All below assumes you have 'logged on' to this website. The user account for the Applications / Sensors is the same as your forum account.

Firstly you need an 'Application' for your data which needs to be your own web server that can receive 'http POSTs'. Data from your sensor will be POSTed in a fairly obvious JSON format to that web address each time your sensor sends it. You add your application via the My Applicaitons page http://smartcambridge.org/csn/apps which will basically prompt you for the web address of your server.

You add your sensors to the network via the 'My Devices' page which is at http://smartcambridge.org/csn/devices (click the + button) and, rather crucially, each time you add a sensor you assign it to one of your 'Applications' that you created first.

This is a public standard 'LoraWAN' network so you need to learn the basics of that.

When you add a sensor you have a choice of 'ABP' or 'OTAA'. These differ in the hard-coded identifiers you put into yout sensor. ABP is marginally the simplest to get up-and-running by which time you have some familiarity and might choose OTAA in due course.

The network is of type 'LoraWAN' - this is long range (good), low power (good), inexpensive (good) and low data rate (a necessary compromise). It is designed primarily for 'upload' of sensor data (ie. from sensor to your application), typically a few bytes every few minutes. Our network is currently not supporting the download of data to your sensor, although that is technically feasible with LoraWAN at very low data rates, think of it as a few bytes per day if at all.

So it's possible to build a battery powered sensor, for maybe £20, that sends a simple reading (like temperature, sound level, position, NO2 parts-per-million) say every 10 minutes. But for higher data rates or balanced two-way communication you need wifi or mobile phone networking and then you will have battery life measured in days at the most.

Re: Where have all the data/APIs gone?  

  By: straytaoist on Oct. 3, 2017, 2:02 p.m.

'basestations' d'oh! I'm an idiot.

Also d'oh: I presumed that there was also a distributed data store, which then anyone could make API calls to to build their own apps using the near-realtime data. So I could connect my sensor to the network and upload info. You know, allow the Great and the Good to build systems to make Cambridge a smarter place. Anyhow, regardless of that, it does mean I could connect my own devices, but not quite sure of the benefits. Yet.

I mean, I could store all my info offline (like I do at the moment, to an SD card) then upload it to my server (which then does trendy analysis on it) without the use of the sensor network. Most I want to give my extra collected data to others. I could still make my API/data open, but it seems a little...isolated if it isn't joined up with all the other datafeeds about. Which is where I came in, hoping I was adding to some local store.

Which all just points to I didn't really RTFM too well, and inferred what I wanted it to be :) (Extrapolating from the old open data the council(s) used to provide)