Difference between revisions of "Create SD Image Version 0.71"

From HiveTool
Jump to: navigation, search
Line 22: Line 22:
 
#Add timeout to crontab so hive.sh can't hang.
 
#Add timeout to crontab so hive.sh can't hang.
  
== Get new image ==
+
==Create new image==
 +
=== Get latest Wheezy image ===
 
#Download, unzip, burn image.
 
#Download, unzip, burn image.
 
#Boot
 
#Boot
 
#DO NOT EXPAND file syatem!
 
#DO NOT EXPAND file syatem!
  
== Set up Wi-Fi ==
+
=== Set up Wi-Fi ===
  
  
Line 39: Line 40:
  
  
===Wi-Fi auto reconnect to AP===
+
====Wi-Fi auto reconnect to AP====
  
 
#Go to /etc/ifplugd/action.d/ and rename the ifupdown file to ifupdown.original
 
#Go to /etc/ifplugd/action.d/ and rename the ifupdown file to ifupdown.original
Line 47: Line 48:
 
http://raspberrypi.stackexchange.com/questions/4120/how-to-automatically-reconnect-wifi
 
http://raspberrypi.stackexchange.com/questions/4120/how-to-automatically-reconnect-wifi
  
== Remove packages we don't need ==
+
=== Remove packages we don't need ===
 
This will make room for software without expanding the image.
 
This will make room for software without expanding the image.
  
Line 58: Line 59:
 
https://project.altservice.com/issues/418
 
https://project.altservice.com/issues/418
  
== Install packages we need ==
+
=== Install packages we need ===
  
 
  sudo apt-get -y update
 
  sudo apt-get -y update
Line 64: Line 65:
 
  sudo cpan GD::Text GD::Graph Date::Format XML::Simple DBI DBD::SQLite
 
  sudo cpan GD::Text GD::Graph Date::Format XML::Simple DBI DBD::SQLite
  
== Config Apache ==
+
=== Config Apache ===
  
 
bcm2835 library
 
bcm2835 library
Line 79: Line 80:
  
  
== crontab ==
+
=== crontab ===
  
 
  # Check hive instruments every 5 minutes
 
  # Check hive instruments every 5 minutes

Revision as of 11:10, 20 May 2015

Feature Request

  1. Most recent raspbian distro
  2. Removal of bloatware from Raspbian (games, educational as discussed)
  3. Hivetool Support Pi & Pi2 (auto detect preferred)
  4. Automatic removal of erroneous data from sensors
  5. Basic navigation from webserver index.html, especially config.pl and Hivestats with download.
  6. Menu driven selection & configuration of sensors (gpio 2,3 for DHT22s preassigned by menu default)
  7. Menu driven setup of essential parameters with choices that don't crash app when saving, grey out unused.
  8. Sensor calibration provisions (gain, offset)
  9. Display instantaneous sensor readings from config screen with read button
  10. Preload & configure Apache Webserver and database, Hivetool, sensor drivers for proven sensors.
  11. Update local & online hivestats graphs to display lux trend pen, (use latest hivestats with enhanced autoscaling for local)
  12. Network / wifi support out of the box seems to work well now, handle configuration on router side with DHCP reservation as may be needed.
  13. Add configuration menu item for naming pi, same as hivestats name?
  14. Minimize need to enter Raspiconfig, can timezone and time all be handled in hivetool config?
  15. Enable i2c & serial.

Bug Fixes

  1. Add timeout to crontab so hive.sh can't hang.

Create new image

Get latest Wheezy image

  1. Download, unzip, burn image.
  2. Boot
  3. DO NOT EXPAND file syatem!

Set up Wi-Fi

Add to /etc/wpa_supplicant/wpa_supplicant.conf:

network={                                                                                                                                                                           
       ssid="dlink"                                                                                                                                                                
       key_mgmt=NONE                                                                                                                                                               
       auth_alg=OPEN                                                                                                                                                               
}                                                                                                                                                                                   


Wi-Fi auto reconnect to AP

  1. Go to /etc/ifplugd/action.d/ and rename the ifupdown file to ifupdown.original
  2. Then do:
cp /etc/wpa_supplicant/ifupdown.sh ./ifupdown

http://raspberrypi.stackexchange.com/questions/4120/how-to-automatically-reconnect-wifi

Remove packages we don't need

This will make room for software without expanding the image.

sudo apt-get remove --purge wolfram-engine penguinspuzzle scratch dillo squeak-vm squeak-plugins-scratch sonic-pi idle idle3 netsurf-gtk netsurf-common
sudo apt-get autoremove
sudo apt-get clean
rm -rf /home/pi/python_games
sudo rm -rf /opt/vc

https://project.altservice.com/issues/418

Install packages we need

sudo apt-get -y update
sudo apt-get -y install gawk bc apache2 libusb-dev libgd-graph-perl libexpat1-dev sqlite3
sudo cpan GD::Text GD::Graph Date::Format XML::Simple DBI DBD::SQLite

Config Apache

bcm2835 library

http://www.airspayce.com/mikem/bcm2835/

wiringPi

Groove Seeed - DHT22 with modified code

hx711wp

2591 Adafruit with modified code.


crontab

# Check hive instruments every 5 minutes
0,5,10,15,20,25,30,35,40,45,50,55 * * * * timeout -s KILL 3.5m /home/hivetool/hive.sh
#
# Check the server status
0,5,10,15,20,25,30,35,40,45,50,55 * * * * timeout -s KILL 1m /home/hivetool/server_status.sh > /var/www/server_status.txt