Giter VIP home page Giter VIP logo

nanocloudlogger's Introduction

NanoCloudLogger

Simple cloud based logger for devices like microcontrollers.

General information

Nano logger provides user to easily store data in a cloud based environment without having to write any code on server side. Idea behind this is that every user can store his data (POST method) in his own stream (usually different stream id for each application) and then access data via basic GET method.

The reason behind this project is I needed simple solution for prototyping and I didn't want to write web services every time when I needed to store data remotely.

This tool is for prototyping use only. It was not intended to be used commercially.

Each stream has its own id and can store x number of inputs. Inputs in this case can be sensor data (examples below). This is especially useful for Arduino developers or any kind of telemetry projects.

Server side code is written in Python on top of Google App Engine. Tested and developed on Google App engine v1.7.2.

In example below I will demonstrate how to use this tool on a project where I have two sensors I call inputs (temperature, photocell) hooked up on a Arduino. Lets assume I am running Google App Engine locally (http://localhost:8080/). Alert: If you will run this service locally all database records will be lost if you will restart service.

Application is located in src/loggergae.

	python /path-to-your-gae-dir/dev_appserver.py /path-to-nano-logger-dir/src/loggergae
	
	If you are using Windows or Mac please check Google App Engine website on information how to run apps.

If you point your browser to (eg http://localhost:8080) after you run application help is displayed.

Initializing stream

All you need to do to initialize stream is to give it an ID. Stream ID is alphanumerical string. Streams are read/write and are public. No authentication is needed for accessing and modifying stream. You can add inputs as you go.

	Stream example names:
	
	application1
	my_sensor_stream
	home_automation

Reading data stream

	Example:	http://localhost:8080/api/get?stream=my_sensor_stream
	API url:	/api/get
	Formats:	json, csv
	Method:		GET
	Returns:	array of values

Parameters

	stream	Stream identifier.
	lastid	Only outputs records with biggers id than lastid. Useful when fetching realtime data from service and you only need latest results.
	format	Defines type of response output.
	limit	Limits number of output records.

Examples of usage:

	http://localhost:8080/api/get?stream=my_sensor_stream
	http://localhost:8080/api/get?stream=my_sensor_stream&format=json
	http://localhost:8080/api/get?stream=my_sensor_stream&lastid=50&limit=5&format=csv 

Examples of response:

	JSON
	[{ "input": "temperature", "data": "28", "id": 6, "datetime": "2012-09-27 00:54:00.441780" }, 
	{"input": "photocell", "data": "897", "id": 5, "datetime": "2012-09-27 00:54:00.439565" }]
	
	CSV
	6,2012-09-27 00:54:00.441780,temperature,28
	5,2012-09-27 00:54:00.439565,photocell,897 

Adding to data stream

	Examples:	http://localhost:8080/api/set?stream=my_sensor_stream
	API url:	/api/set
	Method:		POST
	Returns:	status

Examples of usage:

	http://localhost:8080/api/set?stream=my_sensor_stream
	
	POST varibles with this request:
	key            value
	--------------------------------
	temperature    28
	photocell      755
	...

nanocloudlogger's People

Contributors

mitjafelicijan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

jueshi

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.