Raspberry Pi RTC & WatchDog Management Package
Project description
rpi-rtc - Raspberry Pi RTC & WatchDog Management
Complete solution for managing DS3231 RTC and hardware WatchDog on Raspberry Pi.
Features
- Web Panel - Modern HTML/JS interface (FastAPI + WebSocket)
- REST API - Full REST API with real-time WebSocket updates
- CLI Commands - Direct commands for scripts and automation
- CLI Shell - Interactive command-line interface
- Python Package - Programmatic API (
piRTCpackage) - Docker Support - Containerized deployment
Quick Links
| Document | Description |
|---|---|
| README_RTC.md | RTC & WatchDog setup, CLI usage, testing |
| README_piRTC.md | Python package (piRTC) documentation |
Quick Start
Method 1: Automated Installer (Recommended)
cd /home/tom/github/maskservice/rpi-rtc
./install.sh
Method 2: Using Makefile
cd /home/tom/github/maskservice/rpi-rtc
make quick-start # Installs deps, creates venv, installs package
make shell # Run interactive shell
make server # Start API server
Method 3: Manual Installation
make deps # Install system dependencies
make bootstrap # Create venv and install deps
make install # Install the package
4. Use CLI Shell
ssh pi@192.168.188.229 'cd /opt/rpi-rtc && python3 rtc_shell.py'
5. Start Web Server
# Access: http://192.168.188.229:8080
ssh pi@192.168.188.229 'cd /opt/rpi-rtc && python3 -m piRTC.api'
4. Python API
from piRTC import RTCManager
rtc = RTCManager()
print(rtc.read_time()) # {'hour': 16, 'minute': 42, 'second': 0}
Hardware Wiring
DS3231 RTC
VDD -> 3.3V (Pin 1) SCL -> SCL (Pin 5)
GND -> GND (Pin 6) SDA -> SDA (Pin 3)
WatchDog
VDD -> 3.3V (Pin 1) SCL -> SCL (Pin 5)
GND -> GND (Pin 6) SDA -> SDA (Pin 3)
FEED -> GPIO 4 (Pin 7)
Testing Status
✅ RTC maintains time after restart
✅ System time sync working
✅ I2C: 0x68 (RTC), 0x67 (WatchDog)
✅ Temperature: 26-29°C
✅ Web API on port 8080
Last Test: March 15, 2026, 17:08 GMT
RPi IP: 192.168.188.229
License
Apache License 2.0 - see LICENSE for details.
Author
Created by Tom Sapletta - tom@sapletta.com
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pirtc-1.0.5.tar.gz.
File metadata
- Download URL: pirtc-1.0.5.tar.gz
- Upload date:
- Size: 16.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b0be4052ae54a6b01c8a519c8839d7d6757d8092b6bf26ad91ef1acf2c31fc4d
|
|
| MD5 |
180fcb5d720a135ab62eb5ee5551b6f5
|
|
| BLAKE2b-256 |
0dc1c9730c221b0b14f7d1899d048ffefdb6c677079bc0772558565980d79258
|
File details
Details for the file pirtc-1.0.5-py3-none-any.whl.
File metadata
- Download URL: pirtc-1.0.5-py3-none-any.whl
- Upload date:
- Size: 17.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
454a87d8504bd98e860172cd1292184bee0c5fb0e8cb26fcd50b9462979fbc11
|
|
| MD5 |
ce6729fdbfe02bb2f3b5d504da8ba09e
|
|
| BLAKE2b-256 |
5962dd584732a1a73b1bdcafd650a5fb2a5223e5dbab4e699c90ba4e5e2b3b5e
|