- Create ssd image with Raspberry Pi Imager
- put
ssd
file into boot partition - put
wpa_supplicant.conf
from this project into boot partition
- Boot up PI
- Connect as pi@ip and
raspberry
as password - Create app folder:
sudo mkdir /opt/smart_meter
sudo chown pi /opt/smart_meter
-
Copy code from this folder to the remote folder, e.g. via VS code ssh
-
make python3 default:
see https://raspberry-valley.azurewebsites.net/Python-Default-Version/
sudo update-alternatives --list python
sudo update-alternatives --install /usr/bin/python python /usr/bin/python2.7 1
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.7 2
python --version
-
install poetry
-
poetry install
-
setup ravendb
For RavenDb:
-
explain dbs to build (debug and readings), expirs!
-
setup service
sudo cp smartmeter.service /etc/systemd/system/smartmeter.service
sudo systemctl start smartmeter.service
sudo systemctl enable smartmeter.service