farmbot / farmbot_os Goto Github PK
View Code? Open in Web Editor NEWThe operating system and all related software that runs on FarmBot's Raspberry Pi.
License: MIT License
The operating system and all related software that runs on FarmBot's Raspberry Pi.
License: MIT License
Right now the terminal spits out messages that look like this:
message {"devices"=>"f8700524-cd0c-49e4-b46b-3b5f5b206466", "params"=>{"speed"=>100}, "method"=>"single_command.HOME ALL", "id"=>"01758acd-1f22-4f7e-85e7-d14441c830bf", "fromUuid"=>"73425170-2660-49de-acd9-6fad4989aff6"}
I think they should be rearranged as: message {"method", "params", "devices", "fromUuid", "id"}
This ordering is more readable and accurate to the order of importance of the message contents.
Is there a hard dependency on RPI3? I tried to boot the latest release of Farmbot OS on RPI2 but it wouldnt work I only get the rainbow boot screen
Check why cleaning up the logs are not cleaned up automatically
If we send metadata to the connecting client such as the URL of the REST server, we can alleviate the need to pass that configuration around in different places (the designer, the farmbotjs client, etc). #todos
So the user can do this with one click from the web application.
@TimEvWw pointed out that code is in the wrong place. Need to move this into the base message handler.
Hey Tim,
any idea why @dbAccess is nil in MessageHandler
?
class MessageHandler
def initialize
# . . .
@dbaccess = $dbaccess
end
end
split up hardware class in multiple smaller classes
just running bundle install
pi@raspberrypi:~/farmbot-raspberry-pi-controller $ sudo bundle install
Don't run Bundler as root. Bundler can ask for sudo if it is needed, and
installing your bundle as root will break this application for all non-root
users on this machine.
Fetching gem metadata from https://rubygems.org/
Fetching version metadata from https://rubygems.org/
Fetching dependency metadata from https://rubygems.org/
Installing rake 10.4.2
Installing i18n 0.7.0
Installing json 1.8.3 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
/usr/bin/ruby2.1 extconf.rb
mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h
extconf failed, exit code 1
Gem files will remain installed in /var/lib/gems/2.1.0/gems/json-1.8.3 for inspection.
Results logged to /var/lib/gems/2.1.0/extensions/arm-linux/2.1.0/json-1.8.3/gem_make.out
Installing minitest 5.8.0
Installing thread_safe 0.3.5
Installing builder 3.2.2
Installing erubis 2.7.0
Installing mini_portile 0.6.2
Installing rack 1.6.4
Installing arel 6.0.3
Installing thor 0.19.1
Installing diff-lcs 1.2.5
Installing docile 1.1.5
Installing unf_ext 0.0.7.2 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
/usr/bin/ruby2.1 extconf.rb
mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h
extconf failed, exit code 1
Gem files will remain installed in /var/lib/gems/2.1.0/gems/unf_ext-0.0.7.2 for inspection.
Results logged to /var/lib/gems/2.1.0/extensions/arm-linux/2.1.0/unf_ext-0.0.7.2/gem_make.out
Installing eventmachine 1.2.0.1 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
/usr/bin/ruby2.1 extconf.rb
mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h
extconf failed, exit code 1
Gem files will remain installed in /var/lib/gems/2.1.0/gems/eventmachine-1.2.0.1 for inspection.
Results logged to /var/lib/gems/2.1.0/extensions/arm-linux/2.1.0/eventmachine-1.2.0.1/gem_make.out
Installing mqtt 0.3.1
Installing mime-types 2.99.1
Installing netrc 0.11.0
Installing serialport 1.3.1 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
/usr/bin/ruby2.1 extconf.rb
mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h
extconf failed, exit code 1
Gem files will remain installed in /var/lib/gems/2.1.0/gems/serialport-1.3.1 for inspection.
Results logged to /var/lib/gems/2.1.0/extensions/arm-linux/2.1.0/serialport-1.3.1/gem_make.out
Installing god 0.13.6 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
/usr/bin/ruby2.1 extconf.rb
mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h
extconf failed, exit code 1
Gem files will remain installed in /var/lib/gems/2.1.0/gems/god-0.13.6 for inspection.
Results logged to /var/lib/gems/2.1.0/extensions/arm-linux/2.1.0/god-0.13.6/gem_make.out
Installing highline 1.7.8
Installing ice_cube 0.13.0
Installing liquid 3.0.6
Installing rspec-support 3.3.0
Installing settingslogic 2.0.9
Installing simplecov-html 0.10.0
Installing sqlite3 1.3.10 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
/usr/bin/ruby2.1 extconf.rb
mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h
extconf failed, exit code 1
Gem files will remain installed in /var/lib/gems/2.1.0/gems/sqlite3-1.3.10 for inspection.
Results logged to /var/lib/gems/2.1.0/extensions/arm-linux/2.1.0/sqlite3-1.3.10/gem_make.out
Using bundler 1.12.5
An error occurred while installing json (1.8.3), and Bundler cannot continue.
Make sure that `gem install json -v '1.8.3'` succeeds before bundling.
pi@raspberrypi:~/farmbot-raspberry-pi-controller $ bundle install
Fetching gem metadata from https://rubygems.org/
Fetching version metadata from https://rubygems.org/
Fetching dependency metadata from https://rubygems.org/
Using rake 10.4.2
Using i18n 0.7.0
Installing json 1.8.3 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
/usr/bin/ruby2.1 extconf.rb
mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h
extconf failed, exit code 1
Gem files will remain installed in /tmp/bundler20160829-20303-1eyepnjson-1.8.3/gems/json-1.8.3 for inspection.
Results logged to /tmp/bundler20160829-20303-1eyepnjson-1.8.3/extensions/arm-linux/2.1.0/json-1.8.3/gem_make.out
Using minitest 5.8.0
Using thread_safe 0.3.5
Using builder 3.2.2
Using erubis 2.7.0
Using mini_portile 0.6.2
Using rack 1.6.4
Using arel 6.0.3
Using thor 0.19.1
Using diff-lcs 1.2.5
Using docile 1.1.5
Installing unf_ext 0.0.7.2 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
/usr/bin/ruby2.1 extconf.rb
mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h
extconf failed, exit code 1
Gem files will remain installed in /tmp/bundler20160829-20303-ik8dmcunf_ext-0.0.7.2/gems/unf_ext-0.0.7.2 for inspection.
Results logged to /tmp/bundler20160829-20303-ik8dmcunf_ext-0.0.7.2/extensions/arm-linux/2.1.0/unf_ext-0.0.7.2/gem_make.out
Installing eventmachine 1.2.0.1 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
/usr/bin/ruby2.1 extconf.rb
mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h
extconf failed, exit code 1
Gem files will remain installed in /tmp/bundler20160829-20303-24hb7leventmachine-1.2.0.1/gems/eventmachine-1.2.0.1 for inspection.
Results logged to /tmp/bundler20160829-20303-24hb7leventmachine-1.2.0.1/extensions/arm-linux/2.1.0/eventmachine-1.2.0.1/gem_make.out
Using mqtt 0.3.1
Using mime-types 2.99.1
Using netrc 0.11.0
Installing serialport 1.3.1 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
/usr/bin/ruby2.1 extconf.rb
mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h
extconf failed, exit code 1
Gem files will remain installed in /tmp/bundler20160829-20303-1e8yyxrserialport-1.3.1/gems/serialport-1.3.1 for inspection.
Results logged to /tmp/bundler20160829-20303-1e8yyxrserialport-1.3.1/extensions/arm-linux/2.1.0/serialport-1.3.1/gem_make.out
Installing god 0.13.6 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
/usr/bin/ruby2.1 extconf.rb
mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h
extconf failed, exit code 1
Gem files will remain installed in /tmp/bundler20160829-20303-17c65wpgod-0.13.6/gems/god-0.13.6 for inspection.
Results logged to /tmp/bundler20160829-20303-17c65wpgod-0.13.6/extensions/arm-linux/2.1.0/god-0.13.6/gem_make.out
Using highline 1.7.8
Using ice_cube 0.13.0
Using liquid 3.0.6
Using rspec-support 3.3.0
Using settingslogic 2.0.9
Using simplecov-html 0.10.0
Installing sqlite3 1.3.10 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
/usr/bin/ruby2.1 extconf.rb
mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h
extconf failed, exit code 1
Gem files will remain installed in /tmp/bundler20160829-20303-opn966sqlite3-1.3.10/gems/sqlite3-1.3.10 for inspection.
Results logged to /tmp/bundler20160829-20303-opn966sqlite3-1.3.10/extensions/arm-linux/2.1.0/sqlite3-1.3.10/gem_make.out
Using bundler 1.12.5
An error occurred while installing json (1.8.3), and Bundler cannot continue.
Make sure that `gem install json -v '1.8.3'` succeeds before bundling.
then everything I did to install the farmbot software
pi@raspberrypi:~ $ gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
gpg: requesting key D39DC0E3 from hkp server keys.gnupg.net
gpg: /home/pi/.gnupg/trustdb.gpg: trustdb created
gpg: key D39DC0E3: public key "Michal Papis (RVM signing) <[email protected]>" imported
gpg: no ultimately trusted keys found
gpg: Total number processed: 1
gpg: imported: 1 (RSA: 1)
pi@raspberrypi:~ $ curl -L https://get.rvm.io | bash -s stable --ruby
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 184 100 184 0 0 783 0 --:--:-- --:--:-- --:--:-- 786
100 22865 100 22865 0 0 58676 0 --:--:-- --:--:-- --:--:-- 58676
Downloading https://github.com/rvm/rvm/archive/1.27.0.tar.gz
Downloading https://github.com/rvm/rvm/releases/download/1.27.0/1.27.0.tar.gz.asc
gpg: Signature made Tue 29 Mar 2016 13:49:47 UTC using RSA key ID BF04FF17
gpg: Good signature from "Michal Papis (RVM signing) <[email protected]>" [unknown]
gpg: WARNING: This key is not certified with a trusted signature!
gpg: There is no indication that the signature belongs to the owner.
Primary key fingerprint: 409B 6B17 96C2 7546 2A17 0311 3804 BB82 D39D C0E3
Subkey fingerprint: 62C9 E5F4 DA30 0D94 AC36 166B E206 C29F BF04 FF17
GPG verified '/home/pi/.rvm/archives/rvm-1.27.0.tgz'
Installing RVM to /home/pi/.rvm/
Adding rvm PATH line to /home/pi/.profile /home/pi/.mkshrc /home/pi/.bashrc /home/pi/.zshrc.
Adding rvm loading line to /home/pi/.profile /home/pi/.bash_profile /home/pi/.zlogin.
Installation of RVM in /home/pi/.rvm/ is almost complete:
* To start using RVM you need to run `source /home/pi/.rvm/scripts/rvm`
in all your open shell windows, in rare cases you need to reopen all shell windows.
# pi,
#
# Thank you for using RVM!
# We sincerely hope that RVM helps to make your life easier and more enjoyable!!!
#
# ~Wayne, Michal & team.
In case of problems: https://rvm.io/help and https://twitter.com/rvm_io
rvm 1.27.0 (latest) by Wayne E. Seguin <[email protected]>, Michal Papis <[email protected]> [https://rvm.io/]
Searching for binary rubies, this might take some time.
No binary rubies available for: debian/8/armhf/ruby-2.3.0.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for debian.
Installing requirements for debian.
Updating system.....
Installing required packages: gawk, libreadline6-dev, libssl-dev, libyaml-dev, libsqlite3-dev, sqlite3, autoconf, libgmp-dev, libgdbm-dev, libncurses5-dev, automake, libtool, bison, libffi-dev.................
Requirements installation successful.
Found user configured '-j' flag in 'rvm_make_flags', please note that RVM can detect number of CPU threads and set the '-j' flag automatically if you do not set it.
Installing Ruby from source to: /home/pi/.rvm/rubies/ruby-2.3.0, this may take a while depending on your cpu(s)...
ruby-2.3.0 - #downloading ruby-2.3.0, this may take a while depending on your connection...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 13.5M 100 13.5M 0 0 4617k 0 0:00:03 0:00:03 --:--:-- 4617k
ruby-2.3.0 - #extracting ruby-2.3.0 to /home/pi/.rvm/src/ruby-2.3.0....
ruby-2.3.0 - #configuring..........................................................
ruby-2.3.0 - #post-configuration..
ruby-2.3.0 - #compiling..................................................................................
ruby-2.3.0 - #installing..............
ruby-2.3.0 - #making binaries executable..
Installed rubygems 2.5.1 is newer than 2.4.8 provided with installed ruby, skipping installation, use --force to force installation.
ruby-2.3.0 - #gemset created /home/pi/.rvm/gems/ruby-2.3.0@global
ruby-2.3.0 - #importing gemset /home/pi/.rvm/gemsets/global.gems...............................................
ruby-2.3.0 - #generating global wrappers........
ruby-2.3.0 - #gemset created /home/pi/.rvm/gems/ruby-2.3.0
ruby-2.3.0 - #importing gemsetfile /home/pi/.rvm/gemsets/default.gems evaluated to empty gem list
ruby-2.3.0 - #generating default wrappers........
ruby-2.3.0 - #adjusting #shebangs for (gem irb erb ri rdoc testrb rake).
Install of ruby-2.3.0 - #complete
Ruby was built without documentation, to build it run: rvm docs generate-ri
Creating alias default for ruby-2.3.0...
* To start using RVM you need to run `source /home/pi/.rvm/scripts/rvm`
in all your open shell windows, in rare cases you need to reopen all shell windows.
pi@raspberrypi:~ $ git clone -b 'alpha-1.1' --single-branch https://github.com/FarmBot/farmbot-raspberry-pi-controller
Cloning into 'farmbot-raspberry-pi-controller'...
remote: Counting objects: 4067, done.
remote: Total 4067 (delta 0), reused 0 (delta 0), pack-reused 4067
Receiving objects: 100% (4067/4067), 1005.45 KiB | 0 bytes/s, done.
Resolving deltas: 100% (2551/2551), done.
Checking connectivity... done.
Note: checking out '95e6b32355f7f2573fe5781db6b29e32ee10f8e5'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:
git checkout -b new_branch_name
pi@raspberrypi:~ $ cd farmbot-raspberry-pi-controller
pi@raspberrypi:~/farmbot-raspberry-pi-controller $ gem install bundler
Fetching: bundler-1.12.5.gem (100%)
ERROR: While executing gem ... (Errno::EACCES)
Permission denied @ dir_s_mkdir - /var/lib/gems
pi@raspberrypi:~/farmbot-raspberry-pi-controller $ gem install bundler
ERROR: While executing gem ... (Errno::EACCES)
Permission denied @ dir_s_mkdir - /var/lib/gems
pi@raspberrypi:~/farmbot-raspberry-pi-controller $ sudo
usage: sudo -h | -K | -k | -V
usage: sudo -v [-AknS] [-g group] [-h host] [-p prompt] [-u user]
usage: sudo -l [-AknS] [-g group] [-h host] [-p prompt] [-U user] [-u user]
[command]
usage: sudo [-AbEHknPS] [-r role] [-t type] [-C num] [-g group] [-h host] [-p
prompt] [-u user] [VAR=value] [-i|-s] [<command>]
usage: sudo -e [-AknS] [-r role] [-t type] [-C num] [-g group] [-h host] [-p
prompt] [-u user] file ...
pi@raspberrypi:~/farmbot-raspberry-pi-controller $ sudo gem install bundler
Fetching: bundler-1.12.5.gem (100%)
Successfully installed bundler-1.12.5
Parsing documentation for bundler-1.12.5
Installing ri documentation for bundler-1.12.5
Done installing documentation for bundler after 59 seconds
1 gem installed
pi@raspberrypi:~/farmbot-raspberry-pi-controller $ sudo bundle install
Don't run Bundler as root. Bundler can ask for sudo if it is needed, and
installing your bundle as root will break this application for all non-root
users on this machine.
Fetching gem metadata from https://rubygems.org/
Fetching version metadata from https://rubygems.org/
Fetching dependency metadata from https://rubygems.org/
Installing rake 10.4.2
Installing i18n 0.7.0
Installing json 1.8.3 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
/usr/bin/ruby2.1 extconf.rb
mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h
extconf failed, exit code 1
Gem files will remain installed in /var/lib/gems/2.1.0/gems/json-1.8.3 for inspection.
Results logged to /var/lib/gems/2.1.0/extensions/arm-linux/2.1.0/json-1.8.3/gem_make.out
Installing minitest 5.8.0
Installing thread_safe 0.3.5
Installing builder 3.2.2
Installing erubis 2.7.0
Installing mini_portile 0.6.2
Installing rack 1.6.4
Installing arel 6.0.3
Installing thor 0.19.1
Installing diff-lcs 1.2.5
Installing docile 1.1.5
Installing unf_ext 0.0.7.2 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
/usr/bin/ruby2.1 extconf.rb
mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h
extconf failed, exit code 1
Gem files will remain installed in /var/lib/gems/2.1.0/gems/unf_ext-0.0.7.2 for inspection.
Results logged to /var/lib/gems/2.1.0/extensions/arm-linux/2.1.0/unf_ext-0.0.7.2/gem_make.out
Installing eventmachine 1.2.0.1 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
/usr/bin/ruby2.1 extconf.rb
mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h
extconf failed, exit code 1
Gem files will remain installed in /var/lib/gems/2.1.0/gems/eventmachine-1.2.0.1 for inspection.
Results logged to /var/lib/gems/2.1.0/extensions/arm-linux/2.1.0/eventmachine-1.2.0.1/gem_make.out
Installing mqtt 0.3.1
Installing mime-types 2.99.1
Installing netrc 0.11.0
Installing serialport 1.3.1 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
/usr/bin/ruby2.1 extconf.rb
mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h
extconf failed, exit code 1
Gem files will remain installed in /var/lib/gems/2.1.0/gems/serialport-1.3.1 for inspection.
Results logged to /var/lib/gems/2.1.0/extensions/arm-linux/2.1.0/serialport-1.3.1/gem_make.out
Installing god 0.13.6 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
/usr/bin/ruby2.1 extconf.rb
mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h
extconf failed, exit code 1
Gem files will remain installed in /var/lib/gems/2.1.0/gems/god-0.13.6 for inspection.
Results logged to /var/lib/gems/2.1.0/extensions/arm-linux/2.1.0/god-0.13.6/gem_make.out
Installing highline 1.7.8
Installing ice_cube 0.13.0
Installing liquid 3.0.6
Installing rspec-support 3.3.0
Installing settingslogic 2.0.9
Installing simplecov-html 0.10.0
Installing sqlite3 1.3.10 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
/usr/bin/ruby2.1 extconf.rb
mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h
extconf failed, exit code 1
Gem files will remain installed in /var/lib/gems/2.1.0/gems/sqlite3-1.3.10 for inspection.
Results logged to /var/lib/gems/2.1.0/extensions/arm-linux/2.1.0/sqlite3-1.3.10/gem_make.out
Using bundler 1.12.5
An error occurred while installing json (1.8.3), and Bundler cannot continue.
Make sure that `gem install json -v '1.8.3'` succeeds before bundling.
pi@raspberrypi:~/farmbot-raspberry-pi-controller $ bundle install
Fetching gem metadata from https://rubygems.org/
Fetching version metadata from https://rubygems.org/
Fetching dependency metadata from https://rubygems.org/
Using rake 10.4.2
Using i18n 0.7.0
Installing json 1.8.3 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
/usr/bin/ruby2.1 extconf.rb
mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h
extconf failed, exit code 1
Gem files will remain installed in /tmp/bundler20160829-20303-1eyepnjson-1.8.3/gems/json-1.8.3 for inspection.
Results logged to /tmp/bundler20160829-20303-1eyepnjson-1.8.3/extensions/arm-linux/2.1.0/json-1.8.3/gem_make.out
Using minitest 5.8.0
Using thread_safe 0.3.5
Using builder 3.2.2
Using erubis 2.7.0
Using mini_portile 0.6.2
Using rack 1.6.4
Using arel 6.0.3
Using thor 0.19.1
Using diff-lcs 1.2.5
Using docile 1.1.5
Installing unf_ext 0.0.7.2 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
/usr/bin/ruby2.1 extconf.rb
mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h
extconf failed, exit code 1
Gem files will remain installed in /tmp/bundler20160829-20303-ik8dmcunf_ext-0.0.7.2/gems/unf_ext-0.0.7.2 for inspection.
Results logged to /tmp/bundler20160829-20303-ik8dmcunf_ext-0.0.7.2/extensions/arm-linux/2.1.0/unf_ext-0.0.7.2/gem_make.out
Installing eventmachine 1.2.0.1 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
/usr/bin/ruby2.1 extconf.rb
mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h
extconf failed, exit code 1
Gem files will remain installed in /tmp/bundler20160829-20303-24hb7leventmachine-1.2.0.1/gems/eventmachine-1.2.0.1 for inspection.
Results logged to /tmp/bundler20160829-20303-24hb7leventmachine-1.2.0.1/extensions/arm-linux/2.1.0/eventmachine-1.2.0.1/gem_make.out
Using mqtt 0.3.1
Using mime-types 2.99.1
Using netrc 0.11.0
Installing serialport 1.3.1 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
/usr/bin/ruby2.1 extconf.rb
mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h
extconf failed, exit code 1
Gem files will remain installed in /tmp/bundler20160829-20303-1e8yyxrserialport-1.3.1/gems/serialport-1.3.1 for inspection.
Results logged to /tmp/bundler20160829-20303-1e8yyxrserialport-1.3.1/extensions/arm-linux/2.1.0/serialport-1.3.1/gem_make.out
Installing god 0.13.6 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
/usr/bin/ruby2.1 extconf.rb
mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h
extconf failed, exit code 1
Gem files will remain installed in /tmp/bundler20160829-20303-17c65wpgod-0.13.6/gems/god-0.13.6 for inspection.
Results logged to /tmp/bundler20160829-20303-17c65wpgod-0.13.6/extensions/arm-linux/2.1.0/god-0.13.6/gem_make.out
Using highline 1.7.8
Using ice_cube 0.13.0
Using liquid 3.0.6
Using rspec-support 3.3.0
Using settingslogic 2.0.9
Using simplecov-html 0.10.0
Installing sqlite3 1.3.10 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
/usr/bin/ruby2.1 extconf.rb
mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h
extconf failed, exit code 1
Gem files will remain installed in /tmp/bundler20160829-20303-opn966sqlite3-1.3.10/gems/sqlite3-1.3.10 for inspection.
Results logged to /tmp/bundler20160829-20303-opn966sqlite3-1.3.10/extensions/arm-linux/2.1.0/sqlite3-1.3.10/gem_make.out
Using bundler 1.12.5
An error occurred while installing json (1.8.3), and Bundler cannot continue.
Make sure that `gem install json -v '1.8.3'` succeeds before bundling.
Arduino part still under development. Testing with arduino is needed first.
It happened again. I'm sure it's a result of the fact that the websocket connection lives in a separate thread.
LED, small LCD display, ...
The link in the README to the instructions for flashing the Arduino links to the farmbot-serial repository instead of the farmbot-arduino-controller repository:
Arduino
-------
You will need to flash your Arduino with custom firmware. For instructions on how to
do this, see [the FarmBot-Arduino github page](https://github.com/FarmBot/farmbot-serial)
Should be:
[the FarmBot-Arduino github page](https://github.com/FarmBot/farmbot-arduino-firmware)
different classed needed for:
I start the farmbot-raspberry-pi-controller as follows and the my.farmbot.io device page show UNABLE TO DOWNLOAD DEVICE CREDENTIALS
There is not credentials.yml file but it seems replaced by db/settings.yml
fa@NanoPi2:~/farmbot-raspberry-pi-controller$ ruby farmbot.rb
Connecting...
Conencting to mqtt.farmbot.io:1883
Connected!
OH NOES! Farmbot was disconnected from MQTT. Retrying...
Connecting...
Conencting to mqtt.farmbot.io:1883
Connected!
I am not sure it is connected!
Good day
I have successfully setup the Arduino Controller, but I keep getting this error when trying to launch Farmbot:
Want to run ruby farmbot.rb now?
y
Connecting...
Conencting to mqtt.farmbot.io:1883
Connected!
/usr/local/rvm/gems/ruby-2.3.0/gems/em-mqtt-0.0.5/lib/em/mqtt/client_connection.rb:181:in connect_ack': Connection refused: not authorised (MQTT::ProtocolException)
from /usr/local/rvm/gems/ruby-2.3.0/gems/em-mqtt-0.0.5/lib/em/mqtt/client_connection.rb:163:inprocess_packet'
from /usr/local/rvm/gems/ruby-2.3.0/gems/em-mqtt-0.0.5/lib/em/mqtt/connection.rb:37:in receive_data'
from /usr/local/rvm/gems/ruby-2.3.0/gems/eventmachine-1.2.0.1/lib/eventmachine.rb:194:inrun_machine'
from /usr/local/rvm/gems/ruby-2.3.0/gems/eventmachine-1.2.0.1/lib/eventmachine.rb:194:in run'
from /root/farmbot-raspberry-pi-controller/lib/farmbot-pi.rb:29:instart'
from farmbot.rb:5:in <top (required)>'
from setup.rb:62:inload'
from setup.rb:62:in `'
Kind Regards,
Riaan
each command line should be handles by the same handler as the single command
I do not connect Farmot Raspicontroler to my server. I get an error like this.
Setup is complete! You may now runruby farmbot.rbto start the bot. Want to runruby farmbot.rb` now?
y
Connecting...
/usr/local/rvm/gems/ruby-2.3.1/gems/farmbot-resource-0.6.0/lib/resources/abstract_resource.rb:31:in fetch_no': undefined methodurl' for #Errno::ECONNREFUSED:0xebcef0 (NoMethodError)
from /usr/local/rvm/gems/ruby-2.3.1/gems/farmbot-resource-0.6.0/lib/resources/abstract_resource.rb:23:in block in fetch' from /usr/local/rvm/gems/ruby-2.3.1/gems/farmbot-resource-0.6.0/lib/http/bad_http_resp.rb:3:inno'
from /usr/local/rvm/gems/ruby-2.3.1/gems/farmbot-resource-0.6.0/lib/resources/abstract_resource.rb:23:in fetch' from /usr/local/rvm/gems/ruby-2.3.1/gems/farmbot-resource-0.6.0/lib/resources/abstract_resource.rb:41:inall'
from /usr/local/rvm/gems/ruby-2.3.1/gems/farmbot-resource-0.6.0/lib/resources/device.rb:9:in current' from /var/www/farmbot-raspberry-pi-controller/lib/farmbot-pi.rb:21:ininitialize'
from farmbot.rb:5:in new' from farmbot.rb:5:in'
from setup.rb:62:in load' from setup.rb:62:in
'
Version 3.0.4
Trouble connecting to bot
older versions normal connect and config
Hi everyone,
When I flash a new version of the firmware, my configuration settings are kept (speed, timeout, etc). But the steps per MM are set back to their default version (5 5 25)
Do not hesitate to tell me if you need to test
Thanks
This probably does not even belong in this repo, but we can talk about it here until we figure out a game plan.
When a user gets a bot, it will come with an SD card for the pi with an image of Raspbian + all the FarmBot software installed on it already. Ideally the user would simply plug it in and it would start downloading updates, connect with our web app, and the user could start controlling the device. But there are a few issues:
Possible solutions:
Hook up a monitor and keyboard to the pi and edit files through the terminal or do something from the desktop environment. This is just not an option in my opinion. Most people don't own external monitors and keyboards these days, and it is a total pain to hook them up temporarily, especially outside! Also, I think most people would not be able to/are not confident enough to use the terminal.
Connect to the pi via ethernet directly to a laptop and edit files via SSH. This is surprisingly a pain to get working not only form the pi side, but from the network configuration on the laptop side as well. I think this option is ruled out too.
Use a laptop or PC to edit a text file in the boot directory of the pi's SD card before plugging it into the pi and booting up. It would contain a wifi SSID and password (if needed) and a place to enter in a device name and password used to claim ownership of the device from the web app. This may be the very easiest as all we need is a script to read that text file on bootup, and it is not too difficult for users to do. However, it requires an SD or microSD card reader to do. A potential problem is if one changes their wifi name or password, then the pi will lose connectivity and would need to be hard shutdown by pulling the plug, then the SD card text file would need to updated. Not very clean... However, if it lost connectivity, the user could just switch back their network settings to gain access again, and update the settings remotely via the web app.
User writes a text file on a USB stick and plugs it into the pi which copies it automatically. Prevents the need for a hard shutdown if the pi loses connectivity. There may be issues with USB stick formatting or accessing the pi's USB ports (it may be in a tight, waterproof case)
A captive portal where the pi serves up a simple webpage where the user can enter and read info. On ethernet, the captive portal would activate if the FarmBot has no name or password (first boot) and the web page would serve up on a certain IP that the user could navigate to from any device's web browser as long as they are on the same network. If the device uses a wifi dongle, the portal would activate on first boot or when the wifi credentials are invalid. In these cases, the device would create its own wifi network called 'Configure FarmBot' that the user could connect to with any device, enter in the info, then initiate a reboot. This method would not work if the device was using a cellular or even satellite connection.
I think 3) is an easy solution for now that supports all modes of connectivity. 5) would be a more user-friendly layer in the future for wifi and ethernet connections which will likely be far more common than cellular connections.
Sorry for the long post. Thoughts or other options I haven't mentioned?
hello, i have installed your firmware alpha 1.1 for my raspberry 3 and arduino with the last version,
in the instal everything is ok i run ruby setup.rb but in http://my.farmbot.io/ there an error impossible to conect to mqtt server can you help me?
I started to build my farmbot is a very great project thank you for that
sorry for my english
clement to france
Things will all be working fine, then all of a sudden the web stuff will not be able to talk to the PI any more. The last messages that come up seem to be stuff about dhcp refreshing. I suspect that this might have to do with when a DHCP lease refresh happens that instead of a refresh it somehow takes the wlan interface up and down. Then the software on PI fails to forma new connection to web side. I have not tried to debug this much but if people have hints for me, I might try next weekend.
This is just a note for me for later. Need to verify that the value of X, Y and Z are persisting and reloading correctly after a restart.
$ iex -S mix
Erlang/OTP 19 [erts-8.0] [source] [64-bit] [smp:4:4] [async-threads:10] [hipe] [kernel-poll:false]
using development configuration.
==> nerves_network_interface
cc -c -I/home/rick/.asdf/installs/erlang/19.0/lib/erlang/usr/include -O2 -Wall -Wextra -Wno-unused-parameter -pedantic -std=c99 -D_XOPEN_SOURCE=600 -o src/netif.o src/netif.c
src/netif.c:26:27: fatal error: libmnl/libmnl.h: No such file or directory
#include <libmnl/libmnl.h>
^
compilation terminated.
make: *** [src/netif.o] Error 1
could not compile dependency :nerves_network_interface, "mix compile" failed. You can recompile this dependency with "mix deps.compile nerves_network_interface", update it with "mix deps.update nerves_network_interface" or clean it with "mix deps.clean nerves_network_interface"
** (Mix) Could not compile with "make" (exit status: 2).
Depending on your OS, make sure to follow these instructions:
* Mac OS X: You need to have gcc and make installed. Try running the
commands "gcc --version" and / or "make --version". If these programs
are not installed, you will be prompted to install them.
* Linux: You need to have gcc and make installed. If you are using
Ubuntu or any other Debian-based system, install the packages
"build-essential". Also install "erlang-dev" package if not
included in your Erlang/OTP version. If you're on Fedora, run
"dnf group install 'Development Tools'".
GCC Info:
$ which gcc
/usr/bin/gcc
$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.8/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.8.4-2ubuntu1~14.04.3' --with-bugurl=file:///usr/share/doc/gcc-4.8/README.Bugs --enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.8 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.8 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-libmudflap --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.8-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04.3)
MQTT supports last will and testament. We're going to need to use that to indicate that the bot lost connectivity.
I will take a look at this when time allows. Setting it here for now until that happens.
I was wondering if the frequency that the pi checks the schedule could be increased? Is there a significant cost in doing so?
Increasing the check rate would allow the manual control page to feel more 'real-time' than it currently is - a major 'wow' factor I think most people will like especially when they are using the widget to show off their bot to their friends.
Dear Farbot Team,
after i install the Farmbot raspberry pi controller (Alpha1.1) software, i tried to run it. But after a short connection to the Arduino (Alpha 1.0). The connection was refused withe the error text " not authorized". (MQTT::Protocol Exception). Have i installed the wrong version of PI controller, or is something wrong withe the UUID?
Best regards
Christoph
This repository is for Farmbot OS problems.
While waiting my Farmbot, I try to build the image that on RPI3.
Issue1:
The root file system seems lack of /state directory.
I try to create /state directory in the root file system. Seems fix the issue.
hint: the test environment did not attach Arduino, keyboard, mouse.
Attach 2 console log in the zip file.
Issue2:
The HDMI seems have no output of my build image. The same test environment with 3.0.0.img in the SD can show some texts in the HDMI.
Thanks for your effort, and great to have Farmbot project!
Just an idea. Would be convenient to the non-technical users.
Hello
I'm not sure if this was discussed already, as per the setup instruction when i try to configure my home wifi details and save by accessing 192.168.24.1, nothing happens after clicking save configuration button, it stays in the initial screen, i tried using the both the .img file 2.0.3 and 2.0.2 both has the same issue.
Only SSID's that are visible is as following
test_ssid
meep
lawl
it does not show my home wifi SSID when scanning wifi
Thanks in advance for any help
replace the big procedure by smaller ones:
I followed the instructions for installing the software on my Raspberry Pi 3, but when I try to run 'ruby farmbot.rb', I get the following error:
pi@farmbot:
'/farmbot-raspberry-pi-controller$ ruby farmbot.rb
/home/pi/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:120:inrequire': cannot load such file -- pry (LoadError) from /home/pi/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:120:in
require'
from /home/pi/.rvm/gems/ruby-2.3.0/gems/activesupport-4.2.3/lib/active_support/dependencies.rb:274:inblock in require' from /home/pi/.rvm/gems/ruby-2.3.0/gems/activesupport-4.2.3/lib/active_support/dependencies.rb:240:in
load_dependency'
from /home/pi/.rvm/gems/ruby-2.3.0/gems/activesupport-4.2.3/lib/active_support/dependencies.rb:274:inrequire' from /home/pi/farmbot-raspberry-pi-controller/lib/telemetry_message.rb:1:in
<top (required)>'
from /home/pi/farmbot-raspberry-pi-controller/lib/command_objects/send_message.rb:3:inrequire_relative' from /home/pi/farmbot-raspberry-pi-controller/lib/command_objects/send_message.rb:3:in
<top (required)>'
from /home/pi/farmbot-raspberry-pi-controller/lib/command_objects/commands.rb:17:inrequire_relative' from /home/pi/farmbot-raspberry-pi-controller/lib/command_objects/commands.rb:17:in
<top (required)>'
from lib/controllers/exec_sequence_controller.rb:2:inrequire_relative' from lib/controllers/exec_sequence_controller.rb:2:in
<top (required)>'
from /home/pi/farmbot-raspberry-pi-controller/lib/command_objects/resolve_controller.rb:1:inload' from /home/pi/farmbot-raspberry-pi-controller/lib/command_objects/resolve_controller.rb:1:in
block in <top (required)>'
from /home/pi/farmbot-raspberry-pi-controller/lib/command_objects/resolve_controller.rb:1:ineach' from /home/pi/farmbot-raspberry-pi-controller/lib/command_objects/resolve_controller.rb:1:in
<top (required)>'
from /home/pi/farmbot-raspberry-pi-controller/lib/messaging/message_handler.rb:6:inrequire_relative' from /home/pi/farmbot-raspberry-pi-controller/lib/messaging/message_handler.rb:6:in
<top (required)>'
from /home/pi/farmbot-raspberry-pi-controller/lib/farmbot-pi.rb:3:inrequire_relative' from /home/pi/farmbot-raspberry-pi-controller/lib/farmbot-pi.rb:3:in
<top (required)>'
from farmbot.rb:1:inrequire_relative' from farmbot.rb:1:in
pi@farmbot:/farmbot-raspberry-pi-controller$
Any one understand why farmbot.rb cannot run?
Hey @TimEvWw, Rick and I were messing with the latest bot and found that commands had a delay of about a minute. We looked into the controller source code and found this:
Is there a reason the + 60
is there?
Before curling in rvm, you need to do this:
gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
Installing ruby on the pi3 only took about 25 minutes, not 2 hours.
After going into the farmbot-raspberry-pi-controller directory, need to do this for gem install bundler to work:
rvm use 2.3.0
instead of using the database table as it is now
try different SD-Cards and having same issues, work fine with NOOBS OS.
any suggestions?
My farmbot.rb wouldn't fire up until I ran sudo gem install bson
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.