6:23 am


Silver
November 1, 2013

10:15 am


Silver
December 31, 2013

I have installed the ThingSpeak server on an Raspberry Pi using this script: https://gist.github.com/abythell/8225124 . While I can confirm it does run, I cannot speak to the performance, such as how it would perform with many simultaneous Updates or retrieving very large Feeds.
4:57 pm


Silver
November 1, 2013

4:54 am


Silver
November 1, 2013

Hi,
I found how to launch the server at startup.
But I've still a problem to backup datas from Thingspeak.com to the raspberry.
I tried : http://api.thingspeak.com/channels/9681/field/1.csv?results=8000
But I got an error
Any idea ?
Thanks
Alex
6:18 pm


Silver
December 31, 2013

The proper way to start the Rails server on boot would be to use an initscript, however the quick and easy way is to add the following to /etc/rc.local:
(cd /home/pi/thingspeak; /usr/local/bin/rails server -d)
This line should appear before the final "exit 0" line and assumes the ThingSpeak application is found in /home/pi/thingspeak.
1:04 pm


Silver
November 1, 2013

2:51 pm


Silver
November 1, 2013

Is the Raspberry powerfull enough ?
I can't display a simple chart with a "sum" : http://IP:3000/channels/1/charts/2?sum=60&days=1
wheras with "timescale" it works : http://IP:3000/channels/1/charts/2?timescale=10&days=1
4:49 am

Silver
May 23, 2014

