Monday, September 11, 2017

Help! I Can't Reach the Power Switch

Pi is going to live in a remote location keeping it up and responding is better than a long drive just to press a reboot button. The watchdog service is going to help us out by rebooting the system when one of it's tests gets triggered.

Outline of Actions

  1. Turn on watchdog hardware
  2. Install Service
  3. Configure watchdog tests
  4. Run service
  5. Setup service to run on boot

Action Details

1. Turning on the hardware

Modify system config
sudo nano /boot/config.txt
Add this:
# turn on the hardward watchdog 
After reboot you should see watchdog listed (I don't know why there are two)
$ ls -al /dev/watchdog*
crw------- 1 root root  10, 130 Sep 11 15:38 /dev/watchdog
crw------- 1 root root 252,   0 Sep 11 15:38 /dev/watchdog0

2. Install the software

sudo apt-get install watchdog

3. Enable the tests

sudo nano /etc/watchdog.conf
uncomment a few lines
max-load-1      = 24
min-memory      = 1
watchdog-device = /dev/watchdog

4. Run the Service

sudo systemctl start watchdog
sudo systemctl status watchdog

5. Run on Boot

sudo nano /lib/systemd/system/watchdog.service
Change WantedBy to this:
And Enable
sudo systemctl enable watchdog


Enabling Watchdog on Raspberry Pi by Abdullah Bashir
Is this the correct way to install the watchdog package? by paulv 

Friday, September 8, 2017

Cellular Modem on the Pi

Our first attempt at adding WAN connectivity to the Pi failed because we didn't have a proper antenna connection, and we were on site so there was no Radio Shack (ha!) to run to. With the Novatel in pieces after half-assed attempts to solder hair-like antenna leads to gnat-sized antenna ports failed, it was time to order a new modem.

Cabin Pi

For our first public project, FPHI is working on the creation of an off the grid cabin monitoring system. At it's core, a Raspberry Pi 3 will monitor environmental and cabin systems and make the information available to the public.

Here's the current plan.

Environmental inputs:

  • Interior Temperature
  • Exterior Temperature
  • Humidity
  • Barometric Pressure
System Input:
  • From the charge controller, read the solar cell and battery levels
  • Monitor the power consumption of the Pi itself
  • Write the collected data to a remote InfluxDB, for rendering with Grafana.
  • Take occasional pictures (using the Pi Cam) and post to "the cloud".
  • Use a cellular modem to transfer data out and provide remote shell capability

So that's the nutshell summary. We'll use this space to record the difficulties in achieving these goals.