FBTUG-FarmBot 軟體設計
OS軟體
- Farmbot OS
- Software Documents
- Mac:
- diskutil list
- sudo diskutil umount /dev/disk3s1
- sudo dd if=./farmbot-rpi3-3.0.0.img of=/dev/disk3 bs=4
- BUILD
- With all tools be pre-installed, in "farmbot/os" directory, "make release-rpi3", image will be in release-rpi3-version directory
- ASDF version manager
- Introduction to Mix
- Elixir installation
- hex - The package manager for the Erlang ecosystem
- fwup installation
- Nerves System BR
- erlinit
- Erlang VM startup procedure
- systools - A Set of script Generators.
- rel - Release resource file
- buildroot
- How RPI boot
- RPi Serial Connection
- RPI GPIO Header PINOUT
- mruby
- RPI Camera
- Installation
- PYTHON PICAMERA
- A websocket-powered raspberry pi camera webserver (test OK
- )
- RPi-Cam-Web-Interface
- simple client/server Raspberry Pi Camera
- Stream RPi Camera Module Video to network, using Python ( tested )
- In mac, run VLC gui, open network->network->URL tcp/h264://my_pi_address:8000/
- Basic motion detection and tracking with Python and OpenCV
- scikit-learn(Machine Learning in Python )
- plant-detection
- Using
- start SSH server and support scp
- console: Elixir.Farmbot.System.Network.SSH.init("")
- host:
Cloud Service Software
- 選擇架設環境 與 Stack
- 1. Self-host Ubuntu 14.04 LTS with dokku
- 2. Self-host Ubuntu 14.04 LTS with Passenger + Nignx
- 3. Heroku Service
- Self-hosted Backend Installation Detail
- Farmbot-Web-API
- https://drive.google.com/file/d/0B3xfDXAshpYmUjZlVWVLOVhRTzA/view?usp=sharing
- Online version : https://my.farmbot.io/
- Main reference of set up Ruby on Rail Environment: https://gorails.com/setup/ubuntu/14.04
- 1. Install RVM for Ruby version management ( if any update error, try "sudo apt-get update" first )
- https://rvm.io/rvm/install
- rvm 安裝會先作 sudo apt-get update,如果有任何repository url 404找不到就會終止
- 處理方法:http://stackoverflow.com/questions/23650992/ruby-rvm-apt-get-update-error
- 2. libpg-dev for ubuntu
- Install libpg-dev
- 3. 安窗 bundler
- gem install bundler
- bundle install
- 4. Copy config/database.example.yml to config/database.yml.
- 5. 先確認 postgresql 是否有安裝與正常啟動,可參考:https://www.digitalocean.com/community/tutorials/how-to-install-and-use-postgresql-on-ubuntu-14-04
- 接下來要創一個 user帳號 (和ubunut現在一樣名字的帳號),必須有 CREATEDB和LOGIN的 Privilege
- sudo apt-get update
- sudo apt-get install postgresql postgresql-contrib
- sudo -i -u postgres #change user to postgress account
- psql #switch to psql prompt
- \du #dipslay user
- CREATE ROLE your_username WITH CREATEDB LOGIN;
- \du #check create successfully
- \q
- 相關可參考:https://www.digitalocean.com/community/tutorials/how-to-install-and-use-postgresql-on-ubuntu-14-04
- 6. migrate Farmbot-Web-API 資料庫結構
- rake db:create:all db:migrate db:seed
- 7. 防火牆設定,Web API 基於 Ruby on Rail 預設是用 3000 port (看你自己是用啥,我是用ufw簡單)
- 關於 Deployment
- https://github.com/ykhorzon/Farmbot-Web-API/blob/master/DEPLOYMENT.md
- Farmbot-web-frontend
- MQTT-Gateway
- npm install
- fatal error: zmq.h: No such file or directory, Solution: JustinTulloss/zeromq.node#281
- MQTT Port 1883
Study - Cloud Software
Web Front end Application
Web Backend API + MQTT gateway
https://docs.google.com/presentation/d/1KPZ7AuECa18GSyDUFufFgQZ9NpkQvx2PoAolu8O8_F8/edit#slide=id.g1c733db59f_0_24
- Using Fake Hardware connect to MQTT gateway
- Boot Web-Front, Web API and MQTT gateway
宜蘭深溝安裝相關資訊
OS image version : farmbot-rpi3-3.0.8-rc.8.img
https://my.farmbot.io
測試用帳號密碼
Account: [email protected]
pswd: farmbotw96j0 (farmbot+台灣, 注音中打包含最後空格)
重新綁定Farmbot OS 和 登入帳號的方法
- 將 pi 拿出wifi範圍 或 將wifi斷線,pi自動會轉回AP mode
- 電腦遠則farmbot-XXX wifi,連入後開啟網頁瀏覽器 http://192.168.24.1/
- 設定 pi configuration,其中就包含綁定my.farmbot.io帳號
http://forum.farmbot.org/t/multiple-wifi-access-points/1360