How can I get KODI and a Python script to run at the same time?

34 Views Asked by At

I have created a small program 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.

  • First I called KODI (18.7) and the Python script from 'autostart'
(*/etc/xdg/lxsession/LXDE-pi/autostart*) 

and realised that only KODI is running and the script is not.

  • 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 programs worked in parallel.

0

There are 0 best solutions below