2024-02-25, 15:20
I have created a small programme in Python 3 (3.7.3) to monitor the supply voltage of the uninterruptible power supply (UPS). If the voltage is switched off, the system should be shut down in a controlled manner.
So my question is: How can I get both programmes to start automatically and run in parallel?
Running on: Raspi 4
Raspbian release: 10 Buster
Kodi Version: 18.7
- First I called KODI and the Python script from 'autostart' (/etc/xdg/lxsession/LXDE-pi/autostart) and realised that only KODI is running and the script is not.
Autostart:
@kodi
@lxterminal -e python3 /home/pi/pi4/python/usvStromPi3Status.py
@lxpanel --profile LXDE-pi
@pcmanfm --desktop --profile LXDE-pi
@xscreensaver -no-splash
- Then I called KODI from my script after running two monitoring loops. When KODI started, the script froze and continued exactly where it left off when KODI was stopped.
- I then started KODI from the menu (Menu --> Entertainment media --> KODI) and, strangely enough, both programmes worked in parallel.
So my question is: How can I get both programmes to start automatically and run in parallel?
Running on: Raspi 4
Raspbian release: 10 Buster
Kodi Version: 18.7