User Tools

Site Tools


buster:porridge

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
buster:porridge [2021/05/05 13:50] – [Updating rails] slackbuster:porridge [2021/05/05 15:14] (current) slack
Line 1: Line 1:
 +**Deprecated: use [[https://github.com/repent/porridge/blob/master/README.md|README.md]].**
 +
 Ensure your user is a member of ''gpio''. Ensure your user is a member of ''gpio''.
  
Line 14: Line 16:
 ====== Installation ====== ====== Installation ======
  
 +===== System configuration =====
 +
 +In ''/boot/config.txt'', a ''dtoverlay'' line has to be added for every pin to which one or more 1-wire thermometers are added:
 +
 +  # 1-Wire interface for 18B20 thermometers (can add as many of these as you like, in theory)
 +  # 3.21: having difficulty with gpiopin 4
 +  
 +  # For the breadboard setup (4.21):
 +  dtoverlay=w1-gpio,gpiopin=5
 +  dtoverlay=w1-gpio,gpiopin=13
 +  
 +  # For the downstairs PCB (first version, tested working 20.4.21):
 +  #dtoverlay=w1-gpio,gpiopin=5
 +  #dtoverlay=w1-gpio,gpiopin=10
 +
 +And reboot to take effect.
 ===== Daemon ===== ===== Daemon =====
  
-**The daemon relies on ''~/.porridge'' If you don't make sure that this is in place, then ''systemd'' will log to ''/var/log/daemon.log'' by default.**  (And it will try localhost:80 for the API server.)+**The daemon relies on ''~/.porridge'' for basic configuration.  If you don't make sure that this is in place, then ''systemd'' will log to ''/var/log/daemon.log'' by default.**  (And it will try localhost:80 for the API server.)
  
 The daemon uses systemd.  This means that porridged.system needs to be linked from ''/etc/systemd/system/porridged.service''. The daemon uses systemd.  This means that porridged.system needs to be linked from ''/etc/systemd/system/porridged.service''.
Line 23: Line 41:
 To enable the daemon from boot, ''systemctl enable porridged'' as root.  For this to work, the .service needs an ''[Install]'' section that includes a "target" -- a point in the boot process at which it should be loaded.  ''systemctl get-default'' tells you the default, ''systemctl list-units --type=targets'' lists all of the options.  [[https://www.pragmaticlinux.com/2020/08/raspberry-pi-startup-script-using-systemd/|More]]. To enable the daemon from boot, ''systemctl enable porridged'' as root.  For this to work, the .service needs an ''[Install]'' section that includes a "target" -- a point in the boot process at which it should be loaded.  ''systemctl get-default'' tells you the default, ''systemctl list-units --type=targets'' lists all of the options.  [[https://www.pragmaticlinux.com/2020/08/raspberry-pi-startup-script-using-systemd/|More]].
  
-    ln -s /home/slack/porridge/porridged.service /etc/systemd/system/ +  ln -s /home/slack/porridge/porridged.service /etc/systemd/system/ 
-    systemctl daemon-reload +  systemctl daemon-reload 
-    systemctl enable porridged +  systemctl enable porridged 
-    systemctl status porridged +  systemctl status porridged 
-    systemctl start porridged+  systemctl start porridged
  
 The ''.service'' needs to use the RVM wrapper script, [[https://rvm.io/integration/cron|as if it were being launched from ''cron'']].  This needs to be updated with newer versions of ruby (or new gemsets). The ''.service'' needs to use the RVM wrapper script, [[https://rvm.io/integration/cron|as if it were being launched from ''cron'']].  This needs to be updated with newer versions of ruby (or new gemsets).
buster/porridge.1620222611.txt.gz · Last modified: 2021/05/05 13:50 by slack