User Tools

Site Tools


how_to_setup_one_wire_projects_on_raspberry_pi

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
how_to_setup_one_wire_projects_on_raspberry_pi [2015/03/20 16:14]
admin
how_to_setup_one_wire_projects_on_raspberry_pi [2020/04/08 08:35] (current)
admin
Line 1: Line 1:
 +====== Setup One Wire projects on Rasperry Pi ======
 +
 These are some notes on how to setup various of my developments regarding OWFS on a Raspberry Pi. These are some notes on how to setup various of my developments regarding OWFS on a Raspberry Pi.
  
-I am not going to use the X server on my system, therefore let's clean it up, so future updates will consume less time and resources. See also [[http://raspberrypi.stackexchange.com/questions/4745/how-to-uninstall-x-server-and-desktop-manager-when-running-as-headless-server|How to uninstall X Server and Desktop Manager when running as headless server?]] +Install required packages. 
-  apt-get install deborphan +  apt-get install fcgiwrap 
-  apt-get remove  --auto-remove --purge libx11-.\* +  apt-get install ferm lzma nullmailer vim unattended-upgrades #for convenience
-  apt-get autoremove --purge libx11-.* lxde-.* raspberrypi-artwork xkb-data omxplayer penguinspuzzle sgml-base xml-core alsa-.* cifs-.* samba-.* fonts-.* desktop-* gnome-.* +
-  sudo apt-get remove --purge $(deborphan) +
-  sudo apt-get autoremove +
-   +
-Install required packages +
-  apt-get install at libow-perl librrdtool-oo-perl libtie-ixhash-perl nginx-light owfs ow-shell php5-cgi php5-cli php5-sqlite libow-php5 rrdtool fcgiwrap +
-  apt-get install ferm lzma nullmailer vim #for convenience +
-   +
-  * remove 'n' in /usr/lib/perl5/OW.pm at line 68+
  
 ===== OWST ===== ===== OWST =====
   * Download phpliteadmin from https://code.google.com/p/phpliteadmin/   * Download phpliteadmin from https://code.google.com/p/phpliteadmin/
     *  In phplieadmin's configuration file set //$directory = '/var/lib/owst/'//     *  In phplieadmin's configuration file set //$directory = '/var/lib/owst/'//
-  * Create sqlite3 database<code> +  * Create sqlite3 database as well as log and lock file and set permissions
-  mkdir /var/lib/owst +
-  chown pi.www-data /var/lib/owst +
-  chmod 750 /var/lib/owst +
-  sqlite3 /var/lib/owst/owst.sq3 < config/database.sql +
-  chown pi.www-data /var/lib/owst/owst.sq3 +
-  chmod 660 /var/lib/owst/owst.sq3 +
-</code>+
   * Insert into the databases' table //switch// the One-Write Switch you want to control   * Insert into the databases' table //switch// the One-Write Switch you want to control
     * ow_type e.g. //DS2413//     * ow_type e.g. //DS2413//
     * ow_address e.g. //3A.B36249000000//     * ow_address e.g. //3A.B36249000000//
     * ow_pio e.g. //PIO.B//     * ow_pio e.g. //PIO.B//
-  * Set option "enable_dl" to "on" in /etc/php5/cli/php.ini  +  
-  * Dynamic loading doesn't work in my setup (using nginx and php-fastcgi, therefore libowphp.so must be loaded in the php5 configuration:  +
-    * Create /etc/php5/mods-available/owphp.ini, write the following content in it +
- +
-  ; configuration for owphp module +
-  ; priority=20 +
-  extension=libowphp.so +
- +
-    * run ''php5enmod owphp'' +
-    * reload php-fastcgi +
-  * Copy cron and sudo config files +
- +
-  cp config/etc.cron.d.owst /etc/cron.d/owst +
-  cp config/etc.sudoers.d.owst /etc/sudoers.d/owst +
- +
-  * Create log file and set permissions +
- +
-  touch /var/log/owst.log +
-  chown pi.www-data /var/log/owst.log +
-  chmod 660 /var/log/owst.log +
 ===== 1w Monitoring ===== ===== 1w Monitoring =====
  
Line 56: Line 22:
   *execute ''libexec/gen_rrd_create.pl'' - run the output as a command   *execute ''libexec/gen_rrd_create.pl'' - run the output as a command
   *execute ''1wSensorMon.pl'' - no error this time   *execute ''1wSensorMon.pl'' - no error this time
- +  *activate cron job<code> 
-activate cron job +*/5 * * * *     root    1wSensorMon.pl    2> /dev/null 
- +</code>
-  */5 * * * *     root    1wSensorMon.pl    2> /dev/null +
  
  
how_to_setup_one_wire_projects_on_raspberry_pi.1426864444.txt.gz · Last modified: 2015/03/20 16:14 by admin