The Powerlogic daemon will run on the Raspberry Pi checking the status of the network and triggering the relays when needed. This post will define what the daemon does, where it stores its information, and how it tests the network.
The daemon will constantly run on the Raspberry Pi. It will need to be able to;
Configure IP information for the Raspberry Pi.
Read GPIO input for “Reset” button press.
Write GPIO pins to control relays
Display HTML control panel for configuration
Log events to a log file
test network status using various tests
interact with heartbeat API
Sync time to NTP server
Add users to system (For ssh tunneling)
Change passwords on system
Generate random and secure root password
The Network tests are;
1. Network Link Status (Link light is on)
2. Ping Default Gateway
3. Resolve DNS
4. Interact with Heartbeat API