Nils Reiners b9cba11be7 cleaned up
2025-09-16 12:57:37 +02:00
2025-09-16 12:52:27 +02:00
2025-04-17 14:51:27 +02:00
2025-09-16 12:52:27 +02:00
2025-05-26 21:08:16 +02:00
2025-09-16 12:52:27 +02:00
2025-09-16 12:52:27 +02:00
2025-04-18 12:46:15 +01:00
2025-04-26 23:13:22 +02:00
2025-09-16 12:52:27 +02:00
2025-09-16 12:52:27 +02:00
2025-09-16 12:52:27 +02:00
2025-09-16 12:52:27 +02:00
2025-04-26 22:31:14 +01:00
2025-09-16 12:52:27 +02:00

Was needs to be done on the Raspberry pi before the tool can run.

1) Set the network-card to a fixed IP adress:
    - Using sudo nmtui
    - Adress was set to 10.0.0.111

2) Virtual Environment was created and python packages installed
    - python3 -m vemv allmende_ems
    - source allmende_ems/bin/activate
    - cd projects/allmende_ems
    - pip install -r requirements.txt


3) How to run the script for testing:

    nohup python main.py > terminal_log 2>&1 &

For reading out the terminal_log while script is runing:

    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
Description
No description provided
Readme 11 MiB
Languages
Python 100%