Hi, I am trying to install ThingSpeak in a Raspberrian Pi with a Debian distribution.
I am following step by step as in https://github.com/other/thingspeak
When I get to rake db:create I have an error, any idea?
Thanks,
Rodri
Couldn't create database for {"adapter"=>"mysql2", "encoding"=>"utf8", "reconnect"=>false, "database"=>"thingspeak_development", "pool"=>5, "username"=>"thing", "password"=>"speak", "socket"=>"/var/run/mysqld/mysqld.sock"}, {:charset=>"utf8", :collation=>"utf8_unicode_ci"}
(If you set the charset manually, make sure you have a matching collation)
Couldn't create database for {"adapter"=>"mysql2", "encoding"=>"utf8", "reconnect"=>false, "database"=>"thingspeak_test", "pool"=>5, "username"=>"thing", "password"=>"speak", "socket"=>"/var/run/mysqld/mysqld.sock"}, {:charset=>"utf8", :collation=>"utf8_unicode_ci"}
(If you set the charset manually, make sure you have a matching collation)
-- create_table("active_admin_comments", {:force=>true})
rake aborted!
Mysql2::Error: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
/home/pi/.rvm/gems/ruby-2.1.0@thingspeak/gems/mysql2-0.3.16/lib/mysql2/client.rb:70:in `connect'
/home/pi/.rvm/gems/ruby-2.1.0@thingspeak/gems/mysql2-0.3.16/lib/mysql2/client.rb:70:in `initialize'
/home/pi/.rvm/gems/ruby-2.1.0@thingspeak/gems/activerecord-4.0.5/lib/active_record/connection_adapters/mysql2_adapter.rb:18:in `new'
/home/pi/.rvm/gems/ruby-2.1.0@thingspeak/gems/activerecord-4.0.5/lib/active_record/connection_adapters/mysql2_adapter.rb:18:in `mysql2_connection'
/home/pi/.rvm/gems/ruby-2.1.0@thingspeak/gems/activerecord-4.0.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:440:in `new_connection'
/home/pi/.rvm/gems/ruby-2.1.0@thingspeak/gems/activerecord-4.0.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:450:in `checkout_new_connection'
/home/pi/.rvm/gems/ruby-2.1.0@thingspeak/gems/activerecord-4.0.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:421:in `acquire_connection'
/home/pi/.rvm/gems/ruby-2.1.0@thingspeak/gems/activerecord-4.0.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:356:in `block in checkout'
/home/pi/.rvm/gems/ruby-2.1.0@thingspeak/gems/activerecord-4.0.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:355:in `checkout'
/home/pi/.rvm/gems/ruby-2.1.0@thingspeak/gems/activerecord-4.0.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:265:in `block in connection'
/home/pi/.rvm/gems/ruby-2.1.0@thingspeak/gems/activerecord-4.0.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:264:in `connection'
/home/pi/.rvm/gems/ruby-2.1.0@thingspeak/gems/activerecord-4.0.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:546:in `retrieve_connection'
/home/pi/.rvm/gems/ruby-2.1.0@thingspeak/gems/activerecord-4.0.5/lib/active_record/connection_handling.rb:79:in `retrieve_connection'
/home/pi/.rvm/gems/ruby-2.1.0@thingspeak/gems/activerecord-4.0.5/lib/active_record/connection_handling.rb:53:in `connection'
/home/pi/.rvm/gems/ruby-2.1.0@thingspeak/gems/activerecord-4.0.5/lib/active_record/migration.rb:615:in `connection'
/home/pi/.rvm/gems/ruby-2.1.0@thingspeak/gems/activerecord-4.0.5/lib/active_record/migration.rb:628:in `block in method_missing'
/home/pi/.rvm/gems/ruby-2.1.0@thingspeak/gems/activerecord-4.0.5/lib/active_record/migration.rb:601:in `block in say_with_time'
/home/pi/.rvm/gems/ruby-2.1.0@thingspeak/gems/activerecord-4.0.5/lib/active_record/migration.rb:601:in `say_with_time'
/home/pi/.rvm/gems/ruby-2.1.0@thingspeak/gems/activerecord-4.0.5/lib/active_record/migration.rb:621:in `method_missing'
/home/pi/thingspeak/db/schema.rb:16:in `block in '
/home/pi/.rvm/gems/ruby-2.1.0@thingspeak/gems/activerecord-4.0.5/lib/active_record/schema.rb:42:in `instance_eval'
/home/pi/.rvm/gems/ruby-2.1.0@thingspeak/gems/activerecord-4.0.5/lib/active_record/schema.rb:42:in `define'
/home/pi/.rvm/gems/ruby-2.1.0@thingspeak/gems/activerecord-4.0.5/lib/active_record/schema.rb:62:in `define'
/home/pi/thingspeak/db/schema.rb:14:in `'
/home/pi/.rvm/gems/ruby-2.1.0@thingspeak/gems/activesupport-4.0.5/lib/active_support/dependencies.rb:223:in `load'
/home/pi/.rvm/gems/ruby-2.1.0@thingspeak/gems/activesupport-4.0.5/lib/active_support/dependencies.rb:223:in `block in load'
/home/pi/.rvm/gems/ruby-2.1.0@thingspeak/gems/activesupport-4.0.5/lib/active_support/dependencies.rb:214:in `load_dependency'
/home/pi/.rvm/gems/ruby-2.1.0@thingspeak/gems/activesupport-4.0.5/lib/active_support/dependencies.rb:223:in `load'
/home/pi/.rvm/gems/ruby-2.1.0@thingspeak/gems/activerecord-4.0.5/lib/active_record/railties/databases.rake:253:in `block (3 levels) in '
/home/pi/.rvm/gems/ruby-2.1.0@thingspeak/bin/ruby_executable_hooks:15:in `eval'
/home/pi/.rvm/gems/ruby-2.1.0@thingspeak/bin/ruby_executable_hooks:15:in `'
Tasks: TOP => db:schema:load
(See full trace by running task with --trace)
=> Booting Puma
=> Rails 4.0.5 application starting in development on http://0.0.0.0:3000
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
Puma 2.9.1 starting...
* Min threads: 0, max threads: 16
* Environment: development
* Listening on tcp://0.0.0.0:3000
8:54 am

Admin
March 14, 2011

Hi Rodri,
The location of your MySQL socket needs to be set correctly in your "config/database.yml" file. Here's the line you need to change: https://github.com/other/thingspeak/blob/master/config/database.yml.local#L27 . The location of the MySQL socket varies between systems, so you may have to search around to find out what works for you specifically.
lee
12:08 pm

Silver
May 23, 2014

Thanks Lee,
I tried with every location and nothing. Here paths where both files are stored, wich one should I use?
pi@raspberrypi ~/thingspeak $ whereis mysqld.sock
mysqld: /usr/sbin/mysqld /usr/share/man/man8/mysqld.8.gz
pi@raspberrypi ~/thingspeak $ whereis mysql.sock
mysql: /usr/bin/mysql /etc/mysql /usr/lib/mysql /usr/bin/X11/mysql /usr/include/mysql /usr/share/mysql /usr/share/man/man1/mysql.1.gz
Best,
Rodri
4:38 am

Silver
May 23, 2014

Hi Lee,
socket is ok on socket:/var/run/mysqld/mysqld.sock but I still have problems, thingspeak_development is created but thingspeak_test still have problems.
Best,
Rodri
pi@raspberrypi ~/thingspeak $ rake db:create
thingspeak_development already exists
Mysql2::Error: Access denied for user 'thing'@'localhost' to database 'thingspeak_test': CREATE DATABASE `thingspeak_test` DEFAULT CHARACTER SET `utf8` COLLATE `utf8_unicode_ci`
/home/pi/.rvm/gems/ruby-2.1.0@thingspeak/gems/activerecord-4.0.5/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:287:in `query'
/home/pi/.rvm/gems/ruby-2.1.0@thingspeak/gems/activerecord-4.0.5/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:287:in `block in execute'
/home/pi/.rvm/gems/ruby-2.1.0@thingspeak/gems/activerecord-4.0.5/lib/active_record/connection_adapters/abstract_adapter.rb:442:in `block in log'
/home/pi/.rvm/gems/ruby-2.1.0@thingspeak/gems/activesupport-4.0.5/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/home/pi/.rvm/gems/ruby-2.1.0@thingspeak/gems/activerecord-4.0.5/lib/active_record/connection_adapters/abstract_adapter.rb:437:in `log'
/home/pi/.rvm/gems/ruby-2.1.0@thingspeak/gems/activerecord-4.0.5/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:287:in `execute'
/home/pi/.rvm/gems/ruby-2.1.0@thingspeak/gems/activerecord-4.0.5/lib/active_record/connection_adapters/mysql2_adapter.rb:222:in `execute'
/home/pi/.rvm/gems/ruby-2.1.0@thingspeak/gems/activerecord-4.0.5/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:382:in `create_database'
/home/pi/.rvm/gems/ruby-2.1.0@thingspeak/gems/activerecord-4.0.5/lib/active_record/tasks/mysql_database_tasks.rb:16:in `create'
/home/pi/.rvm/gems/ruby-2.1.0@thingspeak/gems/activerecord-4.0.5/lib/active_record/tasks/database_tasks.rb:73:in `create'
/home/pi/.rvm/gems/ruby-2.1.0@thingspeak/gems/activerecord-4.0.5/lib/active_record/tasks/database_tasks.rb:87:in `block in create_current'
/home/pi/.rvm/gems/ruby-2.1.0@thingspeak/gems/activerecord-4.0.5/lib/active_record/tasks/database_tasks.rb:183:in `block in each_current_configuration'
/home/pi/.rvm/gems/ruby-2.1.0@thingspeak/gems/activerecord-4.0.5/lib/active_record/tasks/database_tasks.rb:182:in `each'
/home/pi/.rvm/gems/ruby-2.1.0@thingspeak/gems/activerecord-4.0.5/lib/active_record/tasks/database_tasks.rb:182:in `each_current_configuration'
/home/pi/.rvm/gems/ruby-2.1.0@thingspeak/gems/activerecord-4.0.5/lib/active_record/tasks/database_tasks.rb:86:in `create_current'
/home/pi/.rvm/gems/ruby-2.1.0@thingspeak/gems/activerecord-4.0.5/lib/active_record/railties/databases.rake:20:in `block (2 levels) in '
/home/pi/.rvm/gems/ruby-2.1.0@thingspeak/gems/rake-10.3.2/lib/rake/task.rb:240:in `call'
/home/pi/.rvm/gems/ruby-2.1.0@thingspeak/gems/rake-10.3.2/lib/rake/task.rb:240:in `block in execute'
/home/pi/.rvm/gems/ruby-2.1.0@thingspeak/gems/rake-10.3.2/lib/rake/task.rb:235:in `each'
/home/pi/.rvm/gems/ruby-2.1.0@thingspeak/gems/rake-10.3.2/lib/rake/task.rb:235:in `execute'
/home/pi/.rvm/gems/ruby-2.1.0@thingspeak/gems/rake-10.3.2/lib/rake/task.rb:179:in `block in invoke_with_call_chain'
/home/pi/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/monitor.rb:211:in `mon_synchronize'
/home/pi/.rvm/gems/ruby-2.1.0@thingspeak/gems/rake-10.3.2/lib/rake/task.rb:172:in `invoke_with_call_chain'
/home/pi/.rvm/gems/ruby-2.1.0@thingspeak/gems/rake-10.3.2/lib/rake/task.rb:165:in `invoke'
/home/pi/.rvm/gems/ruby-2.1.0@thingspeak/gems/rake-10.3.2/lib/rake/application.rb:150:in `invoke_task'
/home/pi/.rvm/gems/ruby-2.1.0@thingspeak/gems/rake-10.3.2/lib/rake/application.rb:106:in `block (2 levels) in top_level'
/home/pi/.rvm/gems/ruby-2.1.0@thingspeak/gems/rake-10.3.2/lib/rake/application.rb:106:in `each'
/home/pi/.rvm/gems/ruby-2.1.0@thingspeak/gems/rake-10.3.2/lib/rake/application.rb:106:in `block in top_level'
/home/pi/.rvm/gems/ruby-2.1.0@thingspeak/gems/rake-10.3.2/lib/rake/application.rb:115:in `run_with_threads'
/home/pi/.rvm/gems/ruby-2.1.0@thingspeak/gems/rake-10.3.2/lib/rake/application.rb:100:in `top_level'
/home/pi/.rvm/gems/ruby-2.1.0@thingspeak/gems/rake-10.3.2/lib/rake/application.rb:78:in `block in run'
/home/pi/.rvm/gems/ruby-2.1.0@thingspeak/gems/rake-10.3.2/lib/rake/application.rb:176:in `standard_exception_handling'
/home/pi/.rvm/gems/ruby-2.1.0@thingspeak/gems/rake-10.3.2/lib/rake/application.rb:75:in `run'
/home/pi/.rvm/gems/ruby-2.1.0@thingspeak/gems/rake-10.3.2/bin/rake:33:in `'
/home/pi/.rvm/gems/ruby-2.1.0@thingspeak/bin/rake:23:in `load'
/home/pi/.rvm/gems/ruby-2.1.0@thingspeak/bin/rake:23:in `'
Couldn't create database for {"adapter"=>"mysql2", "encoding"=>"utf8", "reconnect"=>false, "database"=>"thingspeak_test", "pool"=>5, "username"=>"thing", "password"=>"speak", "socket"=>"/var/run/mysqld/mysqld.sock"}
7:10 am

