Joined the team
Open the Things and See
Publishing TTN applications as open data
By sharing device information from the community, we would like to see some aggregate data about the use of nodes at the hackathon. We asked several teams at Make Zurich to share their applications on The Things Network to let us, in a safe way and without interfering with their projects, plot the overall activity data from all devices - and make a rudimentary analysis at least only based on timestamps. Furthermore, we started a discussion about the potential of integrating their Swagger-based API with Data Packages.
See also: aggregating analytics from Make Zurich (forum.schoolofdata.ch)
Four teams - ttn-soundlevel, MoBiFloC, Bicycle tracking and silencr - have sent us (via private message) their keys (THANK YOU!), the collected snapshot was converted using csv-kit and aggregated in a LibreOffice spreadsheet. Download a copy.
We made a visualisation of the result:
Using this R code:
library("ggplot2") library("plyr") ## read data dat <- read.csv("allthethings1.csv") ## normalize the measurements per project dat$value <- as.numeric(as.character(dat$value)) dat$value_normalized <- ddply(dat, .variables = .(device_id), .fun = function(x) scale(x$value))[, 2] ## time dat$t <- as.POSIXlt(strptime(dat$time, "%FT%T")) ## plot ggplot(dat, aes(x = t, y = value_normalized, color = device_id)) + geom_point() + geom_line()
- We first thought of collecting this data at the local gateway using lora-packet
- However, it would be much more interesting to do this from the TTN cloud, i.e. node-app-sdk
- It has been mentioned to us that this sounds a lot like https://thingspeak.com or http://thingful.net
- We shall not be dissuaded by parallel efforts - we are, after all, here to learn from and Be Excellent to each other.
- We thought about adapting Gonzalo and Jan's ttn-microclient, adding support for mongoose
- We looked into integrating the new API based on Swagger 2.0 in TTN's Data Storage integration with the Data Packages supported by Open Knowledge.
- We started an initial project to talk to TTN's swagger and visualise the result here: https://github.com/loleg/ottnnc
- Go to your The Things Network console
- Add and enable a Data Storage integration (this is optional, but recommended)
- Go to Settings > Access keys > Add an access key, give it a name (e.g. "opendata"), leave the default options
- Go to back to the Overview, scroll to the bottom, and copy the newly created key
- Note down the Access Key and Application ID (e.g. in the screenshot above, "makezurich-open")
- Treat yourself to a sandwich :-)
Joined the team