-
Notifications
You must be signed in to change notification settings - Fork 0
System monitor : how to start
Operating systems supported : macOS, Windows, Linux (incl. Raspberry Pi) and all OS that support Python3
Download and install the latest Python 3.x (min. 3.7) for your OS: https://www.python.org/downloads/
You can download a specific release from the Releases sections
Click on a release then download "Source code" archive below.
If you want a more up-to-date version, you can clone the repository with Git.
Install required Python modules for this project:
python3 -m pip install -r requirements.txt
Plug your smart screen to your computer (install the drivers on Windows if necessary)
Identify your smart screen model
Edit the config.yaml
in the root directory and edit as you like:
-
COM_PORT
(keep AUTO for auto-discovery) -
THEME
to choose a theme from theres/themes
folder -
HW_SENSORS
to choose a hardware sensors reading method (Python, LibreHardwareMonitor, or stubbed data) -
ETH
andWLO
to identify your network cards (leave the fields empty if you do not have such cards on your system) -
REVISION
to indicate your smart screen model (A for Turing, B for XuanFang, or SIMU for simulated LCD) -
BRIGHTNESS
in % (⚠️ revision A display can get hot at high brightness!) -
DISPLAY_REVERSE
to reverse the screen orientation or not
In a terminal, run python3 main.py
, python3.exe .\main.py
, py -3 main.py
... depending on your OS
You should now see animated content on your smart screen!
If program is not working, test your screen first with python3 simple_program.py
. If this works, your config.yaml
/ theme.yaml
may contains errors.
If you find some issues, please search or report it here
While the program is running, a tray icon is created in your tray / status bar / notification area depending on your OS.
To stop the program:
- use the tray icon right-click on it and select "Exit"
- from the terminal: enter Ctrl+C to stop the program
Both ways will stop the program cleanly, by sending current frame to the screen before exit.
This step depends on your OS. You can find online documentation by searching "[your OS] run program at startup". Here is the procedure for popular OS:
Because the system monitor needs to be run as administrator on Windows, the only way to start it at boot is by creating a Scheduled Task.
- From your search bar, search and open "Task Scheduler"
- From the scheduler, select "Create Basic Task" from the right panel.
- From the trigger page, select "When I log on".
- From the action page, select "Start a program".
- In the "program/script" field, browse and select the
pythonw.exe
program (note the 'w' in the name). It is usually located inC:\Users\YourUser\AppData\Local\Programs\Python\Python3XX\
. - In the "Add arguments" field, enter
main.py
- In the "Start in" field, enter the complete path to the folder of this project e.g.
C:\Users\You\Documents\turing-smart-screen-python\
- In the "Finish" tab, select "Open the properties dialog for this task..."
- In the Task Properties dialog on the General tab, select "Run with highest privileges"
You now have created the scheduled task that will start your project at logon.
Be sure to have configured the system monitor correctly in config.yaml
.
To test the task, on the left panel of the Task Scheduler select "Task Scheduler Library" then find your task in the list. Right-click on it and select "Run".
Use the Task Scheduler interface to start/stop the program from the task (right-click then "Run" / "End").
The system monitor will run in background with pythonw.exe
.
If you have any trouble, temporarily replace pythonw.exe
by python.exe
from the same folder. The system monitor will open a command window with logs.
A systemd configuration file is provided for this project in the tools/
sub-folder.
Copy/move the turing-smart-screen
folder to /opt/
(or to use another folder, edit the service file line starting with WorkingDirectory=)
Install the systemd service by copying the provided configuration file using the command below.
# Note: you may need to run these commands as root / with sudo
cp tools/turing-smart-screen-python.service /etc/systemd/system/
chmod +x /etc/systemd/system/turing-smart-screen-python.service
Enable, then start the new turing-smart-screen-python.service
:
# Note: you may need to run these commands as root / with sudo
systemctl daemon-reload
systemctl enable turing-smart-screen-python.service
systemctl start turing-smart-screen-python.service
This service will now automatically run the python script on boot.