Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

(The) Checkinator

A future checking machine sent back through time to monitor your network!

Features

How it works

  • Check internet every 1s (configurable)
  • If internet is unreachable, start beeping and flashing:
    • Slowly if initial fault was at the LAN/WIFI level
    • Fast if the initial fault was at the internet level
  • Once internet reachable again, beeping and flashing stops

Cool features

  • Events are logged in CSV to /var/lib/checkinator/checkinator_events.csv (configurable)
  • Alarm test mode
  • Web server for viewing/downloading the CSV file (port 8000)

Todo

  • Do something with the OLED, perhaps "Days since last outage"
  • Do something with the buttons:
    • Button A power off
    • Button B silence a running alarm

Software Installation and setup

  1. Enable SPI and I2C with raspi-config
  2. Install the .deb file
  3. Edit /etc/checkinator/checkinator_config.yaml, in .ping.lan_hosts, list the address of your router (replacing mine)

Testing it out

Logical test

# should trigger beeping and flashing
touch /run/checkinator/testalarm
# recovery
rm /run/checkinator/testalarm

Network test

On your router, disable ICMP (or all) internet traffic for the checkinator (or entire) network. You should see fast blinking and flashing if it worked.

Allowing traffic again will silence the alarm the eyes will start blinking again.

You can also try blocking access to the router and the internet on ICMP, which should result in slow flashing and beeping. This way you know your LAN/WIFI is was the first fault detected.

Troubleshooting

Check status

systemctl status checkinator

Watch logs live

journalctl -u checkinator -f

Developer Docs

Building .deb

  • Requires podman and runs on Linux PC or CI: ./build.sh
  • Debian requires correctly formatted changelog to build
  • Match the version number in debian build scripts with version.py

Pi Zero (v1) hardware is 32 bit only, so build with:

ARCH=armhf ./build.sh

And be sure to install the armhf version, not arm64.

Raspberry Pi Setup

Python

Random stuff for i2c debugging and libraries for python to use:

sudo apt install i2c-tools libopenjp2-7

Display

Test pioled registered on i2c:

(venv) geoff@checkinator:~/checkinator $ sudo i2cdetect -y 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:                         -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- 3c -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- -- 

Test the OLED works:

python hardware_test/pioled.py

WS2812

Run the test program as root (does NOT play nice with venvs)

sudo -s
. ./venv/bin/activate
python hardware_test/WS2812B.py 

Buttons

todo

Dependency upgrades

On a pi or in emulator, with the venv activated, first get the list of outdated packages:

pip list --outdated

Update each library, as required. Eg:

pip install --upgrade setuptools

Dump the installed packages:

pip freeze > requirements.txt

Now just copy-paste the updated requirements.txt into this repository and rebuild the .deb.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages