https://github.com/srcfl/srcful-gateway
Sourceful Energy Gateway: Connect your solar inverter or Utility meters to earn tokens.
https://github.com/srcfl/srcful-gateway
Last synced: 4 months ago
JSON representation
Sourceful Energy Gateway: Connect your solar inverter or Utility meters to earn tokens.
- Host: GitHub
- URL: https://github.com/srcfl/srcful-gateway
- Owner: srcfl
- License: mit
- Created: 2023-03-10T15:50:10.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2025-10-19T20:57:12.000Z (8 months ago)
- Last Synced: 2025-10-20T03:09:34.797Z (8 months ago)
- Language: Python
- Homepage: https://sourceful.energy/
- Size: 5.45 MB
- Stars: 8
- Watchers: 4
- Forks: 2
- Open Issues: 81
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Sourceful Energy Gateway
The Sourceful Energy Gateway application is a bundle of services that are deployed as docker containers on a Raspberry Pi.
```
+------------+ +------------+
| | | |
| Sourceful | | |
| Energy |<--- modbus tcp/ip --->| Inverter |
| Gateway | | |
| | | |
+------------+ +------------+
```
## Setting Up the Raspberry Pi
Raspberry Pi OS Lite (64-bit) is the recommended operating system.
1. **Configure and Update**:
- Run `sudo raspi-config` to set locale and timezone.
- Update with `sudo apt-get update && sudo apt-get upgrade -y`.
- Restart with `sudo reboot` and log in again using SSH.
2. **Enable i2c and SPI**:
- Use `sudo raspi-config` to enable `I2C` and `SPI` interfaces.
- For Rak Hotspot Miner V2, edit `/boot/firmware/config.txt` to add `dtoverlay=spi0-1cs`.
- Save, exit, and restart with `sudo reboot`, then log in again using SSH.
## Building and Running the Project
To build and run this project, simply run the following command:
```shell
docker-compose -f compose-rpi4.yml up
```
Or in detached mode:
```shell
docker-compose -f compose-rpi4.yml up -d
```
## Testing
To run the tests, execute the following command:
For the `server` service:
```shell
pytest server/tests/server_unit_test
pytest server/tests/server_rest_test
```
For the `bluetooth` service:
```shell
pytest bluetooth/tests/ble_unit_test
pytest bluetooth/tests/ble_rest_test
```