Skip to content

ThingSpeak is an open source “Internet of Things” application and API to store and retrieve data from things using HTTP over the Internet or via a Local Area Network. With ThingSpeak, you can create sensor logging applications, location tracking applications, and a social network of things with status updates.

License

Notifications You must be signed in to change notification settings

llawlor/thingspeak

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ThingSpeak (with rate limits and memcached support)

ThingSpeak is an open source “Internet of Things” application and API to store and retrieve data from things using HTTP over the Internet or via a Local Area Network. With ThingSpeak, you can create sensor logging applications, location tracking applications, and a social network of things with status updates.

In addition to storing and retrieving numeric and alphanumeric data, the ThingSpeak API allows for numeric data processing such as timescaling, averaging, median, summing, and rounding. Each ThingSpeak Channel supports data entries of up to 8 data fields, latitude, longitude, elevation, and status. The channel feeds support JSON, XML, and CSV formats for integration into applications.

The ThingSpeak application also features time zone management, read/write API key management and JavaScript-based charts from Highslide Software / Torstein Hønsi.

Support for ThingSpeak is available on the ThingSpeak Community site which features a Blog, Forum, Documentation, and Tutorials.

Before You Begin

1. Install Ruby, RubyGems, Rails 3, git, and a database like MySQL
2. Download the application using git: git clone git@github.com:iobridge/thingspeak.git
3. Change to the thingspeak directory and install the appropriate gems: sudo bundle install

Configuration

1. Set your database configuration file at config/database.yml (see config/database.yml.example for an example)
2. Create the database: rake db:create
3. Create the database tables: rake db:schema:load

Memcached Installation

cd ~
mkdir sources
cd sources

wget http://www.monkey.org/~provos/libevent-2.0.10-stable.tar.gz
wget http://memcached.googlecode.com/files/memcached-1.4.5.tar.gz

tar xzvf libevent-2.0.10-stable.tar.gz
cd libevent-2.0.10-stable
sudo ./configure —prefix=/usr
sudo make
sudo make install

cd ..
tar xzvf memcached-1.4.5.tar.gz
cd memcached-1.4.5
sudo ./configure —with-libevent=/usr/lib
sudo make
sudo make install

memcached -I5m -d

Run The Application

1. Change your directory to thingspeak/
2. Start the server: rails server

Your application will now be running at http://localhost:3000/

Changing Application Text

Make changes to config/locales/en.yml
To avoid errors, please ensure your lines start with spaces, not tabs.
Set your application name using the ‘application_name’ key.

(Optional) Rate Limit Channel Updates

Change the “15.seconds” to whatever you like in line 100 of app/controllers/channels_controller.rb

(Optional) HTTP GET Support

By default the application will accept channel updates via GET or POST. To only allow POSTs, change the value of GET_SUPPORT found in config/initializers/constants.rb

(Optional) Email Setup

Set your domain, user_name, and password in config/environment.rb
Also set your password reset link in app/controllers/mailer.controller.rb line 14 (and uncomment the line)

Installation on clean install of Ubuntu 10.10

Start Terminal

cd ~

sudo apt-get install aptitude
sudo aptitude update
sudo aptitude install build-essential git-core curl

bash < <( curl http://rvm.beginrescueend.com/releases/rvm-install-head )
echo ‘[[ -s “$HOME/.rvm/scripts/rvm” ]] && source “$HOME/.rvm/scripts/rvm”’ >> ~/.bashrc

. ~/.bashrc

sudo aptitude install mysql-server libmysqlclient-dev libmysql-ruby
sudo aptitude install libssl-dev libopenssl-ruby libxslt1.1 libxslt1-dev libxml2 libxml2-dev rubygems

rvm install 1.9.2
rvm —default use 1.9.2

gem install rails

git clone git://github.com/iobridge/thingspeak.git

cd thingspeak

gem update
bundle install

gedit config/database.yml.example
Note: Change database username and password for development, test, and production databases and save the file as database.yml

rake db:create
rake db:schema:load

rails server

About

ThingSpeak is an open source “Internet of Things” application and API to store and retrieve data from things using HTTP over the Internet or via a Local Area Network. With ThingSpeak, you can create sensor logging applications, location tracking applications, and a social network of things with status updates.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages

  • JavaScript 59.6%
  • Ruby 40.4%