Comments (9)
This would be super useful for prototype bots that get rebooted all the time. @TimEvWw, do you know how to do this? If not, I think @RickCarlino or maybe @m3talsmith can help out?
from farmbot_os.
Normally this should be with the init.d but I haven't tried it yet. I'll
put in on my to-do list if nobody else wants to try.
On Fri, Nov 21, 2014 at 6:02 AM, Rory Aronson [email protected]
wrote:
This would be super useful for prototype bots that get rebooted all the
time. @TimEvWw https://github.com/TimEvWw, do you know how to do this?
If not, I think @RickCarlino https://github.com/rickcarlino or maybe
@m3talsmith https://github.com/m3talsmith can help out?—
Reply to this email directly or view it on GitHub
#10 (comment)
.
from farmbot_os.
I actually tried it a few days ago with these instructions that Rick sent
me: https://gist.github.com/naholyr/4275302 but the controller would not
fire up properly.
Rick said it's because of the way some of the require statements are
written.
Maybe you will have better luck? I can also copy in my init.d file if you
want to take a look.
Here are the error messages: Hey Rick, thanks for the support. I followed
the install instructions in that gist but am running into some issues. I
kept getting permission denied for accessing the farmbot.rb, farmbot.log,
and farmbot.pid files until I set the user as root, added a sudo in front
of the 'command', and also a sudo in front of the 'service farmbot start'.
Even then, when it fires up, I get the following errors. It starts up fine
if I run it normally as the user 'pi'. You can login at [email protected]:22
if you want to poke around. password: farmbot. Errors:/\ --------- FarmBot
--------- / database /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in
require': cannot load such file -- ./app/models/command.rb (LoadError) from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in
require' from
/home/pi/farmbot-raspberry-pi-controller/lib/database/dbaccess.rb:5:in
<top (required)>' from /home/pi/farmbot-raspberry-pi-controller/farmbot.rb:23:in
require_relative' from
/home/pi/farmbot-raspberry-pi-controller/farmbot.rb:23:in `
service… Service startedpi@farmbot ~ $
On Nov 21, 2014 1:58 AM, "Tim Evers" [email protected] wrote:
Normally this should be with the init.d but I haven't tried it yet. I'll
put in on my to-do list if nobody else wants to try.On Fri, Nov 21, 2014 at 6:02 AM, Rory Aronson [email protected]
wrote:This would be super useful for prototype bots that get rebooted all the
time. @TimEvWw https://github.com/TimEvWw, do you know how to do
this?
If not, I think @RickCarlino https://github.com/rickcarlino or maybe
@m3talsmith https://github.com/m3talsmith can help out?—
Reply to this email directly or view it on GitHub
<
https://github.com/FarmBot/farmbot-raspberry-pi-controller/issues/10#issuecomment-63924902>.
—
Reply to this email directly or view it on GitHub
#10 (comment)
.
from farmbot_os.
Hi guys!
So the issue was that we have a require_relative
statement somewhere that was written like this:
require_relative "./some/path/somewhere"
Should be a pretty quick fix. On that note, I really need to give a second attempt at getting my bot up and running so I can test this kind of stuff locally.
Let me know if you guys need any help with the Daemon stuff.
from farmbot_os.
That worked for the require_relative but not for the yml file load. So I
now fixed it with a simple shell script. I also had to modify the service
script to get it working on the RPI. There were some security issues also.
It works now for starting in the background and at boot time. Stopping or
restarting doesn't work. I've put it at
https://github.com/TimEvWw/farmbot-raspberry-pi-controller/tree/master/service
The farmbot script had to be copied to init.d with "sudo cp
/home/pi/farmbot-raspberry-pi-controller/service/farmbot /etc/init.d" After
that you can do "service farmbot start" to start it in the background
and "update-rc.d
farmbot defaults" to automatically start at boot time.
It might be possible that you have to fiddle a bit with security settings
for the file with "chmod +x /etc/init.d/farmbot"
On Fri, Nov 21, 2014 at 11:39 PM, Rick Carlino [email protected]
wrote:
Hi guys!
So the issue was that we have a require_relative statement somewhere that
was written like this:require_relative "./some/path/somewhere"
Should be a pretty quick fix. On that note, I really need to give a second
attempt at getting my bot up and running so I can test this kind of stuff
locally.Let me know if you guys need any help with the Daemon stuff.
—
Reply to this email directly or view it on GitHub
#10 (comment)
.
from farmbot_os.
We probably will need to store the process id in a PID file if we want to add the ability to stop/restart.
from farmbot_os.
Is this a temporary solution or should we look into daemonizing it?
I'm going to start creating image files of 'FarmBot OS' and hosting them on the wiki so that it is easy to get up to speed with a fresh install (already has farmbot and arduino code on it, everything is bundled, farmbot is a service, etc...)
from farmbot_os.
If we started adding status
and restart
commands, it could definitely be reused or loaded into a disk image for distribution.
from farmbot_os.
I got it working this way:
-
sudo nano /home/pi/farmbot-raspberry-pi-controller/service/farmbot
I had to change SCRIPT to '/home/pi/farmbot-raspberry-pi-controller/service/start' -
sudo cp /home/pi/farmbot-raspberry-pi-controller/service/farmbot /etc/init.d
-
chmod +x /etc/init.d/farmbot
-
sudo chmod -R 777 /var/run
-
sudo update-rc.d farmbot defaults
from farmbot_os.
Related Issues (20)
- [Farmware] Did you stop supporting the local webserver on port 27347? HOT 10
- Need to Configure VintageNet `:internet_host` setting
- [bug, cosmetic] unhandled message in error state: after Farmware exits normally HOT 8
- A simulator for the farmbot HOT 10
- Feture Reuest: "After Unlock" Sequence Callback
- Unused variable warning is polluting the Serial Console :) 10.1.3 HOT 9
- "since last reflash" metrics and flags
- Lua Persistent Storage (K/V store)
- Mark As command does not update plant age
- Lua Assertion read_pin always returns 1, making programmatic tool verification unusable HOT 5
- Seems to be an issue HOT 2
- Can't flash Arduino with firmware HOT 5
- DIdnt see a Doc project, so putting this here. Hyperlink issue with doc webpage HOT 1
- fail to falsh fambot _os HOT 5
- WiFi Adapters HOT 6
- how can i change the broker ? HOT 2
- Boot Sequence execution may be delayed by earlier (overdue) FarmEvent sequence executions HOT 2
- Water keeps running if FB stalls during the execution of a sequence / Risk of flooding HOT 1
- Sequence Not Found error is not sent back to MQTT RPC Client
- Configurator Improvements
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from farmbot_os.