User Tools

Site Tools


buster:porridge

This is an old revision of the document!


Ensure your user is a member of gpio.

Dependencies

Install

  • RVM
  • ruby
  • Create a gemset that reflects .ruby-gemset (and 'rvm use 3.0.0@rails6131 –default ?)
  • install rails into that gemset
  • gem update bundle

rpi_gpio v0.5.0 won't install through bundle (April 2021). Here's why. Locking to v0.4.0 seems to work at the moment (in Gemfile).

Installation

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 uses systemd. This means that porridged.system needs to be linked from /etc/systemd/system/porridged.service.

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. More.

  ln -s /home/slack/porridge/porridged.service /etc/systemd/system/
  systemctl daemon-reload
  systemctl enable porridged
  systemctl status porridged
  systemctl start porridged

The .service needs to use the RVM wrapper script, as if it were being launched from ''cron''. This needs to be updated with newer versions of ruby (or new gemsets).

API Server

Updates

Updating ruby

  • New wrapper needed in porridged.service

Updating rails

Troubleshooting

  • Thermometers are plugged in but none are recognised
    • Have you set dtoverlay correctly?
buster/porridge.1620222611.txt.gz · Last modified: 2021/05/05 13:50 by slack