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 | | |
| | | |
+------------+ +------------+
Raspberry Pi OS Lite (64-bit) is the recommended operating system.
-
Configure and Update:
- Run
sudo raspi-configto set locale and timezone. - Update with
sudo apt-get update && sudo apt-get upgrade -y. - Restart with
sudo rebootand log in again using SSH.
- Run
-
Enable i2c and SPI:
- Use
sudo raspi-configto enableI2CandSPIinterfaces. - For Rak Hotspot Miner V2, edit
/boot/firmware/config.txtto adddtoverlay=spi0-1cs. - Save, exit, and restart with
sudo reboot, then log in again using SSH.
- Use
To build and run this project, simply run the following command:
docker-compose -f compose-rpi4.yml upOr in detached mode:
docker-compose -f compose-rpi4.yml up -dTo run the tests, execute the following command:
For the server service:
pytest server/tests/server_unit_test
pytest server/tests/server_rest_testFor the bluetooth service:
pytest bluetooth/tests/ble_unit_test
pytest bluetooth/tests/ble_rest_test