The Srcful Energy Gateway application is a bundle of services that are deployed as docker containers on a Raspberry Pi.
+------------+ +------------+
| | | |
| Srcful | | |
| Energy |<--- modbus tcp/ip --->| Inverter |
| Gateway | | |
| | | |
+------------+ +------------+
Raspberry Pi OS Lite (64-bit) is the recommended operating system.
Configure and Update:
sudo raspi-config
to set locale and timezone.sudo apt-get update && sudo apt-get upgrade -y
.sudo reboot
and log in again using SSH.Enable i2c and SPI:
sudo raspi-config
to enable I2C
and SPI
interfaces./boot/firmware/config.txt
to add dtoverlay=spi0-1cs
.sudo reboot
, then log in again using SSH.To build and run this project, simply run the following command:
docker-compose -f compose-rpi4.yml up
Or in detached mode:
docker-compose -f compose-rpi4.yml up -d
To run the tests, execute the following command:
For the server
service:
pytest server/tests/server_unit_test
pytest server/tests/server_rest_test
For the bluetooth
service:
pytest bluetooth/tests/ble_unit_test
pytest bluetooth/tests/ble_rest_test