Solar system monitoring service for Raspberry Pi. Collects metrics from temperature sensors (1-Wire) and renogy modbus data from bluetooth or serial connection.
- Temperature Sensors: Reads 1-Wire temperature sensors via
w1thermsensor - Renogy Bluetooth: Reads solar charge controller data via BT-1/BT-2 modules
- Renogy Serial: Reads solar charge controller data via RS232/RS485 Modbus
- Cron Scheduling: Configurable schedules using cron syntax
- YAML Configuration: Config files with environment variable overrides
- External Logging Config: Python logging dictConfig from YAML with
!ENVtag support - Event-Driven Architecture: Pluggable consumers via event bus
- Systemd Service: Run as a system service
- python
- poetry
- raspberry pi 3, 4, 5, zero
- renogy charge controller
- wanderer BT-1
- rover B2-2
poetry install-
Bluetooth: Enable Bluetooth on your Pi for BT-1/BT-2 modules.
-
1-Wire: Enable 1-Wire interface for DS18B20 temperature sensors.
Renogy charge controllers can be read via Bluetooth or Serial connections:
| Connection | status | Module | Documentation |
|---|---|---|---|
| Bluetooth | verified | BT-1/BT-2 | bluetooth setup |
| RS232 | verified | RJ12 cable | rs 232 |
| RS485 | verified | RJ45 cable | rs 485 |
For Modbus protocol details, see rover modbus.
See yaml configuration for configuration options.
pisolar --help # Show help
pisolar run # Start the monitoring service
pisolar check # Check sensor availability
pisolar read-once # Read all sensors once (for testing)
pisolar show-config # Display current configuration
pisolar -c config.yaml -l logging.yaml run # Specify config filesThe project provides convenient run targets for common tasks:
poetry run pisolar # Run the pisolar CLI
poetry run lint # Check code style (isort, black, flake8)
poetry run format # Auto-fix code formatting (isort, black)
poetry run test # run all tests will coveragepoetry run pytest # Run all tests
poetry run pytest tests/test_pisolar.py # Run a single test file
poetry run pytest tests/test_pisolar.py::test_version # Run a single test
poetry run pytest -k "test_read" # Run tests matching pattern
poetry run pytest --cov # Run tests with coverage
poetry run pytest tests/ --cov=src/pisolar --cov-report=html --cov-report=term # Coverage with HTML reportTo run piSolar as a system service, see systemd.
