inverter was included
This commit is contained in:
38
README
38
README
@@ -11,10 +11,42 @@ Was needs to be done on the Raspberry pi before the tool can run.
|
||||
- pip install -r requirements.txt
|
||||
|
||||
|
||||
How to run the script:
|
||||
3) How to run the script for testing:
|
||||
|
||||
- nohup python main.py > terminal_log 2>&1 &
|
||||
nohup python main.py > terminal_log 2>&1 &
|
||||
|
||||
For reading out the terminal_log while script is runing:
|
||||
|
||||
- tail -f terminal_log
|
||||
tail -f terminal_log
|
||||
|
||||
|
||||
4) Implement and run the ems as systemd service:
|
||||
create:
|
||||
/etc/systemd/system/allmende_ems.service
|
||||
|
||||
insert:
|
||||
[Unit]
|
||||
Description=Allmende EMS Python Script
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
WorkingDirectory=/home/pi/projects/allmende_ems
|
||||
ExecStart=/home/pi/allmende_ems/bin/python3.11 /home/pi/projects/allmende_ems/main.py
|
||||
Restart=always
|
||||
RestartSec=5
|
||||
StandardOutput=journal
|
||||
StandardError=journal
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
manage the service with the following commands:
|
||||
Once:
|
||||
sudo systemctl daemon-reload
|
||||
sudo systemctl start allmende_ems.service
|
||||
sudo systemctl enable allmende_ems.service
|
||||
While running:
|
||||
sudo systemctl status allmende_ems.service
|
||||
sudo systemctl restart allmende_ems.service
|
||||
sudo systemctl stop allmende_ems.service
|
||||
journalctl -u allmende_ems.service
|
||||
|
||||
Reference in New Issue
Block a user