Silver
May 23, 2014

12:29 pm

Silver
May 23, 2014

Hi Lee, as I told you before I hace TS running in RPI!! Cool.
Now I have another problem... I am sending data from an arduino to TS, the code works ok on TS online but when I change to the server in my RPI I get this error.
pi@raspberrypi ~/thingspeak $ rails server
=> Booting Puma
=> Rails 4.0.5 application starting in development on http://0.0.0.0:3000
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
Puma 2.9.1 starting...
* Min threads: 0, max threads: 16
* Environment: development
* Listening on tcp://0.0.0.0:3000
---
2014-12-10 15:53:46 +0000: HTTP parse error, malformed request (): #
2014-12-10 15:53:46 +0000: ENV: {"rack.version"=>[1, 2], "rack.errors"=>#<IO:>, "rack.multithread"=>true, "rack.multiprocess"=>false, "rack.run_once"=>false, "SCRIPT_NAME"=>"", "CONTENT_TYPE"=>"text/plain", "QUERY_STRING"=>"", "SERVER_PROTOCOL"=>"HTTP/1.1", "SERVER_SOFTWARE"=>"2.9.1", "GATEWAY_INTERFACE"=>"CGI/1.2", "REQUEST_METHOD"=>"POST", "REQUEST_PATH"=>"/update.json", "REQUEST_URI"=>"/update.json"}
---
Any idea?
I tried the code here and ir works, I sent 2 values in 8 fields!
https://thingspeak.com/channels/20390
I changed api.thingspeak.com for 10.95.0.24 and port 80 for 3000 and got the error
Best,
Rodri
3:46 am

Silver
May 23, 2014

Most Users Ever Online: 166
Currently Online:
21 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
rw950431: 272
Vinod: 240
piajola: 95
turgo: 70
vespapierre: 63
Adarsh_Murthy: 62
Member Stats:
Guest Posters: 1
Members: 8665
Moderators: 1
Admins: 2
Forum Stats:
Groups: 3
Forums: 14
Topics: 1600
Posts: 5760
Newest Members:
Zain-Ul-Abidin, wellbeingcentresuk, Vamsi, frankmehlhop, bhumin, dennysrodialahModerators: cstapels: 460
Administrators: Hans: 405, lee: 457